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
Copy file name to clipboardExpand all lines: README.md
+16-5Lines changed: 16 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ For full documentation visit the [CMake Documentation Page][url-cm-docs].
11
11
12
12
The core ideas in this tutorial, inspired by the [Technical Note 190701][url-iar-docs-tn190701], serve as a mini-guide on how CMake can be used alongside the __IAR C/C++ Compiler__ to cross-compile embedded software applications.
13
13
14
-
__This tutorial assumes that the reader is familiar with the usage of the IAR Systems tools,as well as with the Kitware tools, from their respective command-line interfaces.__
14
+
__This tutorial assumes that the reader is familiar with the usage of the IAR Systems tools,as well as with the Kitware tools, from their respective command-line interfaces.__
15
15
16
16
17
17
## Required tools
@@ -35,16 +35,24 @@ On the [examples/iar-toolchain.cmake](examples/iar-toolchain.cmake) file, perfor
35
35
* Update [__CMAKE_SYSTEM_PROCESSOR__](examples/iar-toolchain.cmake#L11) with one of the valid compiler's target `<arch>`:
* Update [__IAR_INSTALL_DIR__](examples/iar-toolchain.cmake#L14) to point to the toolchain's install location:
39
-
>__Windows__example:
38
+
* Update [__IAR_INSTALL_DIR__](examples/iar-toolchain.cmake#L14) to point to the location where the corresponding IAR tools are __installed__ on __your__ system:
> __Note__ If the path contains blank spaces, it might be necessary to escape them using backslashes `\ `.
53
+
> __Notes__
54
+
> * If the __IAR_INSTALL_DIR__ contains blank spaces, it might be necessary to escape them using backslashes `\ ` or, instead, use `\\`.
55
+
> * __Do not__ include `<arch>/bin` on the __IAR_INSTALL_DIR__ variable. The `<arch>` will be automatically added in the [__TOOLKIT_DIR__](https://github.com/IARSystems/cmake-tutorial/blob/1.0.0/examples/iar-toolchain.cmake#L17) variable using __CMAKE_SYSTEM_PROCESSOR__. The `/bin` sub-directory will be hardcoded to the ephemeral `PATH` environment variable used internally while CMake is running.
48
56
49
57
* When using the __IAR Assembler__ for `430`, `8051`, `avr` or `v850` architecture, update [__CMAKE_ASM_COMPILER__](examples/iar-toolchain.cmake#L29) to:
50
58
>`"a${CMAKE_SYSTEM_PROCESSOR}"`
@@ -140,6 +148,9 @@ The expected output is similar to:
140
148
>-- Build files have been written to: C:/<...>/cmake-tutorial/examples/<example>/<arch>/_builds
141
149
>```
142
150
151
+
>:warning: Once the `_builds` is configured, there is no need to re-run the configuration step, except if there are changes to the toolchain file.
152
+
153
+
>:warning: If for some reason the configuration step fails, try removing the `_builds` subdirectory before running it again, in order to avoid any potential cache misses.
143
154
144
155
### Build the project
145
156
The general syntax to __build__ a project through CMake is:
0 commit comments