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

Bootloader code not working for PCA10001

As per the steps given to program bootloader to the device i have programed it. But the code is not getting executed i.e advertising nor led initilization is taking place. My linker descriptor file is as follows:-

/* Linker script to configure memory regions. */ SEARCH_DIR(.) GROUP(-lgcc -lc -lnosys)

MEMORY { FLASH (rx) : ORIGIN = 0x00016000, LENGTH = 44K
RAM (rwx) : ORIGIN = 0x20002000, LENGTH = 8K
BOOTLOADER_SETTINGS (rwx) : ORIGIN = 0x0003FC00, LENGTH = 1K

} SECTIONS { /* placing my named section at given address: */ .bootloaderSettings 0x0003FC00 : { }

.uicrBootStartAddress 0x10001014 : {

} /* other placements follow here... / } / .bootloaderSettings (NOLOAD): { *(.bootloaderSettings) } > BOOTLOADER_SETTINGS */ INCLUDE "gcc_nrf51_common.ld"

I have changed the flash address from 0x0003C000 to 0x00016000 because after compiling it with gcc it was giving error as: section .bootloaderSettings loaded at [0003fc00,0003ffff] overlaps section .text loaded at [0003c000,00046517]

Are my all sections defined above correct? How do i debug with this issue?

  • Bootloader address setting should not be changed, this will affect other settings of memory address like storage and application memory bank. Keep default address for boot loader, application and soft device i will suggest. You can find these address in template projects of BLE stack based and non-BLE stacked based.

  • Even though after keeping the same bootloader address settings still facing the same issues. Softedevice and bootloader is getting programmed properly but the (DFUTarg) is not getting advertised.

  • Oh, if that is the case, make sure you have proper button configuration at hardware level, is it sensing LOW or HIGH, take a look on boot loader code first then verify on hardware. DFUTarg will appear if the condition matched while boot loader is up. Moreover, do take a look properly which boot loader you are using, if u want to have on air upload application/bootloader and soft device there is particular boot loader found inside experimental folder. As, i see, there are more than one version of boot loader. So for now, i suggest to cross check the hardware circuit of button/ then on code of corresponding boot loader what it is sensing to hit! Once the condition matched boot loader will let device enter into DFUTarg mode! Other than this it should work fine!

  • what shuld be the bootloader address settings my current setting are: FLASH (rx) : ORIGIN = 0x00035000, LENGTH = 44K
    RAM (rwx) : ORIGIN = 0x20002000, LENGTH = 8K
    BOOTLOADER_SETTINGS (rw) : ORIGIN = 0x0003FC00, LENGTH = 1K

Related