Skip to content

Commit 94cd2ba

Browse files
FintasticManRiksu9000
authored andcommitted
Update arm gcc toolchain to 11.2-2022.02
Updates the buildAndProgram doc and the docker image, which means GitHub Actions will also use the new toolchain.
1 parent ecb3cd3 commit 94cd2ba

2 files changed

Lines changed: 9 additions & 8 deletions

File tree

doc/buildAndProgram.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Build
22
## Dependencies
33
To build this project, you'll need:
4-
- A cross-compiler : [ARM-GCC (9-2020-q2-update)](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads/9-2020-q2-update)
4+
- A cross-compiler : [ARM-GCC (11.2-2022.02)](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/downloads)
55
- The NRF52 SDK 15.3.0 : [nRF-SDK v15.3.0](https://developer.nordicsemi.com/nRF5_SDK/nRF5_SDK_v15.x.x/nRF5_SDK_15.3.0_59ac345.zip)
66
- The Python 3 modules `cbor`, `intelhex`, `click` and `cryptography` modules for the `mcuboot` tool (see [requirements.txt](../tools/mcuboot/requirements.txt))
77
- To keep the system clean, you can install python modules into a python virtual environment (`venv`)
@@ -31,7 +31,7 @@ CMake configures the project according to variables you specify the command line
3131
3232
Variable | Description | Example|
3333
----------|-------------|--------|
34-
**ARM_NONE_EABI_TOOLCHAIN_PATH**|path to the toolchain directory|`-DARM_NONE_EABI_TOOLCHAIN_PATH=/home/jf/nrf52/gcc-arm-none-eabi-9-2020-q2-update/`|
34+
**ARM_NONE_EABI_TOOLCHAIN_PATH**|path to the toolchain directory|`-DARM_NONE_EABI_TOOLCHAIN_PATH=/home/jf/nrf52/gcc-arm-11.2-2022.02-x86_64-arm-none-eabi/`|
3535
**NRF5_SDK_PATH**|path to the NRF52 SDK|`-DNRF5_SDK_PATH=/home/jf/nrf52/Pinetime/sdk`|
3636
**USE_JLINK, USE_GDB_CLIENT and USE_OPENOCD**|Enable *JLink* mode, *GDB Client* (Black Magic Probe) mode or *OpenOCD* mode (set the one you want to use to `1`)|`-DUSE_JLINK=1`
3737
**CMAKE_BUILD_TYPE (\*)**| Build type (Release or Debug). Release is applied by default if this variable is not specified.|`-DCMAKE_BUILD_TYPE=Debug`

docker/build.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,20 @@ export BUILD_DIR="${BUILD_DIR:=$SOURCES_DIR/build}"
1212
export OUTPUT_DIR="${OUTPUT_DIR:=$SOURCES_DIR/build/output}"
1313

1414
export BUILD_TYPE=${BUILD_TYPE:=Release}
15-
export GCC_ARM_VER=${GCC_ARM_VER:="gcc-arm-none-eabi-9-2020-q2-update"}
15+
export GCC_ARM_VER=${GCC_ARM_VER:="11.2-2022.02"}
1616
export NRF_SDK_VER=${NRF_SDK_VER:="nRF5_SDK_15.3.0_59ac345"}
1717

1818
MACHINE="$(uname -m)"
1919
[[ "$MACHINE" == "arm64" ]] && MACHINE="aarch64"
2020

21+
export GCC_ARM_PATH="gcc-arm-$GCC_ARM_VER-$MACHINE-arm-none-eabi"
22+
2123
main() {
2224
local target="$1"
2325

2426
mkdir -p "$TOOLS_DIR"
2527

26-
[[ ! -d "$TOOLS_DIR/$GCC_ARM_VER" ]] && GetGcc
28+
[[ ! -d "$TOOLS_DIR/$GCC_ARM_PATH" ]] && GetGcc
2729
[[ ! -d "$TOOLS_DIR/$NRF_SDK_VER" ]] && GetNrfSdk
2830
[[ ! -d "$TOOLS_DIR/mcuboot" ]] && GetMcuBoot
2931

@@ -38,8 +40,7 @@ main() {
3840
}
3941

4042
GetGcc() {
41-
GCC_SRC="$GCC_ARM_VER-$MACHINE-linux.tar.bz"
42-
wget -q https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2020q2/$GCC_SRC -O - | tar -xj -C $TOOLS_DIR/
43+
wget -q https://developer.arm.com/-/media/Files/downloads/gnu/$GCC_ARM_VER/binrel/$GCC_ARM_PATH.tar.xz -O - | tar -xJ -C $TOOLS_DIR/
4344
}
4445

4546
GetMcuBoot() {
@@ -59,7 +60,7 @@ CmakeGenerate() {
5960
-B "$BUILD_DIR" \
6061
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
6162
-DUSE_OPENOCD=1 \
62-
-DARM_NONE_EABI_TOOLCHAIN_PATH="$TOOLS_DIR/$GCC_ARM_VER" \
63+
-DARM_NONE_EABI_TOOLCHAIN_PATH="$TOOLS_DIR/$GCC_ARM_PATH" \
6364
-DNRF5_SDK_PATH="$TOOLS_DIR/$NRF_SDK_VER" \
6465
-DBUILD_DFU=1
6566
}
@@ -72,4 +73,4 @@ CmakeBuild() {
7273
fi
7374
}
7475

75-
[[ $SOURCED == "false" ]] && main "$@" || echo "Sourced!"
76+
[[ $SOURCED == "false" ]] && main "$@" || echo "Sourced!"

0 commit comments

Comments
 (0)