This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

OAD minimal image size (yes, again)

Other Parts Discussed in Thread: CC2541, CC2540

Hi everyone,

I've read every post about OAD that I could find on this forum, but cannot find a conclusive answer:

What is the size of a minimal firmware image "A" with only enough functionality to perform an over-the-air download of the real "Image B" ?

My own attempts resulted in an image of about 115KB, while I've read on this forum that some people managed down to 80 KB.

Can we have some hints/ideas/suggestions from TI reps about how to decrease the Image A size – or whether 80-110 KB is the range we should expect after all (in which case I'll stop trying to slim it further).

Thanks

  • Starting with SimpleBlePeripheral

    - remove SNV

    - remove gapBondMgr calls

    - remove simpleGATT

    - remove deviceInfo

    Should be able to get about 90K code size.

    BR,

    -Greg

  • The min flash of CC2540 or CC2541 is 128K at least. If you have an OAD image about 115KB, I suggest you to leave that alone.

  • Thanks for the replies. So 90k sounds fine.

    I was wondering though, both imgA and imgB will have the same BLE stack linked together. Has anyone tried changing up the linker configs so that the code common to both firmware images is not duplicated on the flash? That way an OAD may update only the "user app" part and save a ton of space in the process. Sounds like an interesting project.

  • Implementing a partial image OAD is not practically possible (i.e. it is not impossible, but the engineering cost and effort of achieving it would be extraordinary, and I strongly suspicion that this is why the TI Team did not and/or cannot take it on themselves.) I would advise to not even begin to think about solving this problem until you are an 8051 architecture and IAR linker super-super-user. The banked-code function calls & returns and the concomitant optimizations by IAR make it almost impossible to be able to compile your two different "partial images" such that your "common code" is linked at the exact same addresses. Speaking of which, most of your "common code" functions being linked are provided by TI in their BLE stack library - you would need access to that source code in order to begin to try to solve this problem. And in the end, I suspect that the solution to the problem would be a Catch-22 - the work you do to dumb down the IAR linker to perfectly link the common code exactly the same in the builds of both partial OAD builds will hamper the code-size savings optimizations so much that your build sizes will still be as big as building separate but complete OAD images.

  • GregS said:

    Starting with SimpleBlePeripheral

    - remove SNV

    - remove gapBondMgr calls

    - remove simpleGATT

    - remove deviceInfo

    Should be able to get about 90K code size.

    BR,

    -Greg

    Hi, how would one do that? Comment out the code? Or please instruct a better way, thanks!