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

nrf51822 DFU Bootloader w/ gcc and SDK 6.0

Has anyone been able to get the DFU over the air bootloader to work with gcc and the newest SDK (6.0)?

I have followed all the tips I can find on here to get it working. I'm successfully compiling, but the bootloader is not functioning.

Here's some resources I've used: devzone.nordicsemi.com/.../ devzone.nordicsemi.com/.../

Interesting behavior I'm seeing:

If I flash the keil version first, then my gcc version, everything is working. It appears the UICR is not being written successfully.

I will gladly share with the community if someone can help me get this working.

Parents
  • Check the section naming of the UICR and Bootload data in boot loader_util. SDK6 changed the section name. You must have the same name in the loader file. Otherwise there is no mapping so it would not work. Once you have them set correctly it will work for gcc.

    Also the DFU must be located at 0x3C000. Would not work otherwise.

  • I had tried this but still no luck. I erase-all, flash s110-v7, then try and flash the DFU bootloader hex file. I'm pretty sure my linker file is set correctly based on other DFU posts.

    /* Linker script to configure memory regions. */

    SEARCH_DIR(.) GROUP(-lgcc -lc -lnosys)

    MEMORY {

    FLASH (rx) : ORIGIN = 0x0003C000, LENGTH = 0x3C00

    RAM (rwx) : ORIGIN = 0x20002000, LENGTH = 0x2000

    bootloader_settings (rwx) : ORIGIN = 0x0003FC00, LENGTH = 0x400

    NRF_UICR_BOOT_START (rwx) : ORIGIN = 0x10001014, LENGTH = 0x4 }

    SECTIONS { .bootloader_settings_block 0x0003FC00 : { KEEP(*(.bootloader_settings_sect)) } > bootloader_settings

         .NRF_UICR_BOOT_START_BLOCK 0x10001014 :
    {
        KEEP(*(.NRF_UICR_BOOT_START_SECT))
    } > NRF_UICR_BOOT_START
    

    }

    INCLUDE "gcc_nrf51_common.ld"

Reply
  • I had tried this but still no luck. I erase-all, flash s110-v7, then try and flash the DFU bootloader hex file. I'm pretty sure my linker file is set correctly based on other DFU posts.

    /* Linker script to configure memory regions. */

    SEARCH_DIR(.) GROUP(-lgcc -lc -lnosys)

    MEMORY {

    FLASH (rx) : ORIGIN = 0x0003C000, LENGTH = 0x3C00

    RAM (rwx) : ORIGIN = 0x20002000, LENGTH = 0x2000

    bootloader_settings (rwx) : ORIGIN = 0x0003FC00, LENGTH = 0x400

    NRF_UICR_BOOT_START (rwx) : ORIGIN = 0x10001014, LENGTH = 0x4 }

    SECTIONS { .bootloader_settings_block 0x0003FC00 : { KEEP(*(.bootloader_settings_sect)) } > bootloader_settings

         .NRF_UICR_BOOT_START_BLOCK 0x10001014 :
    {
        KEEP(*(.NRF_UICR_BOOT_START_SECT))
    } > NRF_UICR_BOOT_START
    

    }

    INCLUDE "gcc_nrf51_common.ld"

Children
No Data
Related