You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The above command generates a file **BoardOptions.cmake** in the build directory, that enumerates all the installed Arduino boards (installed through Arduino IDE or any other board manager) and their menu options. Select the Arduino board and any non-default options for the board from the BoardOptions.cmake (Or from cmake-gui), and then reinvoke the same command above.
73
+
The above command generates a file **BoardOptions.cmake** in the build directory, that enumerates all the installed
74
+
Arduino boards (installed through Arduino IDE or any other board manager) and their menu options. Select the Arduino
75
+
board and any non-default options for the board from the BoardOptions.cmake (Or from cmake-gui), and then reinvoke the
76
+
same command above.
74
77
75
78
The above command generates a file **BoardOptions.cmake** in the build directory, that enumerates all the installed
76
79
Arduino boards (installed through Arduino IDE or any other board manager) and their menu options. Select the Arduino
@@ -99,7 +102,11 @@ Note:
99
102
100
103
### Linking with Arduino code/libraries (`target_link_arduino_libraries`)
101
104
102
-
`<CMAKE_SOURCE_DIR>/CMakeLists.txt` and any other dependent CMake scripts of the project contain the standard CMake scripting using `add_library`, `add_executable` etc. without Arduino specific changes. Refer to CMake documentation for the same. However when the project source code depends on the Arduino code or libraries (i.e. if the corresponding header files are included), then appropriate linking is required, as expected. This is done using `target_link_arduino_libraries` as explained below.
105
+
`<CMAKE_SOURCE_DIR>/CMakeLists.txt` and any other dependent CMake scripts of the project contain the standard CMake
106
+
scripting using `add_library`, `add_executable` etc. without Arduino specific changes. Refer to CMake documentation for
107
+
the same. However when the project source code depends on the Arduino code or libraries (i.e. if the corresponding
108
+
header files are included), then appropriate linking is required, as expected. This is done
109
+
using `target_link_arduino_libraries` as explained below.
103
110
104
111
If Arduino.h is included in your source files, then the target must be linked against the 'core' Arduino library as
1.*Wire* and *core* in the above examples are not CMake targets. They are just Arduino library or include names (case-sensitive). Library and include names are the same in most libraries, but they may differ.
130
-
1. It is required only to specify the direct dependencies. Any deeper dependencies are automatically identified and linked. For example, if *SD.h* is included, it is sufficient to link with *SD*, even if *SD* depends on other Arduino libraries, like *SPI*.
136
+
137
+
1.*Wire* and *core* in the above examples are not CMake targets. They are just Arduino library or include names (
138
+
case-sensitive). Library and include names are the same in most libraries, but they may differ.
139
+
1. It is required only to specify the direct dependencies. Any deeper dependencies are automatically identified and
140
+
linked. For example, if *SD.h* is included, it is sufficient to link with *SD*, even if *SD* depends on other Arduino
141
+
libraries, like *SPI*.
131
142
132
143
1.*Wire* and *core* in the above examples are not CMake targets. They are just Arduino library names (case-sensitive).
133
144
1. It is required only to specify the direct dependencies. Any deeper dependencies are automatically identified and
@@ -153,7 +164,8 @@ target_enable_arduino_upload(my_executable) # This adds a target upload-my_execu
153
164
154
165
Upload the executable (from the above example) to the board on COM3 serial port as follows
155
166
156
-
**Note:***There are changes in the commands since release 1.1. Now there is only a common upload target available for all applications, and application specific targets need to be explicitly enabled.*
167
+
**Note:***There are changes in the commands since release 1.1. Now there is only a common upload target available for
168
+
all applications, and application specific targets need to be explicitly enabled.*
@@ -233,7 +245,9 @@ Resolution: Please try with release-1.1-dev branch.
233
245
234
246
## Package Management
235
247
236
-
For local package management, the CMake option `ARDUINO_BOARD_MANAGER_URL` can be used to specify the board manager URL of the platform. The necessary platform is locally installed in the build directory, and utilized. An example is shown below.
248
+
For local package management, the CMake option `ARDUINO_BOARD_MANAGER_URL` can be used to specify the board manager URL
249
+
of the platform. The necessary platform is locally installed in the build directory, and utilized. An example is shown
0 commit comments