@@ -627,61 +627,48 @@ variables.
627627
628628#### Pluggable Discovery
629629
630- Discovery tools are a special kind of tools that are used to find supported boards, a platform must declare one or more
631- Pluggable Discoveries in its ` platform.txt ` . It's ok to use another platform discovery or the builtin ones if necessary.
630+ Discovery tools are a special kind of tool used to find supported boards. A platform must declare one or more Pluggable
631+ Discoveries in its [ ` platform.txt ` ] ( #platformtxt ) . Discoveries can be referenced from other packages, including the
632+ ` builtin ` dummy package which contains the traditional discoveries.
632633
633- There are two different syntaxes to declare discoveries, if the platform uses just one discovery:
634+ There are two different syntaxes to declare discoveries. If the platform uses just one discovery:
634635
635- ```
636- discovery.required=PLATFORM:DISCOVERY_NAME
637- ```
636+ discovery.required=VENDOR_ID:DISCOVERY_NAME
638637
639638instead if it needs multiple discoveries:
640639
641- ```
642- discovery.required.0=PLATFORM:DISCOVERY_ID_1
643- discovery.required.1=PLATFORM:DISCOVERY_ID_2
644- ```
640+ discovery.required.0=VENDOR_ID:DISCOVERY_0_NAME
641+ discovery.required.1=VENDOR_ID:DISCOVERY_1_NAME
645642
646- A platform that supports only boards connected to the serial can easily use the builtin ` serial-discovery ` without
647- creating a custom Pluggable Discovery:
643+ A platform that supports only boards connected via serial ports can easily use the ` builtin ` package's
644+ ` serial-discovery ` without creating a custom Pluggable Discovery:
648645
649- ```
650- discovery.required=builtin:serial-discovery
651- ```
646+ discovery.required=builtin:serial-discovery
652647
653- if it supports also boards connected to the network it can use the builtin ` mdns-discovery ` :
648+ if it also supports boards connected via the network, it can use the ` builtin ` package's ` mdns-discovery ` :
654649
655- ```
656- discovery.required.0=builtin:serial-discovery
657- discovery.required.1=builtin:mdns-discovery
658- ```
650+ discovery.required.0=builtin:serial-discovery
651+ discovery.required.1=builtin:mdns-discovery
659652
660- Since the above syntax requires adding a discovery in the ` discoveryDependencies ` field in the platform
661- ` package_index.json ` it might be cumbersome to do it before releasing it so we also provide another syntax to ease
662- development:
653+ Since the above syntax requires specifying a discovery via the ` discoveryDependencies ` field of the platform's
654+ [ package index ] ( package_index_json-specification.md ) , it might be cumbersome to use with manual installations. So we
655+ provide another syntax to ease development and beta testing :
663656
664- ```
665- discovery.DISCOVERY_ID.pattern=DISCOVERY_RECIPE
666- ```
657+ discovery.DISCOVERY_ID.pattern=DISCOVERY_RECIPE
667658
668659` DISCOVERY_ID ` must be replaced by a unique identifier for the particular discovery and ` DISCOVERY_RECIPE ` must be
669660replaced by the command line to launch the discovery. An example could be:
670661
671- ```
672- ## Teensy Ports Discovery
673- discovery.teensy.pattern="{runtime.tools.teensy_ports.path}/hardware/tools/teensy_ports" -J2
674- ```
662+ ## Teensy Ports Discovery
663+ discovery.teensy.pattern="{runtime.tools.teensy_ports.path}/hardware/tools/teensy_ports" -J2
675664
676- We strongly recommend not using this syntax on released platforms but only for development purposes.
665+ We strongly recommend using this syntax only for development purposes and not on released platforms .
677666
678667For backward compatibility, if a platform does not declare any discovery (using the ` discovery.* ` properties in
679- ` platform.txt ` ) it will automatically inherits ` builtin:serial-discovery ` and ` builtin:mdns-discovery ` (but not other
680- builtin discoveries that may be possibly added in the future). This will allow all legacy non-pluggable platforms to
681- migrate to pluggable discovery without disruption.
668+ ` platform.txt ` ) it will automatically inherit ` builtin:serial-discovery ` and ` builtin:mdns-discovery ` (but not other
669+ builtin discoveries that may be possibly added in the future).
682670
683- For detailed information see the [ Pluggable Discovery specification] ( pluggable-discovery-specification.md )
684- documentation.
671+ For detailed information, see the [ Pluggable Discovery specification] ( pluggable-discovery-specification.md ) .
685672
686673#### Verbose parameter
687674
@@ -719,8 +706,8 @@ The **upload.tool.<protocol_name\>** property determines the tool to be used for
719706 leonardo.upload.tool.network=arduino_ota
720707 [......]
721708
722- When the user tries to upload using a certain protocol but the board doesn't support it it will fallback to ` default ` if
723- specified. A board can always specify a ` default ` protocol even if others are defined:
709+ Multiple protocols can be defined for each board. When the user tries to upload using a protocol not supported by the
710+ board, it will fallback to ` default ` if one was defined:
724711
725712 [......]
726713 uno.upload.tool.default=avrdude
@@ -729,8 +716,8 @@ specified. A board can always specify a `default` protocol even if others are de
729716 leonardo.upload.tool.network=arduino_ota
730717 [......]
731718
732- ` default ` is also used when no upload address is provided by the user, this can be done only for boards that use upload
733- tools with builtin port detection like ` openocd ` .
719+ ` default ` is also used when no upload address is provided by the user. This can be used with tools that have built-in
720+ port detection (e.g., ` openocd ` ) .
734721
735722For backward compatibility with IDE 1.8.15 and older the previous syntax is still supported:
736723
@@ -777,19 +764,19 @@ If a platform supports Pluggable Discovery it can also use the port's properties
777764the following port metadata coming from a pluggable discovery:
778765
779766 {
780- "eventType": "add",
781- "port": {
782- "address": "/dev/ttyACM0",
783- "label": "ttyACM0",
784- "protocol": "serial",
785- "protocolLabel": "Serial Port (USB)",
786- "properties": {
787- "pid": "0x804e",
788- "vid": "0x2341",
789- "serialNumber": "EBEABFD6514D32364E202020FF10181E",
790- "name": "ttyACM0"
791- }
767+ "eventType": "add",
768+ "port": {
769+ "address": "/dev/ttyACM0",
770+ "label": "ttyACM0",
771+ "protocol": "serial",
772+ "protocolLabel": "Serial Port (USB)",
773+ "properties": {
774+ "pid": "0x804e",
775+ "vid": "0x2341",
776+ "serialNumber": "EBEABFD6514D32364E202020FF10181E",
777+ "name": "ttyACM0"
792778 }
779+ }
793780 }
794781
795782will be available on the recipe as the variables:
@@ -808,17 +795,17 @@ will be available on the recipe as the variables:
808795Here another example:
809796
810797 {
811- "eventType": "add",
812- "port": {
798+ "eventType": "add",
799+ "port": {
813800 "address": "192.168.1.232",
814801 "label": "SSH on my-board (192.168.1.232)",
815802 "protocol": "ssh",
816803 "protocolLabel": "SSH Network port",
817804 "properties": {
818- "macprefix": "AA:BB:CC",
819- "macaddress": "AA:BB:CC:DD:EE:FF"
805+ "macprefix": "AA:BB:CC",
806+ "macaddress": "AA:BB:CC:DD:EE:FF"
820807 }
821- }
808+ }
822809 }
823810
824811that is translated to:
@@ -831,7 +818,7 @@ that is translated to:
831818 {upload.port.properties.macaddress} = AA:BB:CC:DD:EE:FF
832819 {serial.port} = 192.168.1.232 # for backward compatibility
833820
834- This configuration, together with protocol selection, allows to remove the hardcoded ` network_pattern ` , now we can
821+ This configuration, together with protocol selection, allows to remove the hardcoded ` network_pattern ` . Now we can
835822replace the legacy recipe (split into multiple lines for clarity):
836823
837824 tools.bossac.upload.network_pattern="{runtime.tools.arduinoOTA.path}/bin/arduinoOTA"
@@ -847,25 +834,22 @@ with:
847834#### User provided fields
848835
849836Some upload recipes might require custom fields that must be provided by the user, like username and password to upload
850- over the network. In this case the recipe must use the special placeholder {upload.field.FIELD_NAME} where FIELD_NAME
851- must be declared separately in the recipe using the following format:
837+ over the network. In this case the recipe must use the special placeholder ** {upload.field.FIELD_NAME}** , where
838+ ** FIELD_NAME ** must be declared separately in the recipe using the following format:
852839
853840 tools.UPLOAD_RECIPE_ID.upload.field.FIELD_NAME=FIELD_LABEL
854841 tools.UPLOAD_RECIPE_ID.upload.field.FIELD_NAME.secret=true
855842
856- FIELD_LABEL is the label shown in the graphical prompt to ask the user to enter the value of the field. The secret
857- property is optional and it should be set to true if the field is a secret (like passwords or token).
843+ ** FIELD_LABEL** is the label shown in the graphical prompt where the user is asked to enter the value for the field.
844+
845+ The optional ** secret** property should be set to ` true ` if the field is a secret (like a password or token).
858846
859- Let’ s see how a complete example will look like :
847+ Let' s see a complete example:
860848
861849 tools.arduino_ota.upload.field.username=Username
862850 tools.arduino_ota.upload.field.password=Password
863851 tools.arduino_ota.upload.field.password.secret=true
864- tools.arduino_ota.upload.pattern="{runtime.tools.arduinoOTA.path}/bin/arduinoOTA"
865- -address {upload.port.address} -port 65280
866- -username "{upload.field.username}
867- -password "{upload.field.password}"
868- -sketch "{build.path}/{build.project_name}.bin"
852+ tools.arduino_ota.upload.pattern="{runtime.tools.arduinoOTA.path}/bin/arduinoOTA" -address {upload.port.address} -port 65280 -username "{upload.field.username} -password "{upload.field.password}" -sketch "{build.path}/{build.project_name}.bin"
869853
870854#### Upload verification
871855
@@ -943,7 +927,8 @@ The `program` action is triggered via the **Sketch > Upload Using Programmer** f
943927compiled sketch to a board using an external programmer.
944928
945929The ** program.tool** property determines the tool to be used for this action. This property is typically defined for
946- each programmer in [ programmers.txt] ( #programmerstxt ) and uses the same syntax as ` upload ` action:
930+ each programmer in [ programmers.txt] ( #programmerstxt ) and uses the same syntax as
931+ [ the ` upload ` action] ( #sketch-upload-configuration ) :
947932
948933 [......]
949934 usbasp.program.tool.serial=avrdude
@@ -983,15 +968,16 @@ the board.
9839681 . ` bootloader ` is used to flash the bootloader to the board
984969
985970The ** bootloader.tool** property determines the tool to be used for the ` erase ` and ` bootloader ` actions both. This
986- property is typically defined for each board in boards.txt and uses the same syntax as ` upload ` action:
971+ property is typically defined for each board in boards.txt and uses the same syntax as
972+ [ the ` upload ` action] ( #sketch-upload-configuration ) :
987973
988974 [......]
989975 uno.bootloader.tool.serial=avrdude
990976 [......]
991- leonardo.upload .tool.serial=avrdude
992- leonardo.upload .tool.network=arduino_ota
977+ leonardo.bootloader .tool.serial=avrdude
978+ leonardo.bootloader .tool.network=arduino_ota
993979 [......]
994- duemilanove.upload .tool.default=avrdude
980+ duemilanove.bootloader .tool.default=avrdude
995981 [......]
996982
997983For backward compatibility with IDE 1.8.15 and older the previous syntax is still supported:
@@ -1217,7 +1203,3 @@ software is in use:
12171203 This behavior
12181204 [ can be configured] ( https://arduino.github.io/arduino-cli/latest/commands/arduino-cli_core_install/#options )
12191205- ** Arduino Pro IDE** : (since 0.1.0) runs the script for any installed platform.
1220-
1221- ```
1222-
1223- ```
0 commit comments