1 Reply Latest reply on Oct 8, 2020 5:08 AM by SudheeshK_26

    BLE stack and application as one project in upgradable OTA stack

    FrSt_4749731

      Hello to all,

       

       

      I am using situation with upgradable OTA stack and for that I have separate project for BLE stack and separate project for application. I am also using BLE cpu with 256 kB of flash. When I create BLE stack, the image size is always 128 kB (this is clear for the update reasons). But does anyone know how much space is really occupied? Would there be enough space for example to merge two projects together? The application size is around 60 kB in Debug mode. When I build it in release mode I can decrease it to around 40 kB. Why am I asking this? The idea is, to always use one BLE profile and for that the device would always start in BLE stack mode and then we could use only one BLE profile also for updating the BLE stack+app.I would prefer to some solution between fixed OTA stack and upgradable OTA stack and for this as I see the only option would be if I can limit the size of the BLE stack and BLE app to 128 kB, so the other half of the flash can be used as temp location.

       

      It would also be maybe possible to use bigger image as 128kB, as I see I can compress the file with factor 5x, for my option maybe compressing per flash row could use factor 3x. So I then just need to extend the launcher with uncompressed part, use 32kb of sram and store the compressed image at the end of flash. Launcher would then start uncompressing image from the beginning and overwriting flash row by row. Then I could also use bigger flash than 128kb. Or am I thinking wrongly?

       

      Of course also this can be maybe too complicated and would be just easier to upgrade the HW and add external flash, but this is already another story.

       

       

      Thanks for reading this and giving some opinion, Frenk