BLE DFU Bloat

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
EdHa_4455331
Level 5
Level 5
25 replies posted 25 sign-ins 10 replies posted

I have been working on adding over-the-air (OTA) device firmware update (DFU) via BLE to a system that uses a CYBLE-416045-02 module.

My main application program is now at about 500K (at least that is what is reported in the output at the end of a build). Since this already contained FreeRTOS, emWin, and a working BLE stack, I thought I was in pretty good shape WRT getting every thing to fit in the 1M flash space. BUT... when I tried to convert this main application to a DFU App1 program by switching to the DFU linker scripts and adding post_build_core1.bat to the post build user commands, its size seems to have exploded.

I have done everything I could think of to make both the App0 bootloader and the App1 main program fit in flash. I edited the flash allocations in the dfu linker scripts to give the App0 bootloader the bare minimum it needed and gave the freed up flash to App1. But I still can not get the App1 to fit in the ~725K region of flash that I have available.

Am I mistaken in my belief that switching to the dfu linker scripts caused the flash image size to suddenly exploded by over 250K? Is there anyway to reduce this expansion? I have already tried size optimization, but that still doesn't give me enough relief.

Any suggestions/insights would be welcome.

Thanks,

Ed H.

0 Likes
1 Solution
EdHa_4455331
Level 5
Level 5
25 replies posted 25 sign-ins 10 replies posted

Never mind. I rolled back to an earlier version and the problem went away.

View solution in original post

0 Likes
1 Reply
EdHa_4455331
Level 5
Level 5
25 replies posted 25 sign-ins 10 replies posted

Never mind. I rolled back to an earlier version and the problem went away.

0 Likes