@@ -768,6 +768,12 @@ There is no limit to the number of custom menus that can be defined.
768
768
769
769
## Referencing another core, variant or tool
770
770
771
+ The Arduino platform referencing system allows using components of other platforms in cases where it would otherwise be
772
+ necessary to duplicate those components. This feature allows us to reduce the minimum set of files needed to define a
773
+ new "hardware" to just the boards.txt file.
774
+
775
+ ### Core reference
776
+
771
777
Inside the boards.txt we can define a board that uses a core provided by another vendor/maintainer using the syntax
772
778
** VENDOR_ID: CORE_ID ** . For example, if we want to define a board that uses the "arduino" core from the "arduino" vendor
773
779
we should write:
@@ -787,20 +793,27 @@ The [bundled libraries](#platform-bundled-libraries) from the referenced platfor
787
793
the referencing platform to bundle those libraries. If libraries are provided the list of available libraries are the
788
794
sum of the 2 libraries where the referencing platform has priority over the referenced platform.
789
795
790
- In the same way we can use variants and tools defined on another platform:
796
+ ### Variant reference
797
+
798
+ In the same way we can use a variant defined on another platform using the syntax ** VENDOR_ID: VARIANT_ID ** :
791
799
792
800
[....]
793
801
myboard.build.variant=arduino:standard
794
- myboard.upload.tool=arduino:avrdude
795
- myboard.bootloader.tool=arduino:avrdude
796
802
[....]
797
803
798
- Using this syntax allows us to reduce the minimum set of files needed to define a new "hardware" to just the boards.txt
799
- file.
800
-
801
804
Note that referencing a variant in another platform does _ not_ inherit any properties from that platform's platform.txt
802
805
(like referencing a core does).
803
806
807
+ ### Tool references
808
+
809
+ Tool recipes defined in the platform.txt of other platforms can also be referenced using the syntax
810
+ ** VENDOR_ID: TOOL_ID ** :
811
+
812
+ [....]
813
+ myboard.upload.tool=arduino:avrdude
814
+ myboard.bootloader.tool=arduino:avrdude
815
+ [....]
816
+
804
817
### Platform Terminology
805
818
806
819
Because boards can reference cores, variants and tools in different platforms, this means that a single build or upload
0 commit comments