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

targets: thumbv8m.main (M33) #49

Merged
merged 2 commits into from
Jun 30, 2024
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
fail-fast: false
matrix:
zephyr_version: [3.4.0, 2.7.3, 2.6.0, 2.5.0, 2.4.0, 2.3.0]
board: [qemu_x86, qemu_cortex_m3, qemu_cortex_r5, native_posix, qemu_riscv32, qemu_riscv64]
board: [qemu_x86, qemu_cortex_m3, qemu_cortex_r5, nucleo_l552ze_q, native_posix, qemu_riscv32, qemu_riscv64]
test: [samples/rust-app, samples/no_std, samples/serial]
exclude:
- board: qemu_riscv32
Expand Down
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ elseif(${ARCH} STREQUAL "arm")
set(rust_target thumbv7em-zephyr-eabi)
set(clang_target thumbv7em-unknown-none-eabi)
endif()
elseif(CONFIG_ARMV8_M_MAINLINE)
if(CONFIG_FPU)
set(rust_target thumbv8m.main-zephyr-eabihf)
set(clang_target thumbv8m.main-unknown-none-eabihf)
else()
set(rust_target thumbv8m.main-zephyr-eabi)
set(clang_target thumbv8m.main-unknown-none-eabi)
endif()
else()
set(rust_target thumbv7m-zephyr-eabi)
set(clang_target thumbv7m-none-eabi)
Expand Down
20 changes: 20 additions & 0 deletions rust/targets/thumbv8m.main-zephyr-eabi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"abi": "eabi",
"arch": "arm",
"c-enum-min-bits": 8,
"data-layout": "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64",
"emit-debug-gdb-scripts": false,
"frame-pointer": "always",
"linker": "rust-lld",
"linker-flavor": "ld.lld",
"llvm-target": "thumbv8m.main-none-eabi",
"max-atomic-width": 32,
"panic-strategy": "abort",
"relocation-model": "static",
"target-pointer-width": "32",
"target-family": "zephyr",
"os": "zephyr",
"position-independent-executables": "false",
"dynamic-linking": "false",
"has-thread-local": "false"
}
21 changes: 21 additions & 0 deletions rust/targets/thumbv8m.main-zephyr-eabihf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"abi": "eabihf",
"arch": "arm",
"c-enum-min-bits": 8,
"data-layout": "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64",
"emit-debug-gdb-scripts": false,
"features": "+fp-armv8,-fp64,-d32",
"frame-pointer": "always",
"linker": "rust-lld",
"linker-flavor": "ld.lld",
"llvm-target": "thumbv8m.main-none-eabihf",
"max-atomic-width": 32,
"panic-strategy": "abort",
"relocation-model": "static",
"target-pointer-width": "32",
"target-family": "zephyr",
"os": "zephyr",
"position-independent-executables": "false",
"dynamic-linking": "false",
"has-thread-local": "false"
}
2 changes: 2 additions & 0 deletions rust/targets/update-targets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ thumbv7em-zephyr-eabi
thumbv7m-zephyr-eabi
thumbv7r-zephyr-eabihf
thumbv7r-zephyr-eabi
thumbv8m.main-zephyr-eabi
thumbv8m.main-zephyr-eabihf
)

for target in "${targets[@]}"; do
Expand Down
Loading