One of the things that annoyed me when using #ESP32forth is that with recent versions of the #ArduinoIDE it is no longer possible to use plugins for uploading additional files to the #SPIFFS partition of the ESP32.
There is a workaround solution for ESP32forth that allows a user to copy-paste code into the terminal, which is then stored on the filesystem - but that didn't convince me.
So I spent the last two days tinkering with mkspiffs and esptool.py and finally found a way to not only upload files to the SPIFFS partition but also dumping files *from* that partition back to your computer. All from the command line, no ArduinoIDE and plugins required - see below:
* Prerequisites:
- Compile mkspiffs with SPIFFS_OBJ_META_LEN set to 4 in include/spiffs_config.h
( https://github.com/igrr/mkspiffs.git )
- esptool.py installed on your system
* Info on ESP32forth SPIFFS partition:
SPIFFS offset (start of fs): 0x210000
SPIFFS size: 0x1E0000 (decimal: 1966080)
SPIFFS end of fs: 0x3effff
* Build SPIFFS image and flash to ESP32:
mkspiffs -c <some_directory_containing_files> -b 4096 -p 256 -s 0x1e0000 spiffs.bin
esptool.py --port /dev/<ESP32_serial_device> --chip esp32 write_flash -z 0x210000 spiffs.bin
* Dump SPIFFS partition from ESP32 to disk:
esptool.py --port /dev/<ESP32_serial_device> --baud 921600 read_flash 0x210000 0x1e0000 data.img
* Extract files from dumped partition:
mkspiffs -u <some_directory> data.img
#ESP32
#Forth
#ueforth