So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By Justin
#84110 I'm looking for a way to upload a custom binary file to the flash chip. I have a binary file with fonts, icons and a few other things for LCDs that I've been using in a few projects with PIC, AVR and STM micro-controllers. I'd like to embed that file in the flash chip of the ESP8266 instead of using an external 'W25Q' flash chip.

I read a bit about the SPIFFS but I'm not sure that's what I'm looking for. All I want to do is write one file. I don't need anything special to use it afterward, that stuff is already taken care of. I just want to dump the binary data onto the flash chip so I can read what I need using spi_flash_read() to use with my LCD library. I know not to write in the last 5 blocks but I'm not entirely sure how to find at which offset I can start writing and how much space is available. I also have no clue how to actually write the file.

I'm using VS Code with PlatformIO and the non-os SDK as framework. The ESP8266 board is a NodeMCU V1.0 with a 4MB chip and I also have a flash memory programmer if writing directly using the GPIO pins is an option.

Thank you.