From 8b33f3e5b93b77ca31ea61b7233471991bd2365b Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Fri, 9 Jan 2015 22:43:25 +0300 Subject: [PATCH] Report flash memory size used by the sketch --- boards.txt | 1 + platform.txt | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/boards.txt b/boards.txt index b905fd420..9d40aee77 100644 --- a/boards.txt +++ b/boards.txt @@ -3,6 +3,7 @@ esp01.name=Generic ESP8266 board (80MHz) esp01.upload.tool=esptool esp01.upload.speed=115200 +esp01.upload.maximum_size=524288 esp01.upload.wait_for_upload_port=true esp01.build.mcu=esp8266 diff --git a/platform.txt b/platform.txt index a465e139a..da424e690 100644 --- a/platform.txt +++ b/platform.txt @@ -34,6 +34,8 @@ compiler.elf2hex.cmd=esptool compiler.elf2hex.flags= +compiler.size.cmd=xtensa-lx106-elf-size + compiler.esptool.cmd=esptool # This can be overriden in boards.txt @@ -72,11 +74,10 @@ recipe.objcopy.eep.pattern= recipe.objcopy.hex.pattern="{compiler.tools.path}{compiler.esptool.cmd}" -eo "{build.path}/{build.project_name}.elf" -bo "{build.path}/{build.project_name}_00000.bin" -bs .text -bs .data -bs .rodata -bc -ec -eo "{build.path}/{build.project_name}.elf" -es .irom0.text "{build.path}/{build.project_name}_40000.bin" -ec ## Compute size -#recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" -recipe.size.pattern= -recipe.size.regex=^(?:\.text|\.data|\.bootloader)\s+([0-9]+).* -recipe.size.regex.data=^(?:\.data|\.bss|\.noinit)\s+([0-9]+).* -recipe.size.regex.eeprom=^(?:\.eeprom)\s+([0-9]+).* +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +recipe.size.regex=^(?:\.text|\.data|\.bss|\.rodata|\.irom0\.text|)\s+([0-9]+).* +#recipe.size.regex.data=^(?:\.data|\.bss|\.noinit)\s+([0-9]+).* +#recipe.size.regex.eeprom=^(?:\.eeprom)\s+([0-9]+).* # ------------------------------