Skip to content

Commit

Permalink
Update GCC to version 13.2.1
Browse files Browse the repository at this point in the history
- Enable tests for Cortex-M85 on GCC
- Cleanup test scripts
- Enable test execution for all available FVP AVH models
- Update README.md for CoreValidation
  • Loading branch information
JonatanAntoni committed Nov 27, 2023
1 parent ba954f7 commit f44ff7b
Show file tree
Hide file tree
Showing 11 changed files with 64 additions and 124 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/ubuntu-22.04/vcpkg-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"microsoft:tools/kitware/cmake": "^3.25.2",
"microsoft:ninja": "^1.10.2",
"arm:compilers/arm/armclang":"^6.20.0",
"arm:compilers/arm/arm-none-eabi-gcc": "^12.2.1-0",
"arm:compilers/arm/arm-none-eabi-gcc": "^13.2.1",
"arm:compilers/arm/llvm-embedded": "^17.0.1-0",
"arm:tools/open-cmsis-pack/cmsis-toolbox": "^2.1.0-0",
"arm:models/arm/avh-fvp": "^11.22.39",
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/corevalidation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:
cpackget add /home/runner/Cortex_DFP/ARM.Cortex_DFP.pdsc
echo "Build test projects ..."
./build.py --verbose -m FVP -c ${{ matrix.compiler }} build || echo "::warning::=== Some configurations failed to build! ==="
./build.py --verbose -c ${{ matrix.compiler }} build || echo "::warning::=== Some configurations failed to build! ==="
- name: Perform CodeQL Analysis
if: ${{ !cancelled() && matrix.compiler == 'GCC' }}
Expand All @@ -123,7 +123,7 @@ jobs:
vcpkg activate
echo "Run test projects ..."
./build.py --verbose -m FVP -c ${{ matrix.compiler }} -d "CM[047]*" -d "CM3" -d "CM[23]3*" run || echo "::warning::==== Some configurations failed to run! ==="
./build.py --verbose -c ${{ matrix.compiler }} -d "CM*" run || echo "::warning::==== Some configurations failed to run! ==="

- name: Deactivate Arm tool license
if: always()
Expand Down
6 changes: 3 additions & 3 deletions CMSIS/Core/Test/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class CompilerAxis(Enum):
IAR = ('IAR')
CLANG = ('Clang')


@matrix_axis("optimize", "o", "Optimization level(s) to be considered.")
class OptimizationAxis(Enum):
NONE = ('none')
Expand All @@ -67,17 +68,16 @@ def lit(config):
def timestamp():
return datetime.now().strftime('%Y%m%d%H%M%S')


@matrix_command()
def run_lit(toolchain, device, optimize):
return ["lit", "--xunit-xml-output", f"lit-{toolchain}-{optimize}-{device}.xunit", "-D", f"toolchain={toolchain}", "-D", f"device={device}", "-D", f"optimize={optimize}", "." ]


@matrix_filter
def filter_iar(config):
return config.compiler == CompilerAxis.IAR

@matrix_filter
def filter_gcc_cm85(config):
return config.compiler == CompilerAxis.GCC and config.device.match('CM85*')

if __name__ == "__main__":
main()
2 changes: 1 addition & 1 deletion CMSIS/Core/Test/vcpkg-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
],
"requires": {
"arm:compilers/arm/armclang":"^6.20.0",
"arm:compilers/arm/arm-none-eabi-gcc": "^12.2.1-0",
"arm:compilers/arm/arm-none-eabi-gcc": "^13.2.1",
"arm:compilers/arm/llvm-embedded": "^17.0.1-0"
}
}
Expand Down
38 changes: 0 additions & 38 deletions CMSIS/CoreValidation/Project/avh.yml

This file was deleted.

60 changes: 25 additions & 35 deletions CMSIS/CoreValidation/Project/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,36 +102,31 @@ class OptimizationAxis(Enum):
SIZE = ('size')


@matrix_axis("model", "m", "Model variant(s) to be considered.")
class ModelAxis(Enum):
VHT = ('VHT')
FVP = ('FVP')

