Commit 90bb4428 authored by Jonatan Antoni's avatar Jonatan Antoni Committed by Sudan Landge
Browse files

Enable CoreValidation on CM52 with LLVM/Clang 19

parent 0c16bb3d
Loading
Loading
Loading
Loading
+8 −11
Original line number Diff line number Diff line
@@ -71,19 +71,16 @@ Currently, the following build configurations are provided:

## Prerequisites

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

- [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.22](https://artifacts.tools.arm.com/arm-compiler/6.22/45/)*
- [GCC Compiler 13.2.1](https://artifacts.keil.arm.com/arm-none-eabi-gcc/13.2.1/)*
- [Clang Compiler 18.1.3](https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/tag/release-18.1.3)*
- [Arm Virtual Hardware for Cortex-M based on FastModels 11.22.39](https://artifacts.keil.arm.com/avh/11.22.39/)*
The following tools are required to build and run the Core tests:

- [Arm Compiler 6.23](https://artifacts.tools.arm.com/arm-compiler/6.23/32/)*
- [GCC Compiler 14.2.1](https://artifacts.keil.arm.com/arm-none-eabi-gcc/14.2.1/)*
- [Clang Compiler 19.1.5](https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/tag/release-19.1.5)*
- [Python 3.9](https://www.python.org/downloads/)
- [LLVM FileCheck](https://github.com/llvm/llvm-project/releases/)
  - Ubuntu package `llvm-<version>-tools`
  - MacOS Homebrew formula `llvm`
    Symlink FileCheck binary `ln -s /opt/homebrew/opt/llvm/bin/FileCheck /opt/homebrew/bin`

The executables need to be present on the `PATH`.
For tools distributed via vcpkg (*) this can be achieved automatically:
@@ -126,7 +123,7 @@ GCC Cortex-M3 none 33/33

The summary lists the amount of test cases executed and passed.

## Analyse failing test cases
## Analyze failing test cases

In case of failing test cases, one can run a single test case with verbose output like this:

@@ -146,7 +143,7 @@ Testing Time: 0.10s
  Passed: 1
```

The output reveales wich commands are chained and their error output if any.
The output reveals which commands are chained and their error output if any.

Failing FileCheck requires in detail analysis of the `// CHECK` annotations in the test source file
against the `llvm-objdump` output of the test compilation.
+32 −32
Original line number Diff line number Diff line
@@ -791,38 +791,38 @@ class Toolchain_GCC(Toolchain):

class Toolchain_Clang(Toolchain):
    TARGET = {
        'CM0': 'thumbv6m-none-unknown-eabi',
        'CM0plus': 'thumbv6m-none-unknown-eabi',
        'CM3': 'thumbv7m-none-unknown-eabi',
        'CM4': 'thumbv7em-none-unknown-eabi',
        'CM4FP': 'thumbv7em-none-unknown-eabihf',
        'CM7': 'thumbv7em-none-unknown-eabi',
        'CM7SP': 'thumbv7em-none-unknown-eabihf',
        'CM7DP': 'thumbv7em-none-unknown-eabihf',
        'CM23': 'thumbv8m.base-none-unknown-eabi',
        'CM23S': 'thumbv8m.base-none-unknown-eabi',
        'CM23NS': 'thumbv8m.base-none-unknown-eabi',
        'CM33': 'thumbv8m.main-none-unknown-eabihf',
        'CM33S': 'thumbv8m.main-none-unknown-eabihf',
        'CM33NS': 'thumbv8m.main-none-unknown-eabihf',
        'CM35P': 'thumbv8m.main-none-unknown-eabihf',
        'CM35PS': 'thumbv8m.main-none-unknown-eabihf',
        'CM35PNS': 'thumbv8m.main-none-unknown-eabihf',
        'CM52': 'thumbv8.1m.main-none-unknown-eabihf',
        'CM52S': 'thumbv8.1m.main-none-unknown-eabihf',
        'CM52NS': 'thumbv8.1m.main-none-unknown-eabihf',
        'CM55': 'thumbv8.1m.main-none-unknown-eabihf',
        'CM55S': 'thumbv8.1m.main-none-unknown-eabihf',
        'CM55NS': 'thumbv8.1m.main-none-unknown-eabihf',
        'CM85': 'thumbv8.1m.main-none-unknown-eabihf',
        'CM85S': 'thumbv8.1m.main-none-unknown-eabihf',
        'CM85NS': 'thumbv8.1m.main-none-unknown-eabihf',
        'CA5': 'armv7-none-unknown-eabi',
        'CA5neon': 'armv7-none-unknown-eabihf',
        'CA7': 'armv7-none-unknown-eabi',
        'CA7neon': 'armv7-none-unknown-eabihf',
        'CA9': 'armv7-none-unknown-eabi',
        'CA9neon': 'armv7-none-unknown-eabihf'
        'CM0': 'thumbv6m-none-eabi',
        'CM0plus': 'thumbv6m-none-eabi',
        'CM3': 'thumbv7m-none-eabi',
        'CM4': 'thumbv7em-none-eabi',
        'CM4FP': 'thumbv7em-none-eabihf',
        'CM7': 'thumbv7em-none-eabi',
        'CM7SP': 'thumbv7em-none-eabihf',
        'CM7DP': 'thumbv7em-none-eabihf',
        'CM23': 'thumbv8m.base-none-eabi',
        'CM23S': 'thumbv8m.base-none-eabi',
        'CM23NS': 'thumbv8m.base-none-eabi',
        'CM33': 'thumbv8m.main-none-eabihf',
        'CM33S': 'thumbv8m.main-none-eabihf',
        'CM33NS': 'thumbv8m.main-none-eabihf',
        'CM35P': 'thumbv8m.main-none-eabihf',
        'CM35PS': 'thumbv8m.main-none-eabihf',
        'CM35PNS': 'thumbv8m.main-none-eabihf',
        'CM52': 'thumbv8.1m.main-none-eabihf',
        'CM52S': 'thumbv8.1m.main-none-eabihf',
        'CM52NS': 'thumbv8.1m.main-none-eabihf',
        'CM55': 'thumbv8.1m.main-none-eabihf',
        'CM55S': 'thumbv8.1m.main-none-eabihf',
        'CM55NS': 'thumbv8.1m.main-none-eabihf',
        'CM85': 'thumbv8.1m.main-none-eabihf',
        'CM85S': 'thumbv8.1m.main-none-eabihf',
        'CM85NS': 'thumbv8.1m.main-none-eabihf',
        'CA5': 'armv7-none-eabi',
        'CA5neon': 'armv7-none-eabihf',
        'CA7': 'armv7-none-eabi',
        'CA7neon': 'armv7-none-eabihf',
        'CA9': 'armv7-none-eabi',
        'CA9neon': 'armv7-none-eabihf'
    }
    OPTIMIZE = {
        'none': '-O1',
+2 −2
Original line number Diff line number Diff line
@@ -7,8 +7,8 @@ static volatile uint32_t b = 2u;

void ror() {
    // CHECK-LABEL: <ror>:
    // CHECK-THUMB: ror{{s|.w}} {{r[0-9]+}}, {{r[0-9]+}}
    // CHECK-ARM: ror {{r[0-9]+}}, {{r[0-9]+}}, {{r[0-9]+}}
    // CHECK-THUMB: ror{{ne|s|.w}} {{r[0-9]+}}, {{r[0-9]+}}
    // CHECK-ARM: {{ror|rorne}} {{r[0-9]+}}, {{r[0-9]+}}, {{r[0-9]+}}
    volatile uint32_t c = __ROR(a, b);
    // CHECK: {{(bx lr)|(pop {.*pc})}}
}
+9 −10
Original line number Diff line number Diff line
{
    "registries": [
        {
            "name": "arm",
            "kind": "artifact",
        "location": "https://artifacts.tools.arm.com/vcpkg-registry",
        "name": "arm"
            "location": "https://artifacts.tools.arm.com/vcpkg-registry"
        }
    ],
    "requires": {
      "arm:compilers/arm/armclang":"^6.22.0",
      "arm:compilers/arm/arm-none-eabi-gcc": "^13.2.1",
      "arm:compilers/arm/llvm-embedded": "^18.1.3"
        "arm:compilers/arm/armclang": "6.23.0",
        "arm:compilers/arm/arm-none-eabi-gcc": "14.2.1",
        "arm:compilers/arm/llvm-embedded": "19.1.5"
    }
}
 No newline at end of file
  
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@ layer:
  components:
    # [Cvendor::] Cclass [&Cbundle] :Cgroup [:Csub] [&Cvariant] [@[>=]Cversion]
    - component: ARM::CMSIS:CORE
    - component: Device:Startup
    - component: Device:Startup&C Startup
    - component: Device:IRQ Controller:GIC

  misc:
Loading