Skip to content

Commit

Permalink
added support for Cortex-M33 (nRF5340 app core)
Browse files Browse the repository at this point in the history
  • Loading branch information
sprhawk authored and tylerwhall committed Jun 30, 2024
1 parent acaccb5 commit 221919e
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 0 deletions.
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

0 comments on commit 221919e

Please sign in to comment.