File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,15 @@ function(_rust_map_target)
49
49
else ()
50
50
message (FATAL_ERROR "Rust: Unsupported riscv ISA" )
51
51
endif ()
52
+ elseif (CONFIG_CPU_CORTEX_R52 )
53
+ set (RUST_TARGET "armv8r-none-eabihf" PARENT_SCOPE )
54
+
55
+ # build core (and maybe also alloc) from source for tier 3 target
56
+ if (CONFIG_RUST_ALLOC )
57
+ set (CARGO_EXTRA_FLAGS -Z build -std=core,alloc PARENT_SCOPE )
58
+ else ()
59
+ set (CARGO_EXTRA_FLAGS -Z build -std=core PARENT_SCOPE )
60
+ endif ()
52
61
else ()
53
62
message (FATAL_ERROR "Rust: Add support for other target" )
54
63
endif ()
@@ -182,6 +191,7 @@ ${config_paths}
182
191
${command_paths}
183
192
--target ${RUST_TARGET}
184
193
--target-dir ${CARGO_TARGET_DIR}
194
+ ${CARGO_EXTRA_FLAGS}
185
195
COMMENT "Building Rust application"
186
196
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
187
197
)
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ menu "Rust Language Support"
8
8
config RUST_SUPPORTED
9
9
bool
10
10
default y if ((CPU_CORTEX_M || \
11
+ CPU_CORTEX_R52 || \
11
12
(RISCV && !RISCV_ISA_RV32E && !RISCV_ISA_RV128I)) && \
12
13
!TIMER_READS_ITS_FREQUENCY_AT_RUNTIME)
13
14
help
You can’t perform that action at this time.
0 commit comments