MODEL_EXECUTABLE = {
DeviceAxis.CM0: ("_MPS2_Cortex-M0", []),
DeviceAxis.CM0plus: ("_MPS2_Cortex-M0plus", []),
DeviceAxis.CM3: ("_MPS2_Cortex-M3", []),
DeviceAxis.CM4: ("_MPS2_Cortex-M4", []),
DeviceAxis.CM4FP: ("_MPS2_Cortex-M4", []),
DeviceAxis.CM7: ("_MPS2_Cortex-M7", []),
DeviceAxis.CM7DP: ("_MPS2_Cortex-M7", []),
DeviceAxis.CM7SP: ("_MPS2_Cortex-M7", []),
DeviceAxis.CM23: ("_MPS2_Cortex-M23", []),
DeviceAxis.CM23S: ("_MPS2_Cortex-M23", []),
DeviceAxis.CM23NS: ("_MPS2_Cortex-M23", []),
DeviceAxis.CM33: ("_MPS2_Cortex-M33", []),
DeviceAxis.CM33S: ("_MPS2_Cortex-M33", []),
DeviceAxis.CM33NS: ("_MPS2_Cortex-M33", []),
DeviceAxis.CM35P: ("_MPS2_Cortex-M35P", []),
DeviceAxis.CM35PS: ("_MPS2_Cortex-M35P", []),
DeviceAxis.CM35PNS: ("_MPS2_Cortex-M35P", []),
DeviceAxis.CM55S: ("_MPS2_Cortex-M55", []),
DeviceAxis.CM55NS: ("_MPS2_Cortex-M55", []),
DeviceAxis.CM85S: ("_MPS2_Cortex-M85", []),
DeviceAxis.CM85NS: ("_MPS2_Cortex-M85", []),
DeviceAxis.CA5: ("_VE_Cortex-A5x1", []),
DeviceAxis.CA7: ("_VE_Cortex-A7x1", []),
DeviceAxis.CA9: ("_VE_Cortex-A9x1", []),
DeviceAxis.CM0: ("FVP_MPS2_Cortex-M0", []),
DeviceAxis.CM0plus: ("FVP_MPS2_Cortex-M0plus", []),
DeviceAxis.CM3: ("FVP_MPS2_Cortex-M3", []),
DeviceAxis.CM4: ("FVP_MPS2_Cortex-M4", []),
DeviceAxis.CM4FP: ("FVP_MPS2_Cortex-M4", []),
DeviceAxis.CM7: ("FVP_MPS2_Cortex-M7", []),
DeviceAxis.CM7DP: ("FVP_MPS2_Cortex-M7", []),
DeviceAxis.CM7SP: ("FVP_MPS2_Cortex-M7", []),
DeviceAxis.CM23: ("FVP_MPS2_Cortex-M23", []),
DeviceAxis.CM23S: ("FVP_MPS2_Cortex-M23", []),
DeviceAxis.CM23NS: ("FVP_MPS2_Cortex-M23", []),
DeviceAxis.CM33: ("FVP_MPS2_Cortex-M33", []),
DeviceAxis.CM33S: ("FVP_MPS2_Cortex-M33", []),
DeviceAxis.CM33NS: ("FVP_MPS2_Cortex-M33", []),
DeviceAxis.CM35P: ("FVP_MPS2_Cortex-M35P", []),
DeviceAxis.CM35PS: ("FVP_MPS2_Cortex-M35P", []),
DeviceAxis.CM35PNS: ("FVP_MPS2_Cortex-M35P", []),
DeviceAxis.CM55S: ("FVP_MPS2_Cortex-M55", []),
DeviceAxis.CM55NS: ("FVP_MPS2_Cortex-M55", []),
DeviceAxis.CM85S: ("FVP_MPS2_Cortex-M85", []),
DeviceAxis.CM85NS: ("FVP_MPS2_Cortex-M85", []),
DeviceAxis.CA5: ("FVP_VE_Cortex-A5x1", []),
DeviceAxis.CA7: ("FVP_VE_Cortex-A7x1", []),
DeviceAxis.CA9: ("FVP_VE_Cortex-A9x1", []),
# DeviceAxis.CA5NEON: ("_VE_Cortex-A5x1", []),
# DeviceAxis.CA7NEON: ("_VE_Cortex-A7x1", []),
# DeviceAxis.CA9NEON: ("_VE_Cortex-A9x1", [])
Expand Down Expand Up @@ -245,7 +240,7 @@ def cbuild(config):
f"{result.command.config.device}."
f"{title}"))
def model_exec(config):
cmdline = [f"{config.model}{MODEL_EXECUTABLE[config.device][0]}", "-q", "--simlimit", 100, "-f", model_config(config)]
cmdline = [MODEL_EXECUTABLE[config.device][0], "-q", "--simlimit", 100, "-f", model_config(config)]
cmdline += MODEL_EXECUTABLE[config.device][1]
cmdline += ["-a", f"{build_dir(config)}/{output_dir(config)}/Validation.{config.compiler.image_ext}"]
if config.device.has_bl():
Expand All @@ -258,10 +253,5 @@ def filter_iar(config):
return config.compiler == CompilerAxis.IAR


