This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

how can I change flash address in the code using nrf connect sdk for nrf5340

Hi ,

Technical Environment details:

  • nRF Connect SDK
  • segger Embedded Studio
  • nRF5340 DK board

1. I have enabled immutable bootloader and MCUboot bootloader.

2. Compiled fade_led sample code for nRF5340 DK board and some of the files generated during compiled time in the build directory.

3. I have observed pm_config.h file in build directory which is having partition manager configure information like as bootloader start address, end address and size of bootloader, application start , end addresses and application size .

I don't understand , If I want to change the start address and end address, size of the image in the partition manager . how can I do it.

Thanks & Regards,

Srinivas Rao.

Parents Reply Children
  • Hi Carl,

    Thanks for your reply.

    MCUboot bootloader:

    I am able to see pm.yml file in the below folder for MCUboot. but I am not able to see the start address of the MCUboot, End address of the MCUboot and size of the MCUboot in the configuration file.

    v1.5.0\bootloader\mcuboot\boot\zephyr\pm.yml

    Immutable bootloader:
    I am able to see pm.yml file in the below folder for immutable bootloader. but I am not able to see the start address of the immutable bootloader, End address of the immutable bootloader and size of the immutable bootloader in the configuration file.

    v1.5.0\nrf\samples\bootloader\pm.yml

    Regards,

    Srinivas.

  • Hi again!

    MCUboot bootloader:
    You can find the base size the MCUboot bootloader in the MCUboot Kconfig. The partitions can be changed using the following configurations in the MCUboot child image .conf: 

    CONFIG_PM_PARTITION_SIZE_MCUBOOT
    CONFIG_PM_PARTITION_SIZE_MCUBOOT_SCRATCH
    CONFIG_PM_PARTITION_SIZE_MCUBOOT_PAD


    Immutable bootloader:
    The base size for the immutable bootloader partitions can similarly be found in the immutable bootloader Kconfig


    From what I can see the partition manager places images according to pm.yml, starting at address 0x0. The end address is naturally given by the start address + image size.

    I hope this answers your question!

    Best regards,
    Carl Richard

  • Thanks for information

    I am able to see MCUboot partition size, MCUboot scratch size and MCUboot pad in Kconfig file

    I could not find  the start address of MCUboot and Immutable bootloader in Kconfig file.

    I could not find immutable bootloader partition size also. 

  • Hi again!

    The size of the immutable bootloader partition is also given by Kconfig, as mentioned in my previous comment. Specifically, PM_PARTITION_SIZE_B0_IMAGE.

    As for the start address I mentioned this:

    Carl Richard said:
    From what I can see the partition manager places images according to pm.yml, starting at address 0x0. The end address is naturally given by the start address + image size.

    Hence, the start address is given by the setup in pm.yml.  

    Best regards,
    Carl Richard

  • HI Carl,

    Is there any possibility to set application start address and size of the application through pm.yml. if yes, please let me know the macro to set start address and size of the application 

    Regards,

    Srinivas

Related