Skip to content

Commit fc25182

Browse files
committed
Document the programmers.txt configuration file of the Arduino platform system
This file is used to define external programmer configurations to be used for burning bootloaders and programming Arduino boards. NOTE: the example programmer snippet is missing some of the properties that are defined in the real programmer definition in the Arduino AVR Boards platform. After a lot of investigation, experimentation, and even consulting with the original author of the code, I was still unable to find any use of these properties in the current or any past IDE version that supported the 1.5 platform format. If these properties have no purpose, they they only represent a source of confusion and maintenance burden for platform developers.
1 parent d68544e commit fc25182

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

docs/platform-specification.md

+38
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,44 @@ Adding a **hide** property to a board definition causes it to not be shown in th
529529

530530
The value of the property is ignored; it's the presence or absence of the property that controls the board's visibility.
531531

532+
## programmers.txt
533+
534+
This file contains definitions for external programmers. These programmers are used by:
535+
536+
- The [**Tools > Burn Bootloader**](#burn-bootloader) feature of the IDEs and
537+
[`arduino-cli burn-bootloader`](commands/arduino-cli_burn-bootloader.md)
538+
- The [**Sketch > Upload Using Programmer**](#upload-using-an-external-programmer) feature of the IDEs and
539+
[`arduino-cli upload --programmer <programmer ID>`](commands/arduino-cli_upload.md#options)
540+
541+
programmers.txt works similarly to [boards.txt](#boardstxt). Programmers are referenced by their short name: the
542+
programmer ID. The settings for a programmer are defined through a set of properties with keys that use the programmer
543+
ID as prefix.
544+
545+
For example, the programmer ID chosen for the
546+
["Arduino as ISP" programmer](https://www.arduino.cc/en/Tutorial/ArduinoISP) is "arduinoasisp". The definition of this
547+
programmer in programmers.txt looks like:
548+
549+
[......]
550+
arduinoasisp.name=Arduino as ISP
551+
arduinoasisp.protocol=stk500v1
552+
arduinoasisp.program.speed=19200
553+
arduinoasisp.program.tool=avrdude
554+
arduinoasisp.program.extra_params=-P{serial.port} -b{program.speed}
555+
[......]
556+
557+
These properties can only be used in the recipes of the actions that use the programmer (`erase`, `bootloader`, and
558+
`program`).
559+
560+
The **arduinoasisp.name** property defines the human-friendly name of the programmer. This is shown in the **Tools >
561+
Programmer** menu of the IDEs and the output of [`arduino-cli upload --programmer list`](commands/arduino-cli_upload.md)
562+
and [`arduino-cli burn-bootloader --programmer list`](commands/arduino-cli_burn-bootloader.md).
563+
564+
In Arduino IDE 1.8.12 and older, all programmers of all installed platforms were made available for use. Starting with
565+
Arduino IDE 1.8.13 (and in all relevant versions of other Arduino development tools), only the programmers defined by
566+
the [board and core platform](#platform-terminology) of the currently selected board are available. For this reason,
567+
platforms may now need to define copies of the programmers that were previously assumed to be provided by another
568+
platform.
569+
532570
## Tools
533571

534572
The Arduino development software uses external command line tools to upload the compiled sketch to the board or to burn

0 commit comments

Comments
 (0)