You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[skip changelog] Update outdated information in platform specification (#787)
* Update statement re: prevalence of usb to serial chip on Arduino boards
It's no longer true that "most" Arduino boards have a dedicated USB to serial chip (and becoming increasingly less so).
* Update documentation for sketch size regex properties
The platform specification was outdated in regard to the sketch size determination regular expression properties.
- Document recipe.size.regex.data
- Update Arduino AVR Boards' recipe.size.regex value
* Update docs re: platform.local.txt location
Previously, the location specified by the platform specification applied only to the folder structure of manually installed platforms. When a platform is installed via Boards Manager, there is an additional version folder level and it is under this folder the platform.local.txt must be placed.
The documentation now applies equally well to either platform installation type.
* Modernize statement re: upload tools
The statement was written at a time when there was only two Arduino platforms. Although still correct, it had a decidedly outdated feel that was fixed by a minor rewording.
Copy file name to clipboardExpand all lines: docs/platform-specification.md
+9-5Lines changed: 9 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -193,15 +193,19 @@ A full example for the AVR platform can be:
193
193
194
194
#### Recipes to compute binary sketch size
195
195
196
-
At the end of the build the Arduino development software shows the final binary sketch size to the user. The size is calculated using the recipe **recipe.size.pattern**. The output of the command executed using the recipe is parsed through the regular expression set in the property **recipe.size.regex**. The regular expression must match the sketch size.
196
+
At the end of the build the Arduino development software shows the final binary sketch size to the user. The size is calculated using the recipe **recipe.size.pattern**. The output of the command executed using the recipe is parsed through the regular expressions set in the properties:
197
+
198
+
***recipe.size.regex**: Program storage space used.
199
+
***recipe.size.regex.data**: Dynamic memory used by global variables.
197
200
198
201
For AVR we have:
199
202
200
203
compiler.size.cmd=avr-size
201
204
[....]
202
205
## Compute size
203
206
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.hex"
@@ -275,7 +279,7 @@ Properties defined in a platform.txt created in the **hardware** subfolder of th
275
279
276
280
## platform.local.txt
277
281
278
-
Introduced in Arduino IDE 1.5.7. This file can be used to override properties defined in platform.txt or define new properties without modifying platform.txt (e.g. when platform.txt is tracked by a version control system). It should be placed in the architecture folder.
282
+
Introduced in Arduino IDE 1.5.7. This file can be used to override properties defined in platform.txt or define new properties without modifying platform.txt (e.g. when platform.txt is tracked by a version control system). It should be placed in the same folder as the platform.txt it supplements.
279
283
280
284
281
285
## boards.txt
@@ -367,7 +371,7 @@ The parameter **build.variant.path** is automatically generated.
367
371
368
372
## Tools
369
373
370
-
The Arduino development software uses external command line tools to upload the compiled sketch to the board or to burn bootloaders using external programmers. Currently*avrdude* is used for AVR based boards and *bossac* for SAM based boards, but there is no limit, any command line executable can be used. The command line parameters are specified using **recipes** in the same way used for platform build process.
374
+
The Arduino development software uses external command line tools to upload the compiled sketch to the board or to burn bootloaders using external programmers. For example,*avrdude* is used for AVR based boards and *bossac* for SAM based boards, but there is no limit, any command line executable can be used. The command line parameters are specified using **recipes** in the same way used for platform build process.
371
375
372
376
Tools are configured inside the platform.txt file. Every Tool is identified by a short name, the Tool ID.
373
377
A tool can be used for different purposes:
@@ -456,7 +460,7 @@ Most **{upload.XXXX}** variables are used later in the avrdude upload recipe in
456
460
[.....]
457
461
458
462
#### 1200 bps bootloader reset
459
-
Most Arduino boards use a dedicated USB-to-serial chip, that takes care of restarting the main MCU (starting the bootloader) when the serial port is opened. However, boards that have a native USB connection (such as the Leonardo or Zero) will have to disconnect from USB when rebooting into the bootloader (after which the bootloader reconnects to USB and offers a new serial port for uploading). After the upload is complete, the bootloader disconnects from USB again, starts the sketch, which then reconnects to USB. Because of these reconnections, the standard restart-on-serial open will not work, since that would cause the serial port to disappear and be closed again. Instead, the sketch running on these boards interprets a bitrate of 1200 bps as a signal the bootloader should be started.
463
+
Some Arduino boards use a dedicated USB-to-serial chip, that takes care of restarting the main MCU (starting the bootloader) when the serial port is opened. However, boards that have a native USB connection (such as the Leonardo or Zero) will have to disconnect from USB when rebooting into the bootloader (after which the bootloader reconnects to USB and offers a new serial port for uploading). After the upload is complete, the bootloader disconnects from USB again, starts the sketch, which then reconnects to USB. Because of these reconnections, the standard restart-on-serial open will not work, since that would cause the serial port to disappear and be closed again. Instead, the sketch running on these boards interprets a bitrate of 1200 bps as a signal the bootloader should be started.
460
464
461
465
To let the Arduino development software perform these steps, two board parameters can be set:
0 commit comments