aboutsummaryrefslogtreecommitdiff
path: root/platform.txt
diff options
context:
space:
mode:
authorLoren M. Lang <lorenl@north-winds.org>2013-04-22 17:48:22 -0700
committerLoren M. Lang <lorenl@north-winds.org>2013-04-22 17:48:22 -0700
commite1da15aeb5e4a68d6468a2fe7153ed73bd3b8521 (patch)
treefbb780de759f605e8d296f54c279a64fba2ef9b9 /platform.txt
parent890a3311ed1fee5344190a575bcd4ca213baff79 (diff)
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.
Diffstat (limited to 'platform.txt')
-rw-r--r--platform.txt6
1 files changed, 4 insertions, 2 deletions
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