subsys/storage/flash_map - FLASH_DEV_NAME definition


Jiří Kubias <jiri.kubias@...>
 

Hi,
Im playing with subsys/storage/flash_map   and I have one problem with  flash_drivers_map structure.

Currently it is defined as 

struct driver_map_entry {
u8_t id;
const char * const name;
};

static const struct driver_map_entry  flash_drivers_map[] = {
#ifdef FLASH_DEV_NAME /* SoC embedded flash driver */
{SOC_FLASH_0_ID, FLASH_DEV_NAME},
#endif
#ifdef CONFIG_SPI_FLASH_W25QXXDV
{SPI_FLASH_0_ID, CONFIG_SPI_FLASH_W25QXXDV_DRV_NAME},
#endif
};

Im using SOC flash map so I need to define FLASH_DEV_NAME  - by looking into the source codes is sees tat it should be defined in dts.fixup  - for example it is defined in:
./arch/arm/soc/nordic_nrf/nrf52/dts.fixup:29:#define FLASH_DEV_NAME                     NRF_NRF52_FLASH_CONTROLLER_4001E000_LABEL

But from structure driver_map_entry definition the second variable must be a const char * const name - so it does not fit. 

So am I doing something wrong or it is need some fixes in Zephyr? In my opinion is should be defined in .config file as CONFIG_FLASH_MAP_DEV_NAME   

Im using 1.13.0 as stable release.

Regards, 
Jiri




--
===================================================
Ing. Jiri Kubias
 
e-mail: jiri.kubias@...
mobile: 775 593 956
===================================================