@@ -16,7 +16,8 @@ commands:
16
16
"arm-gcc": "https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v13.2.1-1.1/xpack-arm-none-eabi-gcc-13.2.1-1.1-linux-x64.tar.gz",
17
17
"msp430-gcc": "http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/9_2_0_0/export/msp430-gcc-9.2.0.50_linux64.tar.bz2",
18
18
"riscv-gcc": "https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v13.2.0-2/xpack-riscv-none-elf-gcc-13.2.0-2-linux-x64.tar.gz",
19
- "rx-gcc": "https://llvm-gcc-renesas.com/downloads/get.php?f=rx/8.3.0.202004-gnurx/gcc-8.3.0.202004-GNURX-ELF.run"
19
+ "rx-gcc": "https://llvm-gcc-renesas.com/downloads/get.php?f=rx/8.3.0.202004-gnurx/gcc-8.3.0.202004-GNURX-ELF.run",
20
+ "arm-iar": "https://updates.iar.com/FileStore/STANDARD/001/003/322/cxarm-9.60.3.deb"
20
21
}'
21
22
toolchain_url=$(echo $TOOLCHAIN_JSON | jq -r '.["<< parameters.toolchain >>"]')
22
23
@@ -38,18 +39,26 @@ commands:
38
39
# download if folder does not exist (not cached)
39
40
if [ ! -d ~/cache/<< parameters.toolchain >> ]; then
40
41
mkdir -p ~/cache/<< parameters.toolchain >>
41
- wget --progress=dot:giga $toolchain_url -O toolchain.tar.gz
42
42
if [[ << parameters.toolchain >> == rx-gcc ]]; then
43
- mv toolchain.tar.gz toolchain.run
43
+ wget --progress=dot:giga $toolchain_url -O toolchain.run
44
44
chmod +x toolchain.run
45
45
./toolchain.run -p ~/cache/<< parameters.toolchain >>/gnurx -y
46
+ elif [[ << parameters.toolchain >> == arm-iar ]]; then
47
+ wget --progress=dot:giga $toolchain_url -O ~/cache/<< parameters.toolchain >>/toolchain.deb
46
48
else
49
+ wget --progress=dot:giga $toolchain_url -O toolchain.tar.gz
47
50
tar -C ~/cache/<< parameters.toolchain >> -xaf toolchain.tar.gz
48
51
fi
49
52
fi
50
53
51
54
# Add toolchain to PATH
52
- echo "export PATH=$PATH:`echo ~/cache/<< parameters.toolchain >>/*/bin`" >> $BASH_ENV
55
+ if [[ << parameters.toolchain >> == arm-iar ]]; then
56
+ # Install IAR since we only cache deb file
57
+ sudo dpkg --ignore-depends=libusb-1.0-0 -i ~/cache/<< parameters.toolchain >>/toolchain.deb
58
+ echo "export PATH=$PATH:/opt/iar/cxarm/arm/bin" >> $BASH_ENV
59
+ else
60
+ echo "export PATH=$PATH:`echo ~/cache/<< parameters.toolchain >>/*/bin`" >> $BASH_ENV
61
+ fi
53
62
54
63
- save_cache :
55
64
name : Save Toolchain Cache
@@ -110,6 +119,8 @@ commands:
110
119
# Toolchain option default is gcc
111
120
if [ << parameters.toolchain >> == arm-clang ]; then
112
121
TOOLCHAIN_OPTION="--toolchain clang"
122
+ elif [ << parameters.toolchain >> == arm-iar ]; then
123
+ TOOLCHAIN_OPTION="--toolchain iar"
113
124
elif [ << parameters.toolchain >> == arm-gcc ]; then
114
125
TOOLCHAIN_OPTION="--toolchain gcc"
115
126
fi
0 commit comments