From 22b67fbd2dc086bda6b2a8f697d081a1e020354c Mon Sep 17 00:00:00 2001 From: Sebastian Holzapfel Date: Sun, 17 Mar 2024 16:15:10 +0100 Subject: [PATCH] unify riscv-rt usage, remove -g3 and add -fno-plt -fno-pic to picolibc and soc common.mak --- deps/litex | 2 +- firmware/build.sh | 6 ++-- firmware/deps/generated-litex-pac/Cargo.toml | 4 +-- firmware/polyboot/Cargo.lock | 37 +++----------------- firmware/polyvec/Cargo.lock | 37 +++----------------- 5 files changed, 14 insertions(+), 72 deletions(-) diff --git a/deps/litex b/deps/litex index 66cc5d7..49176bb 160000 --- a/deps/litex +++ b/deps/litex @@ -1 +1 @@ -Subproject commit 66cc5d7888eac8ba36db16551eb46084f2463861 +Subproject commit 49176bbcc85df983b464db24367f910591117f3c diff --git a/firmware/build.sh b/firmware/build.sh index 8993f33..94ffc53 100755 --- a/firmware/build.sh +++ b/firmware/build.sh @@ -30,6 +30,6 @@ cargo build --target=riscv32imac-unknown-none-elf --release # Copy it into a binary that litex_term can upload. ${OBJCOPY} target/riscv32imac-unknown-none-elf/release/polyvec_main -O binary $BUILD_DIR/rust-fw.bin -cd $FW_ROOT/polyboot -cargo build --target=riscv32imac-unknown-none-elf -vv --release -${OBJCOPY} target/riscv32imac-unknown-none-elf/release/polyboot -O binary $BUILD_DIR/bootloader.bin +#cd $FW_ROOT/polyboot +#cargo build --target=riscv32imac-unknown-none-elf -vv --release +#${OBJCOPY} target/riscv32imac-unknown-none-elf/release/polyboot -O binary $BUILD_DIR/bootloader.bin diff --git a/firmware/deps/generated-litex-pac/Cargo.toml b/firmware/deps/generated-litex-pac/Cargo.toml index 4139484..2b19249 100644 --- a/firmware/deps/generated-litex-pac/Cargo.toml +++ b/firmware/deps/generated-litex-pac/Cargo.toml @@ -7,8 +7,8 @@ edition = "2021" [dependencies] critical-section = { version = "1.0", optional = true } -riscv = "0.10.1" -riscv-rt = { version = "0.11.0", optional = true } +riscv = { version = "0.10.1", features = ["critical-section-single-hart"] } +riscv-rt = { path = "../riscv-rt", features = ["single-hart"], optional = true } vcell = "0.1.0" [features] diff --git a/firmware/polyboot/Cargo.lock b/firmware/polyboot/Cargo.lock index 5704c6c..55886a3 100644 --- a/firmware/polyboot/Cargo.lock +++ b/firmware/polyboot/Cargo.lock @@ -351,7 +351,7 @@ name = "litex-pac" version = "0.1.0" dependencies = [ "riscv", - "riscv-rt 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "riscv-rt", "vcell", ] @@ -460,7 +460,7 @@ dependencies = [ "polyvec-hal", "polyvec-lib", "riscv", - "riscv-rt 0.11.0", + "riscv-rt", "ssd1322", "tinyusb-sys", "ufmt", @@ -478,7 +478,7 @@ dependencies = [ "micromath", "paste", "riscv", - "riscv-rt 0.11.0", + "riscv-rt", "ufmt", "vexriscv", ] @@ -548,12 +548,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "r0" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd7a31eed1591dcbc95d92ad7161908e72f4677f8fabf2a32ca49b4237cbf211" - [[package]] name = "regex" version = "1.10.2" @@ -599,19 +593,7 @@ name = "riscv-rt" version = "0.11.0" dependencies = [ "riscv", - "riscv-rt-macros 0.2.0", - "riscv-target", -] - -[[package]] -name = "riscv-rt" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "102c52c89defde24dedf9ac077cc69df77b85aa2400dd2d5aad6eea6a6a5c089" -dependencies = [ - "r0", - "riscv", - "riscv-rt-macros 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "riscv-rt-macros", "riscv-target", ] @@ -624,17 +606,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "riscv-rt-macros" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f38509d7b17c2f604ceab3e5ff8ac97bb8cd2f544688c512be75c715edaf4daf" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "riscv-target" version = "0.1.2" diff --git a/firmware/polyvec/Cargo.lock b/firmware/polyvec/Cargo.lock index e0b0597..3fe1e81 100644 --- a/firmware/polyvec/Cargo.lock +++ b/firmware/polyvec/Cargo.lock @@ -390,7 +390,7 @@ name = "litex-pac" version = "0.1.0" dependencies = [ "riscv", - "riscv-rt 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "riscv-rt", "vcell", ] @@ -519,7 +519,7 @@ dependencies = [ "polyvec-hal", "polyvec-lib", "riscv", - "riscv-rt 0.11.0", + "riscv-rt", "ssd1322", "strum", "strum_macros", @@ -538,7 +538,7 @@ dependencies = [ "micromath", "paste", "riscv", - "riscv-rt 0.11.0", + "riscv-rt", "ufmt", "vexriscv", ] @@ -608,12 +608,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "r0" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd7a31eed1591dcbc95d92ad7161908e72f4677f8fabf2a32ca49b4237cbf211" - [[package]] name = "regex" version = "1.10.2" @@ -659,19 +653,7 @@ name = "riscv-rt" version = "0.11.0" dependencies = [ "riscv", - "riscv-rt-macros 0.2.0", - "riscv-target", -] - -[[package]] -name = "riscv-rt" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "102c52c89defde24dedf9ac077cc69df77b85aa2400dd2d5aad6eea6a6a5c089" -dependencies = [ - "r0", - "riscv", - "riscv-rt-macros 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "riscv-rt-macros", "riscv-target", ] @@ -684,17 +666,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "riscv-rt-macros" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f38509d7b17c2f604ceab3e5ff8ac97bb8cd2f544688c512be75c715edaf4daf" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "riscv-target" version = "0.1.2"