@matrix_filter
def filter_gcc_cm85(config):
return config.compiler == CompilerAxis.GCC and config.device.match('CM85*')


if __name__ == "__main__":
main()
1 change: 0 additions & 1 deletion CMSIS/CoreValidation/Project/cpacklist.txt

This file was deleted.

2 changes: 1 addition & 1 deletion CMSIS/CoreValidation/Project/vcpkg-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"microsoft:tools/kitware/cmake": "^3.25.2",
"microsoft:ninja": "^1.10.2",
"arm:compilers/arm/armclang":"^6.20.0",
"arm:compilers/arm/arm-none-eabi-gcc": "^12.2.1-0",
"arm:compilers/arm/arm-none-eabi-gcc": "^13.2.1",
"arm:compilers/arm/llvm-embedded": "^17.0.1-0",
"arm:tools/open-cmsis-pack/cmsis-toolbox": "^2.1.0-0",
"arm:models/arm/avh-fvp": "^11.22.39",
Expand Down
69 changes: 29 additions & 40 deletions CMSIS/CoreValidation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Currently, the following build configurations are provided:
1. Compiler
- Arm Compiler 6 (AC6)
- GNU Compiler (GCC)
- IAR Compiler (IAR)
- LLVM/Clang (Clang)
2. Devices
- Cortex-M0
- Cortex-M0+
Expand Down Expand Up @@ -56,46 +56,35 @@ Currently, the following build configurations are provided:
- Cortex-A9
- w/o NEON extensions
3. Optimization Levels
- Low
- AC6: `-O1`
- GCC: `-O1`
- IAR: `-Ol`
- Mid
- AC6: `-O2`
- GCC: `-O2`
- IAR: `-Om`
- High
- AC6: `-O3`
- GCC: `-O3`
- IAR: `-Oh`
- Size
- AC6: `-Os`
- GCC: `-Os`
- IAR: `-Ohz`
- Tiny
- AC6: `-Oz`
- GCC: `-Ofast`
- IAR: `-Ohs`
- none
- balanced
- size
- speed

## Prerequisites

The following tools are required to build and run the CoreValidation tests:

