Skip to content

Commit 4d66484

Browse files
committed
cmake: add support for RV32E targets
Tier 3 no-std targets that require building core and alloc from source. Signed-off-by: Marcin Szymczyk <[email protected]>
1 parent 6079b4c commit 4d66484

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,14 @@ function(_rust_map_target)
6666
set(RUST_TARGET "${RUST_TARGET}c")
6767
endif()
6868
set(RUST_TARGET "${RUST_TARGET}-unknown-none-elf" PARENT_SCOPE)
69-
elseif(CONFIG_RISCV_ISA_RV32I)
69+
elseif(CONFIG_RISCV_ISA_RV32I OR CONFIG_RISCV_ISA_RV32E)
7070
# We have multiple choices, try to pick the best.
7171
# Note that Rust currently only supports subsets of "riscv32imafc" targets!
72-
set(RUST_TARGET "riscv32i")
72+
if(CONFIG_RISCV_ISA_RV32I)
73+
set(RUST_TARGET "riscv32i")
74+
else()
75+
set(RUST_TARGET "riscv32e")
76+
endif()
7377
if(CONFIG_RISCV_ISA_EXT_M)
7478
set(RUST_TARGET "${RUST_TARGET}m")
7579
endif()

0 commit comments

Comments
 (0)