Fatfs upload


I’m rewriting a project to work on top of freeRTOS, and I will need fatfs (readonly). I want to be able to able to pack the directory structure in one file, send it to the MCU over TCP, and then the MCU will write it to external spi flash.

The packing should done with no conversion, so that the MCU, will just write byte by byte to external spi flash.

Everything is figured out, except for the packing part. Anyone has any suggestion to accomplish this?


Not really a FreeRTOS question - but if you are looking for a method of zipping up a block of bits then I’ve had success with zlib in embedded projects before.