- [CMSIS-Toolbox](https://github.com/Open-CMSIS-Pack/cmsis-toolbox/releases) 1.3.0 or higher
- CMake
- Ninja build
- Arm Compiler 6
- GNU Compiler
- IAR Compiler
- Python 3.8 or higher
- Arm Virtual Hardware Models
- [CMSIS-Toolbox 2.1.0](https://artifacts.keil.arm.com/cmsis-toolbox/2.1.0/)*
- [CMake 3.25.2](https://cmake.org/download/)*
- [Ninja 1.10.2](https://github.com/ninja-build/ninja/releases)*
- [Arm Compiler 6.20](https://artifacts.keil.arm.com/arm-compiler/6.20/21/)*
- [GCC Compiler 13.2.1](https://artifacts.keil.arm.com/arm-none-eabi-gcc/13.2.1/)*
- [Clang Compiler 17.0.1](https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/tag/release-17.0.1)*
- [Arm Virtual Hardware for Cortex-M based on FastModels 11.22.39](https://artifacts.keil.arm.com/avh/11.22.39/)*
- [Python 3.9](https://www.python.org/downloads/)

The executables need to be present on the `PATH`.
For tools distributed via vcpkg (*) this can be achieved automatically:

```bash
./CMSIS/CoreValidation/Project $ vcpkg activate
```

Install the Python packages required by `build.py`:

```bash
CMSIS_5/CMSIS/CoreValidation/Project $ pip install -r requirements.txt
./CMSIS/CoreValidation/Project $ pip install -r requirements.txt
```

## Build and run
Expand All @@ -104,29 +93,29 @@ To build and run the CoreValidation tests for one or more configurations use the
Select the `<compiler>`, `<device>`, and `optimize` level to `build` and `run` for.

```bash
CMSIS_5/CMSIS/CoreValidation/Project $ ./build.py -c <compiler> -d <device> -o <optimize> [build] [run]
./CMSIS/CoreValidation/Project $ ./build.py -c <compiler> -d <device> -o <optimize> [build] [run]
```

For example, build and run the tests using GCC for Cortex-M3 with low optimization, execute:

```bash
CMSIS_5/CMSIS/CoreValidation/Project $ ./build.py -c GCC -d CM3 -o low build run
[GCC][Cortex-M3][low](build:csolution) csolution convert -s Validation.csolution.yml -c Validation.GCC_low+CM3
[GCC][Cortex-M3][low](build:csolution) csolution succeeded with exit code 0
[GCC][Cortex-M3][low](build:cbuild) cbuild Validation.GCC_low+CM3/Validation.GCC_low+CM3.cprj
[GCC][Cortex-M3][low](build:cbuild) cbuild succeeded with exit code 0
[GCC][Cortex-M3][low](run:model_exec) VHT_MPS2_Cortex-M3 -q --simlimit 100 -f ../Layer/Target/CM3/model_config.txt -a Validation.GCC_low+CM3/Validation.GCC_low+CM3_outdir/Validation.GCC_low+CM3.elf
[GCC][Cortex-M3][low](run:model_exec) VHT_MPS2_Cortex-M3 succeeded with exit code 0
./CMSIS/CoreValidation/Project $ ./build.py -c GCC -d CM3 -o none build run
[GCC][Cortex-M3][none](build:csolution) csolution convert -s Validation.csolution.yml -c Validation.GCC_low+CM3
[GCC][Cortex-M3][none](build:csolution) csolution succeeded with exit code 0
[GCC][Cortex-M3][none](build:cbuild) cbuild Validation.GCC_low+CM3/Validation.GCC_low+CM3.cprj
[GCC][Cortex-M3][none](build:cbuild) cbuild succeeded with exit code 0
[GCC][Cortex-M3][none](run:model_exec) VHT_MPS2_Cortex-M3 -q --simlimit 100 -f ../Layer/Target/CM3/model_config.txt -a Validation.GCC_low+CM3/Validation.GCC_low+CM3_outdir/Validation.GCC_low+CM3.elf
[GCC][Cortex-M3][none](run:model_exec) VHT_MPS2_Cortex-M3 succeeded with exit code 0

Matrix Summary
==============

compiler device optimize build clean extract run
---------- --------- ---------- ------- ------- --------- -----
GCC Cortex-M3 low success (skip) (skip) 35/35
GCC Cortex-M3 none success (skip) (skip) 35/35
```

The full test report is written to `Core_Validation-GCC-low-CM3-<timestamp>.junit` file.
The full test report is written to `Core_Validation-GCC-none-CM3-<timestamp>.junit` file.

## License

Expand Down
2 changes: 1 addition & 1 deletion CMSIS/Documentation/Doxygen/Core/src/mainpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,5 @@ The \ref cmsis_core_files delivered with this CMSIS-Core release have been teste

- Arm Compiler for Embedded 6.20
- IAR C/C++ Compiler for Arm 9.40
- GNU Arm Embedded Toolchain 12.2.1
- GNU Arm Embedded Toolchain 13.2.1
- LLVM/Clang 17.0.1
2 changes: 1 addition & 1 deletion CMSIS/Documentation/Doxygen/Core_A/src/mainpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ The \ref templates_pg delivered with this CMSIS-Core release have been tested an

- Arm Compiler for Embedded 6.20
- IAR C/C++ Compiler for Arm 9.40
- GNU Arm Embedded Toolchain 12.2.1
- GNU Arm Embedded Toolchain 13.2.1
- LLVM/Clang 17.0.1

0 comments on commit f44ff7b

Please sign in to comment.