Skip to content

Commit 3d05ade

Browse files
authored
[skip changelog] Document available memory build properties (#1023)
upload.maximum_data_size and upload.maximum_size are properties used by the build system to fail compilation when memory usage exceeds a threshold and to calculate the relative memory usage for display in the console.
1 parent 1ea7518 commit 3d05ade

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

docs/platform-specification.md

+13
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,19 @@ For AVR we have:
270270
recipe.size.regex=^(?:\.text|\.data|\.bootloader)\s+([0-9]+).*
271271
recipe.size.regex.data=^(?:\.data|\.bss|\.noinit)\s+([0-9]+).*
272272

273+
Two properties can be used to define the total available memory:
274+
275+
- `{upload.maximum_size}`: available program storage space
276+
- `{upload.maximum_data_size}`: available dynamic memory for global variables
277+
278+
If the binary sketch size exceeds the value of these properties, the compilation process fails.
279+
280+
This information is displayed in the console output after compiling a sketch, along with the relative memory usage
281+
value:
282+
283+
Sketch uses 924 bytes (2%) of program storage space. Maximum is 32256 bytes.
284+
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
285+
273286
#### Recipes to export compiled binary
274287

275288
When you do a **Sketch > Export compiled Binary** in the Arduino IDE, the compiled binary is copied from the build

0 commit comments

Comments
 (0)