Skip to content

Commit 16c1ba8

Browse files
author
Felipe Torrezan
committed
IAR_INSTALL_DIR desambiguation
1 parent b7d0f46 commit 16c1ba8

1 file changed

Lines changed: 16 additions & 5 deletions

File tree

README.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ For full documentation visit the [CMake Documentation Page][url-cm-docs].
1111

1212
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.
1313

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.__
1515

1616

1717
## Required tools
@@ -35,16 +35,24 @@ On the [examples/iar-toolchain.cmake](examples/iar-toolchain.cmake) file, perfor
3535
* Update [__CMAKE_SYSTEM_PROCESSOR__](examples/iar-toolchain.cmake#L11) with one of the valid compiler's target `<arch>`:
3636
>`430`, `8051`, `arm`, `avr`, `riscv`, `rx`, `rh850`, `rl78`, `stm8` or `v850`.
3737
38-
* 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:
39+
>__Windows__ examples:
4040
>```
4141
>"C:/Program\ Files/IAR\ Systems/Embedded\ Workbench\ 9.0"
4242
>```
43-
>__Linux__ example:
43+
>```
44+
>"C:/IAR_Systems/EWARM/9.10.2"
45+
>```
46+
>__Linux__ examples:
47+
>```
48+
>"/opt/iarsystems/bxarm-9.10.2"
49+
>```
4450
>```
4551
>"/opt/iarsystems/bxarm"
4652
>```
47-
> __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.
4856
4957
* When using the __IAR Assembler__ for `430`, `8051`, `avr` or `v850` architecture, update [__CMAKE_ASM_COMPILER__](examples/iar-toolchain.cmake#L29) to:
5058
>`"a${CMAKE_SYSTEM_PROCESSOR}"`
@@ -140,6 +148,9 @@ The expected output is similar to:
140148
>-- Build files have been written to: C:/<...>/cmake-tutorial/examples/<example>/<arch>/_builds
141149
>```
142150
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.
143154
144155
### Build the project
145156
The general syntax to __build__ a project through CMake is:

0 commit comments

Comments
 (0)