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

Support native simulator. #31

Open
zhang-wenchao opened this issue Nov 19, 2024 · 2 comments
Open

Support native simulator. #31

zhang-wenchao opened this issue Nov 19, 2024 · 2 comments

Comments

@zhang-wenchao
Copy link

https://docs.zephyrproject.org/latest/boards/native/native_sim/doc/index.html

@zhang-wenchao
Copy link
Author

Rust llvm target x86_64-unknown-none,I actually tested it and it works.

@zhang-wenchao
Copy link
Author

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 582e14a..26bf03d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -47,7 +47,8 @@ function(_rust_map_target)
message(FATAL_ERROR "Rust: Unsupported riscv ISA")
endif()
else()
-    message(FATAL_ERROR "Rust: Add support for other target")
+      set(RUST_TARGET "x86_64-unknown-none" PARENT_SCOPE)
+#    message(FATAL_ERROR "Rust: Add support for other target")
endif()
endfunction()

diff --git a/Kconfig b/Kconfig
index 9a3ed88..4c44422 100644
--- a/Kconfig
+++ b/Kconfig
@@ -8,7 +8,7 @@ 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)
help
Selected for platforms that have support for Rust.

west build -p always -b native_sim/native/64

I'm trying to figure out how to support and Rust target.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant