Skip to content

Commit

Permalink
Merge pull request #1776 from espruino/ep32_firmware_size_check
Browse files Browse the repository at this point in the history
updates for using a new partitions_espruino.bin
  • Loading branch information
gfwilliams authored Mar 13, 2020
2 parents ba0bd50 + 433708f commit e568c6c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions boards/ESP32.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
]
}
};
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions make/targets/ESP32.make
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit e568c6c

Please sign in to comment.