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

How can I compile dfu bootloader examples for PCA10031/other 16K RAM boards/dongles?

Apparently, the dfu bootloader example in nrf51 SDK 8.1 is not working on PCA10031 type(16K RAM devices). In my case, the device is RedBearLab BLE Nano and nrf51822. Can anybody help?

Parents
  • You need to change the linker settings of the bootloader project, taking into account that you have 0x4000 byte less RAM.

    If you use Keil you need to go to Project -> Options for Target ... -> Target. Then in the lower right half of the pane you have a section called "Read/Write Memory Areas". There you should update the following:

    • IRAM1 size should be 0x5380 - 0x4000 = 0x1380 (leave the start address as is, 0x20002C00)
    • IRAM2 start address shall be 0x20007F80 - 0x4000 = 0x20003F80 instead of 0x20007F80 (leave the size as is, 0x80)

    If you use GCC you would have to change the linker script (examples/dfu/bootloader/dfu_gcc_nrf51.ld) in the same way:

    • Change RAM LENGTH to 0x1380 (line 17)
    • Change NOINIT ORIGIN to 0x20003F80 (line 22)
Reply
  • You need to change the linker settings of the bootloader project, taking into account that you have 0x4000 byte less RAM.

    If you use Keil you need to go to Project -> Options for Target ... -> Target. Then in the lower right half of the pane you have a section called "Read/Write Memory Areas". There you should update the following:

    • IRAM1 size should be 0x5380 - 0x4000 = 0x1380 (leave the start address as is, 0x20002C00)
    • IRAM2 start address shall be 0x20007F80 - 0x4000 = 0x20003F80 instead of 0x20007F80 (leave the size as is, 0x80)

    If you use GCC you would have to change the linker script (examples/dfu/bootloader/dfu_gcc_nrf51.ld) in the same way:

    • Change RAM LENGTH to 0x1380 (line 17)
    • Change NOINIT ORIGIN to 0x20003F80 (line 22)
Children
Related