Re: kconfig


Carles Cufi
 

Hi Jehudi,

Kconfig options can only default to values of other Kconfig options, the whole Kconfig system is self-contained and has no access to macros in the code.
If necessary, you can convert FLASH_ERASE_BLOCK_SIZE to be a Kconfig option perhaps?

Carles

-----Original Message-----
From: devel@lists.zephyrproject.org <devel@lists.zephyrproject.org> On
Behalf Of laczenJMS
Sent: 28 July 2018 11:26
To: devel@lists.zephyrproject.org
Subject: [Zephyr-devel] kconfig

Hi,

I am working on a subsystem and I have some problem with Kconfig. I
would like to define a configuration setting: SET_NVS_SECTOR_SIZE and
apply a default equal to the define FLASH_ERASE_BLOCK_SIZE:

config SET_NVS_SECTOR_SIZE
int "sector size used by default NVS backend"
default FLASH_ERASE_BLOCK_SIZE

but this doen't work: cmake complaints that FLASH_ERASE_BLOCK_SIZE is
not defined. However I can use FLASH_ERASE_BLOCK_SIZE in a .c or .h
file, and its value is set correct.

How should I do this in Kconfig ?

Thanks,

Jehudi

Join devel@lists.zephyrproject.org to automatically receive all group messages.