Skip to content

Commit

Permalink
Fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
JonatanAntoni committed Oct 11, 2023
1 parent f0f90cc commit e28460d
Show file tree
Hide file tree
Showing 53 changed files with 241 additions and 121 deletions.
34 changes: 34 additions & 0 deletions .devcontainer/ubuntu-22.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FROM --platform=linux/amd64 ubuntu:22.04

SHELL ["/bin/bash", "-c"]

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update && \
apt-get -y install \
build-essential \
curl \
gdb \
less \
python3 \
python3-pip \
python-is-python3 \
git \
libtinfo5 \
llvm-15-tools \
unzip && \
ln -s /usr/bin/FileCheck-15 /usr/bin/FileCheck

RUN pip install \
lit \
python-matrix-runner

ADD vcpkg-configuration.json /root/

RUN pushd /root && \
. <(curl https://aka.ms/vcpkg-init.sh -L) && \
echo ". /root/.vcpkg/vcpkg-init" >> .bashrc && \
vcpkg x-update-registry --all && \
vcpkg activate

CMD ["/bin/bash"]
13 changes: 13 additions & 0 deletions .devcontainer/ubuntu-22.04/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "Ubuntu-22.04",
"build": { "dockerfile": "Dockerfile" },

"customizations": {
"vscode": {
"extensions": [
"ms-vscode.cpptools",
"ms-vscode.cpptools-extension-pack"
]
}
}
}
23 changes: 23 additions & 0 deletions .devcontainer/ubuntu-22.04/vcpkg-configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"registries": [
{
"kind": "artifact",
"location": "https://aka.ms/vcpkg-ce-default",
"name": "microsoft"
},
{
"kind": "artifact",
"location": "https://artifacts.keil.arm.com/vcpkg-ce-registry/registry.zip",
"name": "arm"
}
],
"requires": {
"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/llvm-embedded": "^17.0.1-0",
"arm:tools/open-cmsis-pack/cmsis-toolbox": "^2.1.0-0",
"arm:models/arm/avh": "^11.21.15"
}
}

17 changes: 1 addition & 16 deletions .github/workflows/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,27 +36,12 @@ jobs:
vcpkg-${{ runner.os }}-${{ runner.arch }}-
path: /home/runner/.vcpkg

- name: Cache LLVM/Clang 17.0.0-devdrop0
uses: actions/cache@v3
with:
key: clang-17.0.0-devdrop0-${{ runner.os }}-${{ runner.arch }}-${{ github.run_id }}
restore-keys: |
clang-17.0.0-devdrop0-${{ runner.os }}-${{ runner.arch }}-
clang-17.0.0-devdrop0
path: /home/runner/LLVMEmbeddedToolchainForArm-17.0.0-Linux-x86_64

