@@ -830,6 +830,45 @@ You can specify the options in two ways, either as the command arguments or as v
830
830
831
831
Where **${TARGET_NAME} ** is the name of you target and **${OPTION_NAME} ** is the name of the option.
832
832
833
+ Register Custom Hardware Platforms
834
+ ~~~~~~~~~~~~~~~~
835
+ Arduino development may involve the use of additional hardware platforms that behave differently,
836
+ such as the Sagnuino e.g.
837
+ Arduino CMake allows you to register those platforms without the need to copy their files locally,
838
+ exactly as you would register the default Arduino platform. In fact, this is what happens behind the scenes:
839
+
840
+ 1. Platform's path is determined. By default it's Arduino's path.
841
+ See: `Arduino Platforms PRE 1.5 `_ and `Arduino Platforms 1.5 `_.
842
+
843
+ 2. Platform's architecture is determined. By default it's avr.
844
+
845
+ If one would like to specify a custom platform and/or architecuture, it should set the following variables:
846
+
847
+ +--------------------------------+---------------------------------------------------+
848
+ | **Name ** | **Description ** |
849
+ +--------------------------------+---------------------------------------------------+
850
+ | **PLATFORM_PATH ** | Platform's path on the local file system.* |
851
+ +--------------------------------+---------------------------------------------------+
852
+ | **PLATFORM_ARCHITECTURE ** | Platform's architecture* |
853
+ +--------------------------------+---------------------------------------------------+
854
+
855
+ **Note: ** If variables are to be used, they MUST be set before including the Toolchain file.
856
+
857
+ A valid Hardware Platform is a directory containing the following::
858
+
859
+ HARDWARE_PLATFORM_PATH/
860
+ |-- bootloaders/
861
+ |-- cores/
862
+ |-- variants/
863
+ |-- boards.txt
864
+ `-- programmers.txt
865
+
866
+ The ``board.txt `` describes the target boards and bootloaders, While ``programmers.txt `` the programmer defintions.
867
+
868
+ A good example of a *Hardware Platform * is in the Arduino SDK: ``${ARDUINO_SDK_PATH}/hardware/arduino/ ``
869
+ .. _Arduino Platforms PRE 1.5 : http://code.google.com/p/arduino/wiki/Platforms
870
+ .. _Arduino Platforms 1.5 : http://code.google.com/p/arduino/wiki/Platforms1
871
+
833
872
Advanced Options
834
873
~~~~~~~~~~~~~~~~
835
874
@@ -911,32 +950,7 @@ This section will outlines some of the additional miscellaneous functions availa
911
950
*BOARD_NAME * - Board name (nano, uno, mega...)
912
951
913
952
Print the detected Arduino board settings.
914
- * **register_hardware_platform(HARDWARE_PLATFORM_PATH) **:
915
-
916
- *HARDWARE_PLATFORM_PATH * - Hardware platform path
917
-
918
- Registers a ``Hardware Platform `` path. See: `Arduino Platforms PRE 1.5 `_ and `Arduino Platforms 1.5 `_.
919
953
920
- A Hardware Platform is a directory containing the following::
921
-
922
- HARDWARE_PLATFORM_PATH/
923
- |-- bootloaders/
924
- |-- cores/
925
- |-- variants/
926
- |-- boards.txt
927
- `-- programmers.txt
928
-
929
- This enables you to register new types of hardware platforms such as the
930
- Sagnuino, without having to copy the files into your Arduino SDK.
931
-
932
- The ``board.txt `` describes the target boards and bootloaders. While
933
- ``programmers.txt `` the programmer defintions.
934
-
935
- A good example of a *Hardware Platform * is in the Arduino SDK: ``${ARDUINO_SDK_PATH}/hardware/arduino/ ``
936
-
937
-
938
- .. _Arduino Platforms PRE 1.5 : http://code.google.com/p/arduino/wiki/Platforms
939
- .. _Arduino Platforms 1.5 : http://code.google.com/p/arduino/wiki/Platforms1
940
954
Bundling Arduino CMake
941
955
~~~~~~~~~~~~~~~~~~~~~~
942
956
0 commit comments