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

Parents
  • @Yaroslav: It's true that the bootloader can take up quite a lot of RAM but it still fit into the 6K RAM available. You can also change the heap size to 0 to get the 1K ram allocated for Heap if you don't use dynamic memory relocation.

    We have ported the bootloader on SDK v6.1 to work with S130, you can have a look here. Note that it's provided as-is.

    bootloader_S130_v09.hex

  • I don't think setting 1024 for the stack is a good idea because our stack requires up to 1536 bytes for the call stack and you need some more for the application stack usage. It should be at 2kB for the safe side.

    It's pretty strange that you don't have enough, have you make sure it's about 7KB of RAM (6KB + 946) when you compile with gcc ? Could you send your .map file here ?

    Note that with Keil free evaluation you can compile with the maximum code size of 32kB. I'm not 100% if you can use optimization for KEIL evaluation version or not, but it worth to try. When compiling with optimization our bootloader code take about 14kB of flash.

Reply
  • I don't think setting 1024 for the stack is a good idea because our stack requires up to 1536 bytes for the call stack and you need some more for the application stack usage. It should be at 2kB for the safe side.

    It's pretty strange that you don't have enough, have you make sure it's about 7KB of RAM (6KB + 946) when you compile with gcc ? Could you send your .map file here ?

    Note that with Keil free evaluation you can compile with the maximum code size of 32kB. I'm not 100% if you can use optimization for KEIL evaluation version or not, but it worth to try. When compiling with optimization our bootloader code take about 14kB of flash.

Children
No Data
Related