Skip to content

Commit 34a87b0

Browse files
committed
Removed ._user_heap_stack section from the Arduino reported RAM usage
Linker script defined ._user_heap_stack section to check that there is enough RAM left. Arduino should not report this but only the real one used. Example for a BluePill: .user_heap_stack section is equal to 1536 (_Min_Heap_Size+_Min_Stack_Size) If used to compute RAM usage of blink sketch, Arduino reports: 2456 bytes While it is not computed, it reports 916 bytes (=2456-1536-4(align)) Linker always ensures there is enough space defined thanks .user_heap_stack Arduino will report real size and will warn if sketch use more than the default RAM usage (build.warn_data_percentage=75) See #8 Signed-off-by: Frederic.Pillon <frederic.pillon@st.com>
1 parent f06193a commit 34a87b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

platform.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ recipe.output.save_file={build.project_name}.{build.variant}.hex
125125
## Compute size
126126
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
127127
recipe.size.regex=^(?:\.text|\.data|\.rodata)\s+([0-9]+).*
128-
recipe.size.regex.data=^(?:\.data|\.bss|\._user_heap_stack)\s+([0-9]+).*
128+
recipe.size.regex.data=^(?:\.data|\.bss)\s+([0-9]+).*
129129
recipe.size.regex.eeprom=^(?:\.eeprom)\s+([0-9]+).*
130130

131131

0 commit comments

Comments
 (0)