From eaccf5bbb6a1d6a8a671ad6bcb4c5179aa96cabe Mon Sep 17 00:00:00 2001 From: Magnus Date: Mon, 18 Sep 2023 07:28:25 +0200 Subject: [PATCH] Updates for wikwi --- script/merge_firmware.py | 7 ++++++- src/main.hpp | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/script/merge_firmware.py b/script/merge_firmware.py index 9e543dfa..4297be10 100644 --- a/script/merge_firmware.py +++ b/script/merge_firmware.py @@ -6,10 +6,15 @@ def merge_bin(source, target, env): + print( "Running merge bin." ) + # The list contains all extra images (bootloader, partitions, eboot) and # the final application binary flash_images = env.Flatten(env.get("FLASH_EXTRA_IMAGES", [])) + ["$ESP32_APP_OFFSET", APP_BIN] + #flash_images.append( "0x390000" ) + #flash_images.append( ".pio/build/gravity32-wokwi/spiffs.bin" ) + # Run esptool to merge images into a single binary env.Execute( " ".join( @@ -37,4 +42,4 @@ def merge_bin(source, target, env): ] + ["0x0", MERGED_BIN], UPLOADCMD='"$PYTHONEXE" "$UPLOADER" $UPLOADERFLAGS', -) \ No newline at end of file +) diff --git a/src/main.hpp b/src/main.hpp index 3f6966c2..6157f128 100644 --- a/src/main.hpp +++ b/src/main.hpp @@ -124,7 +124,12 @@ extern RunMode runMode; // Hardware config for ESP32-d1-min, iSpindel hardware // ------------------------------------------------------ #include +#if defined(WOKWI) // TEMPORARY FIX FOR ISSUE https://github.com/wokwi/wokwi-features/issues/642 +#include +#define LittleFS SPIFFS +#else #include +#endif #include "esp32/rom/rtc.h" #define ESPhttpUpdate httpUpdate