From e1da15aeb5e4a68d6468a2fe7153ed73bd3b8521 Mon Sep 17 00:00:00 2001 From: "Loren M. Lang" Date: Mon, 22 Apr 2013 17:48:22 -0700 Subject: Detect RAM usage and stop if full This resolves issue #1356 and add the ability for the Arduino IDE to detect the amount of RAM allocated to a sketch and compare that to the available RAM on each board. If RAM is more than 90% full, it will fail on building since there is not enough free RAM for the heap and stack to use. --- platform.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'platform.txt') diff --git a/platform.txt b/platform.txt index 5fc2682..6bbe078 100644 --- a/platform.txt +++ b/platform.txt @@ -53,8 +53,10 @@ recipe.objcopy.eep.pattern="{compiler.path}{compiler.objcopy.cmd}" {compiler.obj recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" ## Compute size -recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.hex" -recipe.size.regex=Total\s+([0-9]+).* +recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" +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]+).* # AVR Uploader/Programmers tools -- cgit v1.2.3-18-g5258