- name: Install LLVM/Clang 17.0.0-devdrop0
- name: Install LLVM dependencies and tools
working-directory: /home/runner
run: |
sudo apt-get update
sudo apt-get install libtinfo5 llvm-15-tools
sudo ln -s /usr/bin/FileCheck-15 /usr/bin/FileCheck
if [[ ! -d LLVMEmbeddedToolchainForArm-17.0.0-Linux-x86_64 ]]; then
wget https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/preview-17.0.0-devdrop0/LLVMEmbeddedToolchainForArm-17.0.0-Linux-x86_64.tar.xz
tar -xf LLVMEmbeddedToolchainForArm-17.0.0-Linux-x86_64.tar.xz
fi
./LLVMEmbeddedToolchainForArm-17.0.0-Linux-x86_64/bin/clang --version
echo "CLANG_TOOLCHAIN_17_0_0=$(pwd)/LLVMEmbeddedToolchainForArm-17.0.0-Linux-x86_64/bin" >> $GITHUB_ENV
- name: Prepare vcpkg env
working-directory: ./CMSIS/Core/Test
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,21 @@ CMSIS/Documentation/
CMSIS/DoxyGen/**/*.dxy
CMSIS/Core/Test/*.o
CMSIS/Core/Test/*.xunit
CMSIS/Core/Test/.lit_test_times.txt
CMSIS/CoreValidation/Project/*.zip
CMSIS/CoreValidation/Project/*.junit
CMSIS/CoreValidation/Project/*.clangd
CMSIS/CoreValidation/Project/Validation.*/
CMSIS/CoreValidation/Project/Bootloader.*/
CMSIS/CoreValidation/Project/build
CMSIS/CoreValidation/Project/RTE/_**/*
*.cbuild-idx.yml
*.uvguix.*
*.uvmpw.uvgui.*
*.zip
*.bak
build
output
linkchecker-out.csv
.DS_STORE
.DS_STORE
*.tmp
2 changes: 1 addition & 1 deletion CMSIS/Core/Test/apsr.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// REQUIRES: thumbv6m
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump --mcpu=%mcpu% -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s

#include "cmsis_compiler.h"

Expand Down
2 changes: 1 addition & 1 deletion CMSIS/Core/Test/basepri.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// REQUIRES: thumb-2, thumbv7m
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump --mcpu=%mcpu% -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s

#include "cmsis_compiler.h"

Expand Down
4 changes: 2 additions & 2 deletions CMSIS/Core/Test/bkpt.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump --mcpu=%mcpu% -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s

#include "cmsis_compiler.h"

void bkpt() {
// CHECK-LABEL: <bkpt>:
// CHECK: bkpt #0x15
// CHECK: bkpt {{#0x15|#21}}
__BKPT(0x15);
// CHECK: bx lr
}
12 changes: 7 additions & 5 deletions CMSIS/Core/Test/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,18 @@ class DeviceAxis(Enum):
CM35P = ('Cortex-M35P', 'CM35P')
CM35PS = ('Cortex-M35PS', 'CM35PS')
CM35PNS = ('Cortex-M35PNS', 'CM35PNS')
CM55 = ('Cortex-M55', 'CM55')
CM55S = ('Cortex-M55S', 'CM55S')
CM55NS = ('Cortex-M55NS', 'CM55NS')
CM85 = ('Cortex-M85', 'CM85')
CM85S = ('Cortex-M85S', 'CM85S')
CM85NS = ('Cortex-M85NS', 'CM85NS')
CA5 = ('Cortex-A5', 'CA5')
CA7 = ('Cortex-A7', 'CA7')
CA9 = ('Cortex-A9', 'CA9')
# CA5NEON = ('Cortex-A5neon', 'CA5neon')
# CA7NEON = ('Cortex-A7neon', 'CA7neon')
# CA9NEON = ('Cortex-A9neon', 'CA9neon')
CA5NEON = ('Cortex-A5neon', 'CA5neon')
CA7NEON = ('Cortex-A7neon', 'CA7neon')
CA9NEON = ('Cortex-A9neon', 'CA9neon')


@matrix_axis("compiler", "c", "Compiler(s) to be considered.")
Expand Down Expand Up @@ -75,8 +77,8 @@ def filter_iar(config):
return config.compiler == CompilerAxis.IAR

@matrix_filter
def filter_clang_v8m(config):
return config.compiler == CompilerAxis.CLANG and config.device.match('CM[2358][35]*S')
def filter_gcc_cm85(config):
return config.compiler == CompilerAxis.GCC and config.device.match('CM85*')


@matrix_filter
Expand Down
2 changes: 1 addition & 1 deletion CMSIS/Core/Test/clrex.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// REQUIRES: ldrex
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump --mcpu=%mcpu% -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s

#include "cmsis_compiler.h"

Expand Down
2 changes: 1 addition & 1 deletion CMSIS/Core/Test/clz.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// REQUIRES: clz
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump --mcpu=%mcpu% -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s

#include "cmsis_compiler.h"

Expand Down
2 changes: 1 addition & 1 deletion CMSIS/Core/Test/control.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// REQUIRES: thumbv6m
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump --mcpu=%mcpu% -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s

#include "cmsis_compiler.h"

Expand Down
2 changes: 1 addition & 1 deletion CMSIS/Core/Test/dmb.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump --mcpu=%mcpu% -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s

#include "cmsis_compiler.h"

Expand Down
2 changes: 1 addition & 1 deletion CMSIS/Core/Test/dsb.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump --mcpu=%mcpu% -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s

#include "cmsis_compiler.h"

Expand Down
2 changes: 1 addition & 1 deletion CMSIS/Core/Test/fault_irq.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// REQUIRES: thumb-2
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump --mcpu=%mcpu% -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s

#include "cmsis_compiler.h"

Expand Down
2 changes: 1 addition & 1 deletion CMSIS/Core/Test/faultmask.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// REQUIRES: thumb-2, thumbv7m
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump --mcpu=%mcpu% -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s

#include "cmsis_compiler.h"

Expand Down
2 changes: 1 addition & 1 deletion CMSIS/Core/Test/fpscr.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// REQUIRES: fpu
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump --triple=%triple% -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump --mcpu=%mcpu% -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s

#include "cmsis_compiler.h"

Expand Down
4 changes: 2 additions & 2 deletions CMSIS/Core/Test/fpscr_nofp.c
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// UNSUPPORTED: fpu
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump --triple=%triple% -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump --mcpu=%mcpu% -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s

#include "cmsis_compiler.h"

void get_fpscr() {
// CHECK-LABEL: <get_fpscr>:
// CHECK-NOT: vmrs {{r[0-9]+}}, fpscr
// CHECK: movs {{r[0-9]+}}, #0x0
// CHECK: movs {{r[0-9]+}}, #0
volatile uint32_t result = __get_FPSCR();
// CHECK: bx lr
}
Expand Down
2 changes: 1 addition & 1 deletion CMSIS/Core/Test/ipsr.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// REQUIRES: thumbv6m
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump --mcpu=%mcpu% -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s

#include "cmsis_compiler.h"

Expand Down
2 changes: 1 addition & 1 deletion CMSIS/Core/Test/irq.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump --mcpu=%mcpu% -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s

#include "cmsis_compiler.h"

Expand Down
2 changes: 1 addition & 1 deletion CMSIS/Core/Test/isb.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump --mcpu=%mcpu% -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s

#include "cmsis_compiler.h"

Expand Down
2 changes: 1 addition & 1 deletion CMSIS/Core/Test/lda.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// REQUIRES: armv8m
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump --mcpu=%mcpu% -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s

#include "cmsis_compiler.h"

Expand Down
2 changes: 1 addition & 1 deletion CMSIS/Core/Test/ldaex.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// REQUIRES: armv8m
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump --mcpu=%mcpu% -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s

#include "cmsis_compiler.h"

Expand Down
2 changes: 1 addition & 1 deletion CMSIS/Core/Test/ldrex.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// REQUIRES: ldrex
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump --mcpu=%mcpu% -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s

#include "cmsis_compiler.h"

Expand Down
2 changes: 1 addition & 1 deletion CMSIS/Core/Test/ldrt.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// REQUIRES: thumb-2
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump --mcpu=%mcpu% -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s

#include "cmsis_compiler.h"

Expand Down
Loading

0 comments on commit e28460d

Please sign in to comment.