Skip to content

Commit

Permalink
build: Change default build toolchain to GNU (#83)
Browse files Browse the repository at this point in the history
Currently, the default build toolchain is ARMClang. However, with VS
Code devcontainers, only Arm GNU Toolchain is provided. Therefore, the
default toolchain is changed to GNU. The associated documentation is
also updated. In order to use the Arm Compiler for Embedded (ArmClang),
the toolchain needs to be installed in the devcontainer and an
additional argument `-TARMCLANG` must be passed while building the
example.

Signed-off-by: Chuyue Luo <[email protected]>
  • Loading branch information
chuyue-luo-arm authored Aug 27, 2024
1 parent d20b8f4 commit 60d21a4
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 5 deletions.
12 changes: 11 additions & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"${input:FRICertificatPath}",
"${input:FRIPrivateKeyPath}",
"${input:FRIBuildDirectory}",
"-TGNU",
"${input:FRIBuildToolchain}",
"${input:FRICleanBeforeBuild}"
],
"options": {
Expand Down Expand Up @@ -107,6 +107,16 @@
"description": "Where would you like the build directory to be?",
"default": "-pbuild"
},
{
"type": "pickString",
"id": "FRIBuildToolchain",
"description": "Which toolchain would you like to build with?",
"options": [
"-TGNU",
"-TARMCLANG"
],
"default": "-TGNU"
},
{
"type": "pickString",
"id": "FRITarget",
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ of FVP is supported by the FRI.

> Note:
The build script `./tools/scripts/build.sh` assumes
`Arm Compiler for Embedded (armclang)` by default, append the extra option
`--toolchain GNU` to build using Arm GNU Toolchain.
`Arm GNU Toolchain (arm-none-eabi-gcc)` by default, append the extra option
`--toolchain ARMCLANG` to build using Arm Compiler for Embedded Toolchain.

## Project organisation

Expand Down
14 changes: 13 additions & 1 deletion docs/development_environment/vscode_dev_env_build_and_debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,16 @@ to setup the needed python environment for VSI to work:

These options allow you to build reference applications.

> The Arm GNU Toolchain is provided with the container and is the default build
toolchain. If you wish to use the Arm Compiler for Embedded instead, you can
download it from its [official page](https://developer.arm.com/Tools%20and%20Software/Arm%20Compiler%20for%20Embedded).
Login is required for the download, and you will need a license in order to
run the toolchain once installed.
>
> This project has been tested with version *6.21* of the toolchain, which
is available as `r6p21-00rel0` from the *Revision* drop-down menu on the
download page after logging in.

* **Using generic vscode task:**
```
Command Palette (F1)
Expand All @@ -110,12 +120,14 @@ Command Palette (F1)
=> (Path to device certificate)
=> (Path to device private key)
=> (build directory path)
=> (build toolchain)
=> (clean build)
```

* **calling build script directly:**
```
./tools/scripts/build.sh <reference application name> --certificate_path <certificate pem's path>
./tools/scripts/build.sh <reference application name> --toolchain <GNU/ARMCLANG>
--certificate_path <certificate pem's path>
--private_key_path <private key pem's path> --target <target name>
--inference <inference engine> --audio <audio input>
```
Expand Down
1 change: 1 addition & 0 deletions release_changes/202408200942.change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build: Change default build toolchain to GNU
2 changes: 1 addition & 1 deletion tools/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ML_INFERENCE_ENGINE="ETHOS"
ETHOS_U_NPU_ID=""
ETHOS_U_NPU_NUM_MACS=""
AUDIO_SOURCE="ROM"
TOOLCHAIN="ARMCLANG"
TOOLCHAIN="GNU"
TOOLCHAIN_FILE=""
BUILD=1
CERTIFICATE_PATH=""
Expand Down

0 comments on commit 60d21a4

Please sign in to comment.