diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 46698e7..f6a84c0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: with: components: rust-src # Copy config file for rustflags and to build core/alloc. - - run: cp .cargo/def-config.toml .cargo/config.toml + - run: cp .cargo/config.toml.template .cargo/config.toml - run: cargo check --target armv7a-none-eabihf -p zynq7000 - run: cargo check --target armv7a-none-eabihf -p zynq7000-rt @@ -43,5 +43,5 @@ jobs: with: components: clippy, rust-src # Copy config file for rustflags and to build core/alloc. - - run: cp .cargo/def-config.toml .cargo/config.toml + - run: cp .cargo/config.toml.template .cargo/config.toml - run: cargo clippy --target armv7a-none-eabihf -- -D warnings diff --git a/Cargo.toml b/Cargo.toml index 015da61..9e0bcc6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,21 +2,24 @@ resolver = "3" members = [ "zynq7000-rt", + "zynq7000-mmu", "zynq7000", "zynq7000-hal", "zynq7000-embassy", + "zynq7000-boot-image", + "examples/simple", "examples/embassy", "examples/zedboard", - "zynq-mmu", + "zedboard-fsbl", "zedboard-bsp", - "zynq-boot-image", - "zedboard-qspi-flasher", "zynq-ps7init-extract", + "zedboard-qspi-flasher", ] exclude = [ "zynq-boot-image/tester", + "zynq7000-ps7init-extract", ] # cargo build/run --release diff --git a/zedboard-fsbl/Cargo.toml b/zedboard-fsbl/Cargo.toml index 1f635d6..7aac6ef 100644 --- a/zedboard-fsbl/Cargo.toml +++ b/zedboard-fsbl/Cargo.toml @@ -13,8 +13,8 @@ cortex-ar = "0.3" zynq7000-rt = { path = "../zynq7000-rt" } zynq7000 = { path = "../zynq7000" } zynq7000-hal = { path = "../zynq7000-hal" } +zynq7000-boot-image = { path = "../zynq7000-boot-image" } zedboard-bsp = { path = "../zedboard-bsp" } -zynq-boot-image = { path = "../zynq-boot-image" } embedded-io = "0.7" embedded-hal = "1" fugit = "0.3" diff --git a/zedboard-fsbl/src/main.rs b/zedboard-fsbl/src/main.rs index ce40baa..f985315 100644 --- a/zedboard-fsbl/src/main.rs +++ b/zedboard-fsbl/src/main.rs @@ -8,7 +8,7 @@ use cortex_ar::asm::nop; use embedded_io::Write as _; use log::{error, info}; use zedboard_bsp::qspi_spansion::{self, QspiSpansionS25Fl256SLinearMode}; -use zynq_boot_image::DestinationDevice; +use zynq7000_boot_image::DestinationDevice; use zynq7000_hal::priv_tim; use zynq7000_hal::{ BootMode, @@ -185,7 +185,7 @@ fn qspi_boot(mut qspi: QspiSpansionS25Fl256SLinearMode, _priv_tim: priv_tim::Cpu let mut boot_header_slice = unsafe { core::slice::from_raw_parts_mut( boot_bin_base_addr as *mut u8, - zynq_boot_image::FIXED_BOOT_HEADER_SIZE, + zynq7000_boot_image::FIXED_BOOT_HEADER_SIZE, ) }; let read_guard = qspi.read_guard(); @@ -194,12 +194,12 @@ fn qspi_boot(mut qspi: QspiSpansionS25Fl256SLinearMode, _priv_tim: priv_tim::Cpu core::ptr::copy_nonoverlapping( QspiSpansionS25Fl256SLinearMode::BASE_ADDR as *mut u8, boot_header_slice.as_mut_ptr(), - zynq_boot_image::FIXED_BOOT_HEADER_SIZE, + zynq7000_boot_image::FIXED_BOOT_HEADER_SIZE, ); } drop(read_guard); - let boot_header = zynq_boot_image::BootHeader::new(boot_header_slice).unwrap(); + let boot_header = zynq7000_boot_image::BootHeader::new(boot_header_slice).unwrap(); let fsbl_offset = boot_header.source_offset(); boot_header_slice = unsafe { core::slice::from_raw_parts_mut(boot_bin_base_addr as *mut u8, fsbl_offset) }; @@ -208,15 +208,15 @@ fn qspi_boot(mut qspi: QspiSpansionS25Fl256SLinearMode, _priv_tim: priv_tim::Cpu let read_guard = qspi.read_guard(); unsafe { core::ptr::copy_nonoverlapping( - (QspiSpansionS25Fl256SLinearMode::BASE_ADDR + zynq_boot_image::FIXED_BOOT_HEADER_SIZE) - as *mut u8, - boot_header_slice[zynq_boot_image::FIXED_BOOT_HEADER_SIZE..].as_mut_ptr(), - fsbl_offset - zynq_boot_image::FIXED_BOOT_HEADER_SIZE, + (QspiSpansionS25Fl256SLinearMode::BASE_ADDR + + zynq7000_boot_image::FIXED_BOOT_HEADER_SIZE) as *mut u8, + boot_header_slice[zynq7000_boot_image::FIXED_BOOT_HEADER_SIZE..].as_mut_ptr(), + fsbl_offset - zynq7000_boot_image::FIXED_BOOT_HEADER_SIZE, ); } drop(read_guard); - let boot_header = zynq_boot_image::BootHeader::new_unchecked(boot_header_slice); + let boot_header = zynq7000_boot_image::BootHeader::new_unchecked(boot_header_slice); let mut name_buf: [u8; 256] = [0; 256]; let mut opt_jump_addr = None; diff --git a/zedboard-qspi-flasher/Cargo.toml b/zedboard-qspi-flasher/Cargo.toml index d15b5f6..682d7a5 100644 --- a/zedboard-qspi-flasher/Cargo.toml +++ b/zedboard-qspi-flasher/Cargo.toml @@ -8,7 +8,7 @@ cortex-ar = { version = "0.3" } zynq7000-rt = { path = "../zynq7000-rt" } zynq7000 = { path = "../zynq7000" } zynq7000-hal = { path = "../zynq7000-hal" } -zynq-boot-image = { path = "../zynq-boot-image" } +zynq7000-boot-image = { path = "../zynq7000-boot-image" } zedboard-bsp = { path = "../zedboard-bsp" } embedded-io = "0.7" embedded-hal = "1" diff --git a/zedboard-qspi-flasher/src/main.rs b/zedboard-qspi-flasher/src/main.rs index 6723b31..eff2638 100644 --- a/zedboard-qspi-flasher/src/main.rs +++ b/zedboard-qspi-flasher/src/main.rs @@ -9,7 +9,7 @@ use embedded_hal::{delay::DelayNs as _, digital::StatefulOutputPin as _}; use embedded_io::Write as _; use log::{error, info}; use zedboard_bsp::qspi_spansion; -use zynq_boot_image::BootHeader; +use zynq7000_boot_image::BootHeader; use zynq7000_hal::{ BootMode, LevelShifterConfig, clocks, gpio, prelude::*, priv_tim, qspi, time::Hertz, uart, }; diff --git a/zynq-boot-image/Cargo.toml b/zynq7000-boot-image/Cargo.toml similarity index 84% rename from zynq-boot-image/Cargo.toml rename to zynq7000-boot-image/Cargo.toml index 922b69b..f72493a 100644 --- a/zynq-boot-image/Cargo.toml +++ b/zynq7000-boot-image/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "zynq-boot-image" +name = "zynq7000-boot-image" version = "0.1.0" edition = "2024" diff --git a/zynq-boot-image/src/lib.rs b/zynq7000-boot-image/src/lib.rs similarity index 100% rename from zynq-boot-image/src/lib.rs rename to zynq7000-boot-image/src/lib.rs diff --git a/zynq-boot-image/staging/.gitignore b/zynq7000-boot-image/staging/.gitignore similarity index 100% rename from zynq-boot-image/staging/.gitignore rename to zynq7000-boot-image/staging/.gitignore diff --git a/zynq-boot-image/staging/README.md b/zynq7000-boot-image/staging/README.md similarity index 100% rename from zynq-boot-image/staging/README.md rename to zynq7000-boot-image/staging/README.md diff --git a/zynq-boot-image/staging/boot.bif b/zynq7000-boot-image/staging/boot.bif similarity index 100% rename from zynq-boot-image/staging/boot.bif rename to zynq7000-boot-image/staging/boot.bif diff --git a/zynq-boot-image/tester/.gitignore b/zynq7000-boot-image/tester/.gitignore similarity index 100% rename from zynq-boot-image/tester/.gitignore rename to zynq7000-boot-image/tester/.gitignore diff --git a/zynq-boot-image/tester/Cargo.lock b/zynq7000-boot-image/tester/Cargo.lock similarity index 100% rename from zynq-boot-image/tester/Cargo.lock rename to zynq7000-boot-image/tester/Cargo.lock diff --git a/zynq-boot-image/tester/Cargo.toml b/zynq7000-boot-image/tester/Cargo.toml similarity index 100% rename from zynq-boot-image/tester/Cargo.toml rename to zynq7000-boot-image/tester/Cargo.toml diff --git a/zynq-boot-image/tester/src/main.rs b/zynq7000-boot-image/tester/src/main.rs similarity index 100% rename from zynq-boot-image/tester/src/main.rs rename to zynq7000-boot-image/tester/src/main.rs diff --git a/zynq7000-hal/Cargo.toml b/zynq7000-hal/Cargo.toml index 6ffc9a4..f5ffc47 100644 --- a/zynq7000-hal/Cargo.toml +++ b/zynq7000-hal/Cargo.toml @@ -13,7 +13,7 @@ categories = ["embedded", "no-std", "hardware-support"] [dependencies] cortex-ar = { version = "0.3" } zynq7000 = { path = "../zynq7000" } -zynq-mmu = { path = "../zynq-mmu", version = "0.1.0" } +zynq7000-mmu = { path = "../zynq7000-mmu", version = "0.1.0" } static_assertions = "1.1" bitbybit = "1.4" diff --git a/zynq-mmu/Cargo.toml b/zynq7000-mmu/Cargo.toml similarity index 73% rename from zynq-mmu/Cargo.toml rename to zynq7000-mmu/Cargo.toml index 785bf7a..06946cf 100644 --- a/zynq-mmu/Cargo.toml +++ b/zynq7000-mmu/Cargo.toml @@ -1,6 +1,6 @@ [package] -name = "zynq-mmu" -description = "Zynq MMU structures" +name = "zynq7000-mmu" +description = "Zynq7000 MMU structures" version = "0.1.0" edition = "2024" diff --git a/zynq-mmu/src/lib.rs b/zynq7000-mmu/src/lib.rs similarity index 100% rename from zynq-mmu/src/lib.rs rename to zynq7000-mmu/src/lib.rs diff --git a/zynq-ps7init-extract/Cargo.toml b/zynq7000-ps7init-extract/Cargo.toml similarity index 64% rename from zynq-ps7init-extract/Cargo.toml rename to zynq7000-ps7init-extract/Cargo.toml index 898b7a6..0c9c282 100644 --- a/zynq-ps7init-extract/Cargo.toml +++ b/zynq7000-ps7init-extract/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "zynq-ps7init-extract" +name = "zynq7000-ps7init-extract" version = "0.1.0" edition = "2024" diff --git a/zynq-ps7init-extract/src/main.rs b/zynq7000-ps7init-extract/src/main.rs similarity index 100% rename from zynq-ps7init-extract/src/main.rs rename to zynq7000-ps7init-extract/src/main.rs diff --git a/zynq7000-rt/Cargo.toml b/zynq7000-rt/Cargo.toml index 2e2f73c..1c7197d 100644 --- a/zynq7000-rt/Cargo.toml +++ b/zynq7000-rt/Cargo.toml @@ -14,11 +14,11 @@ categories = ["embedded", "no-std", "hardware-support"] cortex-a-rt = { version = "0.1", optional = true, features = ["vfp-dp"] } cortex-ar = { version = "0.3" } arbitrary-int = "2" -zynq-mmu = { path = "../zynq-mmu", version = "0.1.0" } +zynq7000-mmu = { path = "../zynq7000-mmu", version = "0.1.0" } [features] default = ["rt"] -tools = ["zynq-mmu/tools"] +tools = ["zynq7000-mmu/tools"] rt = ["dep:cortex-a-rt"] [[bin]] diff --git a/zynq7000-rt/src/bin/table-gen.rs b/zynq7000-rt/src/bin/table-gen.rs index dccfb0e..000c3c8 100644 --- a/zynq7000-rt/src/bin/table-gen.rs +++ b/zynq7000-rt/src/bin/table-gen.rs @@ -56,7 +56,7 @@ fn main() { writeln!(buf_writer, "use crate::mmu::section_attrs;").unwrap(); writeln!(buf_writer, "use cortex_ar::mmu::L1Section;").unwrap(); - writeln!(buf_writer, "use zynq_mmu::L1Table;").unwrap(); + writeln!(buf_writer, "use zynq7000_mmu::L1Table;").unwrap(); writeln!(buf_writer, "").unwrap(); writeln!(buf_writer, "/// MMU Level 1 Page table.").unwrap(); diff --git a/zynq7000-rt/src/lib.rs b/zynq7000-rt/src/lib.rs index baec7fd..6ae917e 100644 --- a/zynq7000-rt/src/lib.rs +++ b/zynq7000-rt/src/lib.rs @@ -12,7 +12,7 @@ pub use cortex_a_rt::*; #[cfg(feature = "rt")] -use zynq_mmu::L1TableWrapper; +use zynq7000_mmu::L1TableWrapper; pub mod mmu; #[cfg(feature = "rt")] diff --git a/zynq7000-rt/src/mmu_table.rs b/zynq7000-rt/src/mmu_table.rs index 4ecd507..c4f82ff 100644 --- a/zynq7000-rt/src/mmu_table.rs +++ b/zynq7000-rt/src/mmu_table.rs @@ -1,7 +1,7 @@ //! This file was auto-generated by table-gen.rs use crate::mmu::section_attrs; use cortex_ar::mmu::L1Section; -use zynq_mmu::L1Table; +use zynq7000_mmu::L1Table; /// MMU Level 1 Page table. ///