From 433708fd8fb7f577e493f209e72306e2632c5cd9 Mon Sep 17 00:00:00 2001 From: MaBecker Date: Thu, 12 Mar 2020 22:51:57 +0100 Subject: [PATCH] updates using new partitions_espruino.bin --- boards/ESP32.py | 5 +++-- make/targets/ESP32.make | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/boards/ESP32.py b/boards/ESP32.py index db3f76cf02..5ed735df19 100755 --- a/boards/ESP32.py +++ b/boards/ESP32.py @@ -37,7 +37,8 @@ ], 'makefile' : [ 'DEFINES+=-DESP_PLATFORM -DESP32=1', - 'DEFINES+=-DJSVAR_MALLOC' # Allocate space for variables at jsvInit time + 'DEFINES+=-DJSVAR_MALLOC', # Allocate space for variables at jsvInit time + 'ESP32_FLASH_MAX=1572864' ] } }; @@ -55,7 +56,7 @@ 'adc' : 2, 'dac' : 0, 'saved_code' : { - 'address' : 0x2C0000, + 'address' : 0x320000, 'page_size' : 4096, 'pages' : 64, 'flash_available' : 1344, # firmware can be up to this size - see partitions_espruino.csv diff --git a/make/targets/ESP32.make b/make/targets/ESP32.make index 74a259de9c..6f71459abd 100644 --- a/make/targets/ESP32.make +++ b/make/targets/ESP32.make @@ -14,6 +14,8 @@ $(ESP_ZIP): $(PROJ_NAME).bin $(Q)rm -rf build/$(basename $(ESP_ZIP)) $(Q)mkdir -p build/$(basename $(ESP_ZIP)) $(Q)cp $(PROJ_NAME).bin espruino_esp32.bin + @echo "** $(PROJ_NAME).bin uses $$( stat $(STAT_FLAGS) $(PROJ_NAME).bin) bytes of" $(ESP32_FLASH_MAX) "available" + @if [ $$( stat $(STAT_FLAGS) $(PROJ_NAME).bin) -gt $$(( $(ESP32_FLASH_MAX) )) ]; then echo "$(PROJ_NAME).bin is too big!"; false; fi $(Q)cp $(ESP_APP_TEMPLATE_PATH)/build/bootloader/bootloader.bin \ espruino_esp32.bin \ $(ESP_APP_TEMPLATE_PATH)/build/partitions_espruino.bin \