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

Inclusion of ~110kb uncompressed / ~15kb compressed binary blob in DFU image ?

Hi,

We have a Lattice Ice40 UltraPlus FPGA, SPI FLASH, and nRF52832. We would like to be able to include the FPGA's binary image in our DFU package but it is about 110kb uncompressed (or 15kb compressed with zip or gzip).

We have been able to include it in compressed form in RAM using ld but that eats up a lot of the available space and requires us to decompress it (which we still haven't managed)

Is there an easy way to store the uncompressed binary in the nRF's DFU FLASH image or a simple way to decompress the zipped binary ?

Thanks,
~ Scott

Parents
  • The nRF52832 has not enough RAM to handle zlib uncompression AFAIK. Only the NRF52840 would have enough RAM - but it would also have enough flash to store uncompressed.

    If you had enough free flash available in your application space, you can store the image data in flash memory.

    One simple way to convert the data is to use "xxd":

    xxd -i <data.bin >data.bin.h

    And then just include the .h file:

    const uint8_t binary_data[] = {
    #include "data.bin.h"
    };

Reply
  • The nRF52832 has not enough RAM to handle zlib uncompression AFAIK. Only the NRF52840 would have enough RAM - but it would also have enough flash to store uncompressed.

    If you had enough free flash available in your application space, you can store the image data in flash memory.

    One simple way to convert the data is to use "xxd":

    xxd -i <data.bin >data.bin.h

    And then just include the .h file:

    const uint8_t binary_data[] = {
    #include "data.bin.h"
    };

Children
Related