flash address change when add CONFIG_BOOTLOADER_MCUBOOT=y

Hi,
I referred to the zephyr/samples/drivers/soc_flash_nrf/ code, and when I added CONFIG_BOOTLOADER_MCUBOOT=y, the flash storage started from address 0xfc000. Why did this address change?
storage_partition: partition@f8000 {
label = "storage";
reg = <0x000f8000 0x00008000>;
};
Also, am I able to change the storage_partition flash address? If yes, how can I change it?
Every time I try to change the storage_partition address, it still starts at 0xfc000.
Parents Reply Children
  • Hi,

    so how i can use pm_static.yml file partition in my firmware?

    because i used storage_partition and this partition available in pm_config.h.if possible can you please provide me reference code. 

    #define TEST_PARTITION storage_partition 

    #define TEST_PARTITION_OFFSET FIXED_PARTITION_OFFSET(TEST_PARTITION)
    #define TEST_PARTITION_DEVICE FIXED_PARTITION_DEVICE(TEST_PARTITION)

     

  • You define the location of the partition in pm_static.yml. Then, every time, the generated pm_config.h will reflect that.

  • Hi,

    I used below partition so how i can define the location of the partition in pm_static.yml?

    I am new to the nRF SDK, so I would appreciate your help.

    b0_container:
    address: 0x0
    orig_span: &id001
    - b0
    - provision
    size: 0x9000
    span: *id001
    b0:
    address: 0x0
    size: 0x8000
    provision:
    address: 0x8000
    size: 0x1000
    s0:
    address: 0x9000
    orig_span: &id002
    - app
    size: 0x7a000
    span: *id002
    s0_image:
    address: 0x9000
    orig_span: &id003
    - app
    size: 0x7a000
    span: *id003
    app:
    address: 0x9000
    size: 0x7a000
    s1:
    address: 0x83000
    orig_span: &id004
    - s1_image
    size: 0x7a000
    span: *id004
    s1_image:
    address: 0x83000
    size: 0x7a000
    settings_storage:
    address: 0xfd000
    size: 0x1000
  • The latest part herr in your file sets the size and location of the settins partition:

    settings_storage:
    address: 0xfd000
    size: 0x1000

    You can change the address and size (this is just one page, you probaly want more). You also do not need to define everything in pm_static. It is OK to define what you want at specific locations, and then let the partition manager automatically place the rest (though en the end you probably want to fix it as you want static partitions when using DFU).

    If you want to look at examples, you can look at some of the pm_static files in the SDK. One example is this one.

  • I added the following address and size to the pm_static.yml file, but the code still uses the partition information from the partitions.yml file. I’m not sure why the partition from the pm_static.yml file isn’t being used.

     settings_storage:
    address: 0xfe000
    size: 0x1000

Related