From c1779f964bda94ea7a01e35350c3ec28dfec41c4 Mon Sep 17 00:00:00 2001 From: Mathias Brossard Date: Fri, 4 Aug 2023 21:23:55 -0500 Subject: [PATCH 1/7] gcc: Support for Arm GNU Toolchain version 11.3 and later --- records/tools/gcc_arm.yaml | 1 + source/daplink/{sdk_stub.c => stubs.c} | 22 ++++++++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) rename source/daplink/{sdk_stub.c => stubs.c} (59%) diff --git a/records/tools/gcc_arm.yaml b/records/tools/gcc_arm.yaml index 3ca532e65c..76ecfbb0f8 100644 --- a/records/tools/gcc_arm.yaml +++ b/records/tools/gcc_arm.yaml @@ -30,6 +30,7 @@ tool_specific: - -Wl,-fatal-warnings - -Wl,--gc-sections - -Wl,--no-wchar-size-warning + - -Wl,--no-warn-rwx-segment - -Wl,--print-memory-usage pre_build_script: - tools/pre_build_script.py diff --git a/source/daplink/sdk_stub.c b/source/daplink/stubs.c similarity index 59% rename from source/daplink/sdk_stub.c rename to source/daplink/stubs.c index e9116a6360..238fbde9c6 100644 --- a/source/daplink/sdk_stub.c +++ b/source/daplink/stubs.c @@ -1,9 +1,9 @@ /** - * @file sdk_stub.c + * @file stubs.c * @brief * * DAPLink Interface Firmware - * Copyright (c) 2017-2017, ARM Limited, All Rights Reserved + * Copyright (c) 2017, 2023, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may @@ -25,3 +25,21 @@ __WEAK void sdk_init() { // Do nothing } + +/* + * Work-around for a link-time issue with Arm GNU Toolchain + * in version 11.3 and later. + */ +#ifdef __GNUC__ +#if ((__GNUC__ > 11) || \ + ((__GNUC__ == 11) && (__GNUC_MINOR__ >= 3))) +__WEAK void _close() {} +__WEAK void _fstat() {} +__WEAK void _getpid() {} +__WEAK void _isatty() {} +__WEAK void _kill() {} +__WEAK void _lseek() {} +__WEAK void _read() {} +__WEAK void _write() {} +#endif +#endif From 79f20b45ab1ec93c0c51f63e0333064482de287d Mon Sep 17 00:00:00 2001 From: Mathias Brossard Date: Fri, 4 Aug 2023 21:32:17 -0500 Subject: [PATCH 2/7] Github Actions: Update CI to use Arm GNU Toolchain version 12.2.Rel1 --- .github/workflows/linux.yml | 2 +- .github/workflows/pr.yml | 2 +- .github/workflows/windows.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 84b11919cb..5416802153 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - gcc: ['10.3-2021.10'] + gcc: ['12.2.Rel1'] steps: - name: Install Arm GNU Toolchain (arm-none-eabi-gcc) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index d9841156c6..6bea80cc1d 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - gcc: ['10.3-2021.10'] + gcc: ['12.2.Rel1'] steps: - name: Install Arm GNU Toolchain (arm-none-eabi-gcc) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 69a4cdbd7c..0ef0173663 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -7,7 +7,7 @@ jobs: runs-on: windows-2019 strategy: matrix: - gcc: ['10.3-2021.10'] + gcc: ['12.2.Rel1'] steps: - name: Install Arm GNU Toolchain (arm-none-eabi-gcc) From 0ae7ba9db42d93b8bb4e59c79193c487b45ec569 Mon Sep 17 00:00:00 2001 From: kkitayam <45088311+kkitayam@users.noreply.github.com> Date: Sat, 22 Jul 2023 21:15:30 +0900 Subject: [PATCH 3/7] gcc: Update link to gcc_arm toolchain --- docs/DEVELOPERS-GUIDE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/DEVELOPERS-GUIDE.md b/docs/DEVELOPERS-GUIDE.md index 7768d34965..df61195049 100644 --- a/docs/DEVELOPERS-GUIDE.md +++ b/docs/DEVELOPERS-GUIDE.md @@ -9,7 +9,7 @@ Install the necessary tools listed below. Skip any step where a compatible tool * Install [Python 3](https://www.python.org/downloads/) . Add to PATH. * Install [Git](https://git-scm.com/downloads) . Add to PATH. * Install a compiler: - * [GNU Arm Embedded Toolchain](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads) . This compiler will be identified as `gcc_arm`. It is recommended to use version `10.3-2021.10`. Versions 11.3 and later of GCC (Arm GNU Toolchain / `arm-none-eabi-gcc`) are known to require some changes to build (see [#1043](https://github.com/ARMmbed/DAPLink/pull/1043)). + * [Arm GNU Toolchain](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain) for AArch32 bare-metal target. This compiler will be identified as `gcc_arm`. * [Arm Compiler 6](https://developer.arm.com/tools-and-software/embedded/arm-compiler) . This compiler will be identified as `armclang`. Only supported on Linux and Windows. * [Keil MDK](https://developer.arm.com/tools-and-software/embedded/keil-mdk) or [Arm Compiler 5](https://developer.arm.com/tools-and-software/embedded/arm-compiler/downloads/legacy-compilers#arm-compiler-5). This compiler will be identified as `armcc`. Only supported on Linux and Windows. * Install `make` (tested with [GNU Make](https://www.gnu.org/software/make)). [CMake](https://cmake.org) can alternatively be used in conjunction with different implementations of `make` as well as [ninja](https://ninja-build.org). From 57d30aaf4df76b2634137707fa0ab126ad85c5a1 Mon Sep 17 00:00:00 2001 From: Mathias Brossard Date: Sat, 5 Aug 2023 16:55:55 -0500 Subject: [PATCH 4/7] gcc: Update GCC compiler version guidance --- docs/DEVELOPERS-GUIDE.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/DEVELOPERS-GUIDE.md b/docs/DEVELOPERS-GUIDE.md index df61195049..ea9acc8c14 100644 --- a/docs/DEVELOPERS-GUIDE.md +++ b/docs/DEVELOPERS-GUIDE.md @@ -6,10 +6,10 @@ DAPLink sources are compiled using `progen` (from [project-generator](https://gi Install the necessary tools listed below. Skip any step where a compatible tool already exists. -* Install [Python 3](https://www.python.org/downloads/) . Add to PATH. -* Install [Git](https://git-scm.com/downloads) . Add to PATH. +* Install [Python 3](https://www.python.org/downloads/). Add to PATH. +* Install [Git](https://git-scm.com/downloads). Add to PATH. * Install a compiler: - * [Arm GNU Toolchain](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain) for AArch32 bare-metal target. This compiler will be identified as `gcc_arm`. + * [Arm GNU Toolchain](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain) for AArch32 bare-metal target. This compiler will be identified as `gcc_arm`. It is recommended to use version `12.2.Rel1`. Support for building with versions 11.2 and earlier of GCC (GNU Arm Embedded Toolchain / `arm-none-eabi-gcc`) was some removed in [#1043](https://github.com/ARMmbed/DAPLink/pull/1043) because of incompatibilities. * [Arm Compiler 6](https://developer.arm.com/tools-and-software/embedded/arm-compiler) . This compiler will be identified as `armclang`. Only supported on Linux and Windows. * [Keil MDK](https://developer.arm.com/tools-and-software/embedded/keil-mdk) or [Arm Compiler 5](https://developer.arm.com/tools-and-software/embedded/arm-compiler/downloads/legacy-compilers#arm-compiler-5). This compiler will be identified as `armcc`. Only supported on Linux and Windows. * Install `make` (tested with [GNU Make](https://www.gnu.org/software/make)). [CMake](https://cmake.org) can alternatively be used in conjunction with different implementations of `make` as well as [ninja](https://ninja-build.org). From 3a04cf72782c71c15b8666203ac63f6f7aa42e7e Mon Sep 17 00:00:00 2001 From: Mathias Brossard Date: Sun, 6 Aug 2023 21:28:24 -0500 Subject: [PATCH 5/7] Github Actions: Update CI to use Arm GNU Toolchain version 12.3.Rel1 --- .github/workflows/linux.yml | 2 +- .github/workflows/pr.yml | 2 +- .github/workflows/windows.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 5416802153..277bd98293 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - gcc: ['12.2.Rel1'] + gcc: ['12.3.Rel1'] steps: - name: Install Arm GNU Toolchain (arm-none-eabi-gcc) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 6bea80cc1d..22e9cc4dc7 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - gcc: ['12.2.Rel1'] + gcc: ['12.3.Rel1'] steps: - name: Install Arm GNU Toolchain (arm-none-eabi-gcc) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 0ef0173663..b41a5e74fd 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -7,7 +7,7 @@ jobs: runs-on: windows-2019 strategy: matrix: - gcc: ['12.2.Rel1'] + gcc: ['12.3.Rel1'] steps: - name: Install Arm GNU Toolchain (arm-none-eabi-gcc) From 5fd34f696b16cf66cd45c4fbe465d146a58ef739 Mon Sep 17 00:00:00 2001 From: Mathias Brossard Date: Sun, 6 Aug 2023 21:49:37 -0500 Subject: [PATCH 6/7] Github Actions: Update to actions/checkout@v3 --- .github/workflows/linux.yml | 2 +- .github/workflows/pr.yml | 2 +- .github/workflows/windows.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 277bd98293..dc9954f79a 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -30,7 +30,7 @@ jobs: ${{ runner.os }}-pip- - name: Checkout source files - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 0 diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 22e9cc4dc7..0daa5d4f3d 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -30,7 +30,7 @@ jobs: ${{ runner.os }}-pip- - name: Checkout source files - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 0 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index b41a5e74fd..6c57947ccf 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -24,7 +24,7 @@ jobs: ${{ runner.os }}-pip- - name: Checkout source files - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 0 From 6cf8b1e69742f8da61c3c8ca7561cc4b431a9ddb Mon Sep 17 00:00:00 2001 From: Mathias Brossard Date: Sat, 10 Feb 2024 20:20:37 -0600 Subject: [PATCH 7/7] Github Actions: Update CI to use Arm GNU Toolchain version 13.2.Rel1 --- .github/workflows/linux.yml | 2 +- .github/workflows/pr.yml | 2 +- .github/workflows/windows.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index dc9954f79a..940e5c2f71 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - gcc: ['12.3.Rel1'] + gcc: ['13.2.Rel1'] steps: - name: Install Arm GNU Toolchain (arm-none-eabi-gcc) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 0daa5d4f3d..f64116ef90 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - gcc: ['12.3.Rel1'] + gcc: ['13.2.Rel1'] steps: - name: Install Arm GNU Toolchain (arm-none-eabi-gcc) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 6c57947ccf..9ca478f435 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -7,7 +7,7 @@ jobs: runs-on: windows-2019 strategy: matrix: - gcc: ['12.3.Rel1'] + gcc: ['13.2.Rel1'] steps: - name: Install Arm GNU Toolchain (arm-none-eabi-gcc)