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

DFU on S130

I'm developing application using your devices (PCA10001/PCA10000) and S130 SoftDevice. I tried to implement DFU/OTA feature in my app. For this purpose I used DFU sources distributed for Beacon "nRF51822 Beacon v1.1.0.zip" that based on S110. But I see that DFU takes a lot of RAM - about 5.5k that is acceptable for S110. As I use S130 that takes 10k RAM itself, leaving for application about 6k. So, I can't use DFU with S130 as it takes almost all available RAM.

Please correct me if I'm not right. Otherwise, please, suggest a way to use DFU on S130. Thanks.

Memory map capture memmap.png

  • Well, I downloaded ZIP of sample from github.com/.../nrf51-dfu-ble-S130 Unpacked to the \nrf51822\Board\nrf6310\device_firmware_updates folder as described in README.md; Opened this project using Keil; Fixed path for includes for cm0; Tried to build - and got error:

    ._build\bootloader.axf: Error: L6407E: Sections of aggregate size 0x718 bytes could not fit into .ANY selector(s).

    Also I see that your project sets ROM1 with offset 0x3A000 and size 0x6000, is it correct?

  • I have updates: I ported your sample to Eclipse project and successfully built it. Now I see that application takes about 32k Flash(but it is not so precise) and about 4.4k of RAM (BSS + Stack) So, I don't know why Keil doesn't build it, maybe it takes bit more than 32k. About RAM - probably sources taken from Beacon firmware is not good for S130.

    But anyway it isn't run on my target: PCA10001 with nRF51822, it fails and I'm currently investigating root cause.

    To summarize all above we can assume that memory (RAM/ROM) issues are fixed with your sample, but still have issue with running it. Could you help me here? Should do any special for loading/running it? My ROM: Offset 0x1D000, length 0x23000

    Thank you!

  • @Yasoslav: Could you let me know more about the issue with the "path for includes for cm0" ? You should have your project placed like this: \Board\nrf6310\device_firmware_updates\bootloader - Debug - S130\

    And it's with SDK v6.1. In my case it's 21kB after compilation.

    The address and size for ROM1 is correct in my project. And you have to make sure BOOTLOADER_REGION_START macro in dfu_types.h matched with the start address of ROM1.

    The bootloader should be located at the top of the code area leaving the area at 0x1D000 and above for the application. Please have a look at the layout here

    Also, because we write into UICR the start address of the bootloader, so it's wise to do a full erase of the chip when you modify the start address of the bootloader.

  • issue with the "path for includes for cm0":

    • All your(Nordic's) example project doesn't have this Includes Path: c:\Keil_v5\ARM\Pack\ARM\CMSIS\4.2.0\CMSIS\Include..

    So, I add it manually all the time

  • According to ROM: For bootloader should it be exactly 0x3C000 or any address just to locate bootloader at the top? For example my build takes 0x8000 of ROM, so, placing it at top start address is 0x38000, is it good?

Related