mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #17520 from chrysn-pull-requests/rust-enable-riscv
cpu/riscv_common: Enable Rust applications
This commit is contained in:
commit
99d245f538
@ -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
|
||||
|
@ -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
|
||||
|
@ -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) $@
|
||||
|
||||
|
||||
|
@ -241,6 +241,11 @@ DOCKER_APPDIR = $(DOCKER_RIOTPROJECT)/$(BUILDRELPATH)
|
||||
# Directory mapping in docker and directories environment variable configuration
|
||||
DOCKER_VOLUMES_AND_ENV += $(call docker_volume,$(ETC_LOCALTIME),/etc/localtime,ro)
|
||||
DOCKER_VOLUMES_AND_ENV += $(call docker_volume,$(RIOTBASE),$(DOCKER_RIOTBASE))
|
||||
# Selective components of Cargo to ensure crates are not re-downloaded (and
|
||||
# subsequently rebuilt) on every run. Not using all of ~/.cargo as ~/.cargo/bin
|
||||
# would be run by Cargo and that'd be very weird.
|
||||
DOCKER_VOLUMES_AND_ENV += $(call docker_volume,$(HOME)/.cargo/registry,$(DOCKER_BUILD_ROOT)/.cargo/registry)
|
||||
DOCKER_VOLUMES_AND_ENV += $(call docker_volume,$(HOME)/.cargo/git,$(DOCKER_BUILD_ROOT)/.cargo/git)
|
||||
DOCKER_VOLUMES_AND_ENV += -e 'RIOTBASE=$(DOCKER_RIOTBASE)'
|
||||
DOCKER_VOLUMES_AND_ENV += -e 'CCACHE_BASEDIR=$(DOCKER_RIOTBASE)'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user