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

Bootloader RAM Start address calculation

I read the following QA - https://devzone.nordicsemi.com/f/nordic-q-a/41237/on-dfu-jump-address but still have doubts

1. Is it safe to set the Bootloader RAM start address to (RAM SIZE - BOOTLOADER RAM SIZE) ?

Does it make sense to get insight from the below sections in the .map file:

Unused ranges:

From                       To                    Size
----                           --                ----
0xf'd8eb                0xf'dfff                 0x715
0x2000'2db0             0x2003'ffff              0x3'd250

21 336 bytes of readonly code memory
 1 426 bytes of readonly data memory (+ 8 absolute)
11 685 bytes of readwrite data memory (+ 8 192 absolute)

I understand I must take into account  readwrite section size from App and unused section  below 0x2004 0000 address with size of  readwrite section size from Bootloader

2. Can you please share the generic RAM memory map for nRF52840 with Bootloader taken into consideration?

Parents
  • Hi,

    1. Yes, that is safe, and probably what makes most sense. It does not matter where the bootloader RAM start address is, provided it is higher than what is used by the SoftDevice, and low enough that the ram size does not exceed the physical RAM. You do not have to take into account anything from the app. The bootloader and application do not run at the same time, so they can use the same RAM region without any problems.

    2. We do not have any map of it, but t is just a single split: When the bootloader is running, the RAM is shared between the bootloader and SoftDevice, and the application does not use any RAM. When the application is running, the RAM is shared between the application and SoftDevice. The SoftDevice RAM usage depend on configuration. See Adjustment of RAM and Flash memory for details.

Reply
  • Hi,

    1. Yes, that is safe, and probably what makes most sense. It does not matter where the bootloader RAM start address is, provided it is higher than what is used by the SoftDevice, and low enough that the ram size does not exceed the physical RAM. You do not have to take into account anything from the app. The bootloader and application do not run at the same time, so they can use the same RAM region without any problems.

    2. We do not have any map of it, but t is just a single split: When the bootloader is running, the RAM is shared between the bootloader and SoftDevice, and the application does not use any RAM. When the application is running, the RAM is shared between the application and SoftDevice. The SoftDevice RAM usage depend on configuration. See Adjustment of RAM and Flash memory for details.

Children
No Data
Related