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

Analyzing FLASH_START, RAM_START and corresponding Linker macros

Hello,

 

I am using nRF52840, SDK_16.0.0, SoftDevice S140 V7.0.1 and Segger for flashing the image. I am using ‘ble_app_blinky’.

 

For better clarity, I am trying to understand FLASH_START, RAM_START and corresponding macros. I have below queries.

 

1) In ble_app_blinky, FLASH_START is 0x27000 and FLASH_SIZE is 0xd9000. So Flash end will be 0x27000 + 0xd9000 =   0x10 0000.  Why FLASH_START is at 0x27000 ? As per below link, whether Flash below 0x27000 is reserved for MBR + Soft Device ?

https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v16.0.0%2Flib_bootloader.html&anchor=lib_bootloader_memory

 

2) In above link, Application starts at 0x27000 and ends after 0xF8000. But in settings why FLASH_SIZE is 0xd9000. Whether FLASH_SIZE includes 32KB (0x10 0000 - 0xF8000) for Bootloader (24KB) + Bootloader settings (4KB) + MBR parameters (4KB)

a) When I need DFU functionality, do I need to change FLASH_SIZE to 0xD1000 so that application flash will not overwrite Bootloader location.

 

3) In Serial UART bootloader, FLASH_START is 0xF8000 and this is similar to Memory map table. But why FLASH_SIZE is 0x6000, instead of 0x8000. Whether 0x2000 is reserved for FDS.

4) Whenever FDS macros are changed (Ex: FDS_VIRTUAL_PAGES) do I need to crosscheck FLASH_SIZE in both application and bootloader linker options.

5) I could not find much details about RAM_START and RAM_SIZE. Similar to Flash, how to analyze these macros. I could not find any link. Please share RAM details.

 

6) After compiling I am seeing below. Whether upper green indicates stack allocation for auto, local variables.

a) How about Heap memory. Any dynamic allocation will happen in SoftDevice?

 

             

 Please let me know your inputs for individual points for better clarity.

Thanks & Regards

Vishnu Beema

Related