Skip to content

Commit 2d4453a

Browse files
author
Felipe Torrezan
committed
tutorial: Updated toolchain version
1 parent faa20f3 commit 2d4453a

4 files changed

Lines changed: 13 additions & 12 deletions

File tree

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Before you begin, you will need to download and install the IAR product, CMake a
2424

2525
## Building a Basic CMake Project
2626
>[!NOTE]
27-
>While this guide is based on the IAR Build Tools for Arm (CXARM) 9.70.1 on Linux, it should work with other supported IAR products with no or minimal changes.
27+
>While this guide is based on the IAR Build Tools for Arm (CXARM) 9.70.2 on Linux, it should work with other supported IAR products with no or minimal changes.
2828
2929
The most basic CMake project is an executable built from a single source code file. For simple projects like this, a `CMakeLists.txt` file with about half dozen of commands is all that is required.
3030

@@ -88,14 +88,15 @@ We are ready to build our first project! Run CMake to configure the project and
8888
```console
8989
$ echo "main(){}" | /opt/iar/cxarm/arm/bin/iccarm --output $(mktemp) -
9090

91-
IAR ANSI C/C++ Compiler V9.70.1.475/LNX for ARM
91+
IAR ANSI C/C++ Compiler V9.70.2.500/LNX for ARM
9292
Copyright 1999-2025 IAR Systems AB.
93-
LMS Cloud License (LMSC 1.5.0)
93+
LMS Cloud License (LMSC 2.1.1)
9494
9595
4 bytes of CODE memory
9696

9797
Errors: none
9898
Warnings: none
99+
99100
```
100101

101102
- From the terminal, navigate to the [tutorial](tutorial) directory and create a build directory:
@@ -128,8 +129,8 @@ enable_testing()
128129
add_test(NAME tutorialTest
129130
COMMAND /opt/iar/cxarm/common/bin/CSpyBat
130131
# C-SPY drivers for the Arm simulator via command line interface
131-
/opt/iar/cxarm/arm/bin/libarmPROC.so
132-
/opt/iar/cxarm/arm/bin/libarmSIM2.so
132+
/opt/iar/cxarm/arm/bin/libarmproc.so
133+
/opt/iar/cxarm/arm/bin/libarmsim2.so
133134
--plugin=/opt/iar/cxarm/arm/bin/libarmLibsupportUniversal.so
134135
# The target executable (built with debug information)
135136
--debug_file=$<TARGET_FILE:tutorial>

tutorial/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ target_sources(tutorial PRIVATE tutorial.c)
1212

1313
# compiler options
1414
target_compile_options(tutorial PRIVATE
15-
--dlib_config full
15+
--dlib_config=full
1616
--cpu=cortex-m4)
1717

1818
# linker options

tutorial/bxarm.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Toolchain File for the IAR C/C++ Compiler
1+
# Toolchain File for the IAR C/C++ Compiler (BX)
22

33
# Set CMake for cross-compiling
44
set(CMAKE_SYSTEM_NAME Generic)

tutorial/ewarm.cmake

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# Toolchain File for the IAR C/C++ Compiler
1+
# Toolchain File for the IAR C/C++ Compiler (EW)
22

33
# Set CMake for cross-compiling
44
set(CMAKE_SYSTEM_NAME Generic)
55

66
# Set CMake to use the IAR C/C++ Compiler from the IAR Embedded Workbench for Arm
77
# Update the paths if using any different supported target/version
8-
set(CMAKE_ASM_COMPILER "C:/iar/ewarm-9.60.4/arm/bin/iasmarm.exe")
9-
set(CMAKE_C_COMPILER "C:/iar/ewarm-9.60.4/arm/bin/iccarm.exe")
10-
set(CMAKE_CXX_COMPILER "C:/iar/ewarm-9.60.4/arm/bin/iccarm.exe")
8+
set(CMAKE_ASM_COMPILER "C:/iar/ewarm-9.70.2/arm/bin/iasmarm.exe")
9+
set(CMAKE_C_COMPILER "C:/iar/ewarm-9.70.2/arm/bin/iccarm.exe")
10+
set(CMAKE_CXX_COMPILER "C:/iar/ewarm-9.70.2/arm/bin/iccarm.exe")
1111

1212
# Avoids running the linker during try_compile()
1313
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
@@ -21,6 +21,6 @@ if(CMAKE_GENERATOR MATCHES "^Ninja.*$")
2121
find_program(CMAKE_MAKE_PROGRAM
2222
NAMES ninja.exe
2323
PATHS $ENV{PATH}
24-
"C:/iar/ewarm-9.60.4/common/bin"
24+
"C:/iar/ewarm-9.70.2/common/bin"
2525
REQUIRED)
2626
endif()

0 commit comments

Comments
 (0)