Skip to content

Add support for board native_sim/native/64 #80

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

Merged
merged 1 commit into from
Apr 7, 2025
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: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ jobs:
rustup target add thumbv7em-none-eabi
rustup target add thumbv7m-none-eabi
rustup target add thumbv8m.main-none-eabi
rustup target add x86_64-unknown-none
rustup target add aarch64-unknown-none

# Note that Renode is only provided for x86_64 targets. This matches the github runners.
- name: Install Renode
Expand Down
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ function(_rust_map_target)
else()
message(FATAL_ERROR "Rust: Unsupported riscv ISA")
endif()
elseif(CONFIG_ARCH_POSIX AND CONFIG_64BIT AND (${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "x86_64"))
set(RUST_TARGET "x86_64-unknown-none" PARENT_SCOPE)
elseif(CONFIG_ARCH_POSIX AND CONFIG_64BIT AND (${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "aarch64"))
set(RUST_TARGET "aarch64-unknown-none" PARENT_SCOPE)
else()
message(FATAL_ERROR "Rust: Add support for other target")
endif()
Expand Down
3 changes: 2 additions & 1 deletion Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ menu "Rust Language Support"
config RUST_SUPPORTED
bool
default y if ((CPU_CORTEX_M || \
(RISCV && !RISCV_ISA_RV32E && !RISCV_ISA_RV128I)) && \
(RISCV && !RISCV_ISA_RV32E && !RISCV_ISA_RV128I) || \
(ARCH_POSIX && 64BIT)) && \
!TIMER_READS_ITS_FREQUENCY_AT_RUNTIME)
help
Selected for platforms that have support for Rust.
Expand Down
1 change: 1 addition & 0 deletions dt-rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
- "nordic,nrf52-flash-controller"
- "nordic,nrf51-flash-controller"
- "raspberrypi,pico-flash-controller"
- "zephyr,sim-flash"
level: 0
actions:
- type: instance
Expand Down