I have some functioning firmware that I am deploying to an STM32 part with 64K of Flash memory (starting at address 0x8000000). I want to use some amount of this memory towards the end of the flash memory space to store a gzipped file on the STM32 part itself.
What is the best way to write this file to a location in the flash with openOCD? Should I somehow bundle it into the firmware ELF? Should I flash firmware and then follow that up with another flash command to write the file to a specific portion of the flash space?
Once written how do i use openOCD to pull the file from this location and get it back in a format that gzip can uncompress?