@@ -627,61 +627,48 @@ variables.
627
627
628
628
#### Pluggable Discovery
629
629
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.
632
633
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:
634
635
635
- ```
636
- discovery.required=PLATFORM:DISCOVERY_NAME
637
- ```
636
+ discovery.required=VENDOR_ID:DISCOVERY_NAME
638
637
639
638
instead if it needs multiple discoveries:
640
639
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
645
642
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:
648
645
649
- ```
650
- discovery.required=builtin:serial-discovery
651
- ```
646
+ discovery.required=builtin:serial-discovery
652
647
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 ` :
654
649
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
659
652
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 :
663
656
664
- ```
665
- discovery.DISCOVERY_ID.pattern=DISCOVERY_RECIPE
666
- ```
657
+ discovery.DISCOVERY_ID.pattern=DISCOVERY_RECIPE
667
658
668
659
` DISCOVERY_ID ` must be replaced by a unique identifier for the particular discovery and ` DISCOVERY_RECIPE ` must be
669
660
replaced by the command line to launch the discovery. An example could be:
670
661
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
675
664
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 .
677
666
678
667
For 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).
682
670
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 ) .
685
672
686
673
#### Verbose parameter
687
674
@@ -719,8 +706,8 @@ The **upload.tool.<protocol_name\>** property determines the tool to be used for
719
706
leonardo.upload.tool.network=arduino_ota
720
707
[......]
721
708
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:
724
711
725
712
[......]
726
713
uno.upload.tool.default=avrdude
@@ -729,8 +716,8 @@ specified. A board can always specify a `default` protocol even if others are de
729
716
leonardo.upload.tool.network=arduino_ota
730
717
[......]
731
718
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 ` ) .
734
721
735
722
For backward compatibility with IDE 1.8.15 and older the previous syntax is still supported:
736
723
@@ -777,19 +764,19 @@ If a platform supports Pluggable Discovery it can also use the port's properties
777
764
the following port metadata coming from a pluggable discovery:
778
765
779
766
{
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"
792
778
}
779
+ }
793
780
}
794
781
795
782
will be available on the recipe as the variables:
@@ -808,17 +795,17 @@ will be available on the recipe as the variables:
808
795
Here another example:
809
796
810
797
{
811
- "eventType": "add",
812
- "port": {
798
+ "eventType": "add",
799
+ "port": {
813
800
"address": "192.168.1.232",
814
801
"label": "SSH on my-board (192.168.1.232)",
815
802
"protocol": "ssh",
816
803
"protocolLabel": "SSH Network port",
817
804
"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"
820
807
}
821
- }
808
+ }
822
809
}
823
810
824
811
that is translated to:
@@ -831,7 +818,7 @@ that is translated to:
831
818
{upload.port.properties.macaddress} = AA:BB:CC:DD:EE:FF
832
819
{serial.port} = 192.168.1.232 # for backward compatibility
833
820
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
835
822
replace the legacy recipe (split into multiple lines for clarity):
836
823
837
824
tools.bossac.upload.network_pattern="{runtime.tools.arduinoOTA.path}/bin/arduinoOTA"
@@ -847,25 +834,22 @@ with:
847
834
#### User provided fields
848
835
849
836
Some 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:
852
839
853
840
tools.UPLOAD_RECIPE_ID.upload.field.FIELD_NAME=FIELD_LABEL
854
841
tools.UPLOAD_RECIPE_ID.upload.field.FIELD_NAME.secret=true
855
842
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).
858
846
859
- Let’ s see how a complete example will look like :
847
+ Let' s see a complete example:
860
848
861
849
tools.arduino_ota.upload.field.username=Username
862
850
tools.arduino_ota.upload.field.password=Password
863
851
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"
869
853
870
854
#### Upload verification
871
855
@@ -943,7 +927,8 @@ The `program` action is triggered via the **Sketch > Upload Using Programmer** f
943
927
compiled sketch to a board using an external programmer.
944
928
945
929
The ** 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 ) :
947
932
948
933
[......]
949
934
usbasp.program.tool.serial=avrdude
@@ -983,15 +968,16 @@ the board.
983
968
1 . ` bootloader ` is used to flash the bootloader to the board
984
969
985
970
The ** 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 ) :
987
973
988
974
[......]
989
975
uno.bootloader.tool.serial=avrdude
990
976
[......]
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
993
979
[......]
994
- duemilanove.upload .tool.default=avrdude
980
+ duemilanove.bootloader .tool.default=avrdude
995
981
[......]
996
982
997
983
For backward compatibility with IDE 1.8.15 and older the previous syntax is still supported:
@@ -1217,7 +1203,3 @@ software is in use:
1217
1203
This behavior
1218
1204
[ can be configured] ( https://arduino.github.io/arduino-cli/latest/commands/arduino-cli_core_install/#options )
1219
1205
- ** Arduino Pro IDE** : (since 0.1.0) runs the script for any installed platform.
1220
-
1221
- ```
1222
-
1223
- ```
0 commit comments