From bc863e1daf74a9595c7332f67aaa663f9e72c509 Mon Sep 17 00:00:00 2001 From: Sebastian Holzapfel Date: Thu, 7 Dec 2023 09:37:13 +0100 Subject: [PATCH] cleanup: clean up directory structure a bit --- .gitignore | 2 +- .gitmodules | 3 ++ firmware/build.sh | 4 +- .../generated-litex-pac}/.gitignore | 0 .../generated-litex-pac}/Cargo.toml | 0 firmware/{ => deps}/ssd1322 | 0 firmware/litex-pac/src/GENERATED | 0 firmware/{litex-fw => polyvec}/.cargo/config | 0 firmware/{litex-fw => polyvec}/.gitignore | 0 firmware/{litex-fw => polyvec}/Cargo.lock | 54 +++++++++---------- firmware/{litex-fw => polyvec}/Cargo.toml | 6 +-- firmware/{litex-fw => polyvec}/build.rs | 0 firmware/{litex-fw => polyvec}/memory.x | 0 firmware/{litex-fw => polyvec}/src/draw.rs | 0 firmware/{litex-fw => polyvec}/src/gw.rs | 0 firmware/{litex-fw => polyvec}/src/lib.rs | 0 firmware/{litex-fw => polyvec}/src/log.rs | 0 firmware/{litex-fw => polyvec}/src/main.rs | 0 firmware/{litex-fw => polyvec}/src/opt.rs | 0 firmware/{litex-fw => polyvec}/src/voice.rs | 0 20 files changed, 36 insertions(+), 33 deletions(-) rename firmware/{litex-pac => deps/generated-litex-pac}/.gitignore (100%) rename firmware/{litex-pac => deps/generated-litex-pac}/Cargo.toml (100%) rename firmware/{ => deps}/ssd1322 (100%) delete mode 100644 firmware/litex-pac/src/GENERATED rename firmware/{litex-fw => polyvec}/.cargo/config (100%) rename firmware/{litex-fw => polyvec}/.gitignore (100%) rename firmware/{litex-fw => polyvec}/Cargo.lock (99%) rename firmware/{litex-fw => polyvec}/Cargo.toml (88%) rename firmware/{litex-fw => polyvec}/build.rs (100%) rename firmware/{litex-fw => polyvec}/memory.x (100%) rename firmware/{litex-fw => polyvec}/src/draw.rs (100%) rename firmware/{litex-fw => polyvec}/src/gw.rs (100%) rename firmware/{litex-fw => polyvec}/src/lib.rs (100%) rename firmware/{litex-fw => polyvec}/src/log.rs (100%) rename firmware/{litex-fw => polyvec}/src/main.rs (100%) rename firmware/{litex-fw => polyvec}/src/opt.rs (100%) rename firmware/{litex-fw => polyvec}/src/voice.rs (100%) diff --git a/.gitignore b/.gitignore index 1ad5700..0c85187 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ build/ *__pycache__* -firmware/litex-pac/src/* +firmware/deps/generated-litex-pac/src/* .aider* *.fbi diff --git a/.gitmodules b/.gitmodules index 0800360..84ac580 100644 --- a/.gitmodules +++ b/.gitmodules @@ -73,3 +73,6 @@ [submodule "firmware/deps/riscv-rt"] path = firmware/deps/riscv-rt url = http://github.com/rust-embedded/riscv-rt +[submodule "firmware/deps/ssd1322"] + path = firmware/deps/ssd1322 + url = git@github.com:schnommus/ssd1322.git diff --git a/firmware/build.sh b/firmware/build.sh index 07d73be..8fbdf86 100755 --- a/firmware/build.sh +++ b/firmware/build.sh @@ -19,11 +19,11 @@ FW_ROOT=`pwd` OBJCOPY=${OBJCOPY:=riscv-none-elf-objcopy} # Generate the Rust CSR bindings spat out by the LiteX SOC generated. -cd $FW_ROOT/litex-pac/src +cd $FW_ROOT/deps/generated-litex-pac/src svd2rust -i $BUILD_DIR/csr.svd --target riscv # Build the firmware .elf file -cd $FW_ROOT/litex-fw +cd $FW_ROOT/polyvec cargo clippy --target=riscv32imac-unknown-none-elf cargo build --target=riscv32imac-unknown-none-elf --release diff --git a/firmware/litex-pac/.gitignore b/firmware/deps/generated-litex-pac/.gitignore similarity index 100% rename from firmware/litex-pac/.gitignore rename to firmware/deps/generated-litex-pac/.gitignore diff --git a/firmware/litex-pac/Cargo.toml b/firmware/deps/generated-litex-pac/Cargo.toml similarity index 100% rename from firmware/litex-pac/Cargo.toml rename to firmware/deps/generated-litex-pac/Cargo.toml diff --git a/firmware/ssd1322 b/firmware/deps/ssd1322 similarity index 100% rename from firmware/ssd1322 rename to firmware/deps/ssd1322 diff --git a/firmware/litex-pac/src/GENERATED b/firmware/litex-pac/src/GENERATED deleted file mode 100644 index e69de29..0000000 diff --git a/firmware/litex-fw/.cargo/config b/firmware/polyvec/.cargo/config similarity index 100% rename from firmware/litex-fw/.cargo/config rename to firmware/polyvec/.cargo/config diff --git a/firmware/litex-fw/.gitignore b/firmware/polyvec/.gitignore similarity index 100% rename from firmware/litex-fw/.gitignore rename to firmware/polyvec/.gitignore diff --git a/firmware/litex-fw/Cargo.lock b/firmware/polyvec/Cargo.lock similarity index 99% rename from firmware/litex-fw/Cargo.lock rename to firmware/polyvec/Cargo.lock index ac42dc3..796128f 100644 --- a/firmware/litex-fw/Cargo.lock +++ b/firmware/polyvec/Cargo.lock @@ -387,33 +387,6 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" -[[package]] -name = "litex-fw" -version = "0.1.0" -dependencies = [ - "aligned-array", - "critical-section", - "embedded-graphics", - "embedded-midi", - "heapless", - "image", - "irq", - "lazy_static", - "litex-hal", - "litex-interrupt", - "litex-pac", - "micromath", - "midi-types", - "paste", - "riscv", - "riscv-rt 0.11.0", - "ssd1322", - "strum", - "strum_macros", - "ufmt", - "vexriscv", -] - [[package]] name = "litex-hal" version = "0.3.0" @@ -556,6 +529,33 @@ dependencies = [ "miniz_oxide", ] +[[package]] +name = "polyvec" +version = "0.1.0" +dependencies = [ + "aligned-array", + "critical-section", + "embedded-graphics", + "embedded-midi", + "heapless", + "image", + "irq", + "lazy_static", + "litex-hal", + "litex-interrupt", + "litex-pac", + "micromath", + "midi-types", + "paste", + "riscv", + "riscv-rt 0.11.0", + "ssd1322", + "strum", + "strum_macros", + "ufmt", + "vexriscv", +] + [[package]] name = "proc-macro-error" version = "1.0.4" diff --git a/firmware/litex-fw/Cargo.toml b/firmware/polyvec/Cargo.toml similarity index 88% rename from firmware/litex-fw/Cargo.toml rename to firmware/polyvec/Cargo.toml index d30e985..2e2ab06 100644 --- a/firmware/litex-fw/Cargo.toml +++ b/firmware/polyvec/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "litex-fw" +name = "polyvec" version = "0.1.0" edition = "2021" @@ -17,8 +17,8 @@ path = "src/main.rs" riscv = { version = "0.10.1", features = ["critical-section-single-hart"] } riscv-rt = { path = "../deps/riscv-rt", features = ["single-hart"] } litex-hal = { path = "../deps/rust-litex-hal", features = ["gpio"] } -litex-pac = { path = "../litex-pac", features = ["rt"] } -ssd1322 = { path = "../ssd1322", features = [] } +litex-pac = { path = "../deps/generated-litex-pac", features = ["rt"] } +ssd1322 = { path = "../deps/ssd1322", features = [] } embedded-midi = { path = "../deps/embedded-midi" } micromath = "2.0.0" midi-types = "0.1.7" diff --git a/firmware/litex-fw/build.rs b/firmware/polyvec/build.rs similarity index 100% rename from firmware/litex-fw/build.rs rename to firmware/polyvec/build.rs diff --git a/firmware/litex-fw/memory.x b/firmware/polyvec/memory.x similarity index 100% rename from firmware/litex-fw/memory.x rename to firmware/polyvec/memory.x diff --git a/firmware/litex-fw/src/draw.rs b/firmware/polyvec/src/draw.rs similarity index 100% rename from firmware/litex-fw/src/draw.rs rename to firmware/polyvec/src/draw.rs diff --git a/firmware/litex-fw/src/gw.rs b/firmware/polyvec/src/gw.rs similarity index 100% rename from firmware/litex-fw/src/gw.rs rename to firmware/polyvec/src/gw.rs diff --git a/firmware/litex-fw/src/lib.rs b/firmware/polyvec/src/lib.rs similarity index 100% rename from firmware/litex-fw/src/lib.rs rename to firmware/polyvec/src/lib.rs diff --git a/firmware/litex-fw/src/log.rs b/firmware/polyvec/src/log.rs similarity index 100% rename from firmware/litex-fw/src/log.rs rename to firmware/polyvec/src/log.rs diff --git a/firmware/litex-fw/src/main.rs b/firmware/polyvec/src/main.rs similarity index 100% rename from firmware/litex-fw/src/main.rs rename to firmware/polyvec/src/main.rs diff --git a/firmware/litex-fw/src/opt.rs b/firmware/polyvec/src/opt.rs similarity index 100% rename from firmware/litex-fw/src/opt.rs rename to firmware/polyvec/src/opt.rs diff --git a/firmware/litex-fw/src/voice.rs b/firmware/polyvec/src/voice.rs similarity index 100% rename from firmware/litex-fw/src/voice.rs rename to firmware/polyvec/src/voice.rs