Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for newer Arm GNU Toolchain versions #1043

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
gcc: ['10.3-2021.10']
gcc: ['13.2.Rel1']

steps:
- name: Install Arm GNU Toolchain (arm-none-eabi-gcc)
Expand All @@ -30,7 +30,7 @@ jobs:
${{ runner.os }}-pip-

- name: Checkout source files
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
gcc: ['10.3-2021.10']
gcc: ['13.2.Rel1']

steps:
- name: Install Arm GNU Toolchain (arm-none-eabi-gcc)
Expand All @@ -30,7 +30,7 @@ jobs:
${{ runner.os }}-pip-

- name: Checkout source files
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: windows-2019
strategy:
matrix:
gcc: ['10.3-2021.10']
gcc: ['13.2.Rel1']

steps:
- name: Install Arm GNU Toolchain (arm-none-eabi-gcc)
Expand All @@ -24,7 +24,7 @@ jobs:
${{ runner.os }}-pip-

- name: Checkout source files
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

Expand Down
6 changes: 3 additions & 3 deletions docs/DEVELOPERS-GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
* [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`. 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).
Expand Down
1 change: 1 addition & 0 deletions records/tools/gcc_arm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 20 additions & 2 deletions source/daplink/sdk_stub.c → source/daplink/stubs.c
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Loading