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

Getting weird behavior from the board while adding the application version

Hi all,

I'm trying to add application version in the signed bootloader to prevent the downgrade of application. So I'm directly writing the application version to the flash like

attribute ((section(".appVerStartAddress"))) volatile uint32_t m_application_version = APP_VERSION;

I would like to put the application version at last four bytes of the application area. The application will start at the address 0x18000 and I come to notice the DFU_BANK_0_REGION_START = 0x18000 and DFU_BANK_1_REGION_START = 0x28E00 that means I can put .appVerStartAddress = 0x28DFC, ( 0x28E00 - 0x04 = 0x28DFC ), But when I'm trying to do that I'm getting weird result ie, the first 0x200 byes of data is not written to the flash after doing DFU, ie 0x18000 to 0x18200 is empty when I read the memory. This will happens when I try to put the app version in between the locations 0x28C00 to 0x2E00, If I use the location < 0x28C00 its working fine. And after analyzing It come to know that DFU_BANK_1_REGION_START is not getting flashed upto 0x200 bytes ie from 0x28E00 to 0x29000 is empty ie, all are 0xff. So it reflecting in DFU_BANK_0_REGION_START

Getting confused why can't we write the locations between 0x28C00 to 0x2E00.

I would like some one to help me in this regards

and I'm checking the appVerStartAddress in the bootloader

I'm using the nrf51DK board SDK9.0 using the signed_bootloader example. and I'm attaching the linker script that I'm using here ble_app_template_gcc_nrf51.ld

Related