1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

cpu/riscv_common: Enable Rust applications

This contains a workaround for
https://github.com/rust-lang/rust-bindgen/issues/1555 (withouot which
bindgen would fail, with little information helping remedy the cause)
This commit is contained in:
chrysn 2022-01-14 13:42:32 +01:00
parent ace880dddf
commit d391b1c5f4
3 changed files with 4 additions and 2 deletions

View File

@ -12,7 +12,7 @@ config CPU_ARCH_RISCV
select HAS_NEWLIB
select HAS_PERIPH_CORETIMER
select HAS_PICOLIBC if '$(RIOT_CI_BUILD)' != '1'
#select HAS_RUST_TARGET
select HAS_RUST_TARGET
select HAS_SSP
select MODULE_MALLOC_THREAD_SAFE if TEST_KCONFIG

View File

@ -8,7 +8,7 @@ FEATURES_PROVIDED += cpp
FEATURES_PROVIDED += libstdcpp
FEATURES_PROVIDED += newlib
FEATURES_PROVIDED += periph_coretimer
#FEATURES_PROVIDED += rust_target
FEATURES_PROVIDED += rust_target
FEATURES_PROVIDED += ssp
# RISC-V toolchain on CI does not work properly with picolibc yet

View File

@ -11,7 +11,9 @@ CARGO_COMPILE_COMMANDS_FLAGS = --clang
$(CARGO_COMPILE_COMMANDS): $(BUILDDEPS)
$(Q)DIRS="$(DIRS)" APPLICATION_BLOBS="$(BLOBS)" \
"$(MAKE)" -C $(APPDIR) -f $(RIOTMAKE)/application.inc.mk compile-commands
@# replacement addresses https://github.com/rust-lang/rust-bindgen/issues/1555
$(Q)$(RIOTTOOLS)/compile_commands/compile_commands.py $(CARGO_COMPILE_COMMANDS_FLAGS) $(BINDIR) \
| sed 's/"riscv-none-embed"/"riscv32"/g' \
| $(LAZYSPONGE) $@