Flash configuration in dts file


Laurence Pasteau
 

Hi everybody,


I have a question regarding dts file, and more specifically the flash partition.

I would like to have a project without bootloader, but with a partition for the code and another for the file system.


At compilation time I would like to be warned if the code partition is overlapping the flash partition.


First I tried to set CONFIG_FLASH_LOAD_SIZE. As I have no bootloader, I still need CONFIG_FLASH_LOAD_OFFSET to 0.

Unfortunately as CONFIG_HAS_DTS is set in this project, these values are not taken into account.


However in the script that generates the generated_dts_board files from dts, it seems that :

if CONFIG_FLASH_LOAD_OFFSET is set to 0

then

CONFIG_FLASH_LOAD_SIZE is set to 0.


The only successfull but not pretty solution I found was this one :


        boot_partition: partition@0 {
            label = "noboot";
            reg = <0x00000000 0x4>;
        };
        code_partition: partition@4 {
            label = "code-partition";
            reg = <0x00000004 0x40000>;
        };
#if defined(CONFIG_FS_FLASH_STORAGE_PARTITION)
        storage_partition: partition@40004 {
            label = "storage";
            reg = <0x00040004 0x0003FFFC>;
        };
#endif

Is there a better way to solve this issue ?

Thanks in advance,
Regards,
Laurence

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