Browse Source

Merge pull request #145 from jackfiled/fix-fixed-toolchain

fix(prototyper): use rustc_align attribute on function.
guttatus 2 weeks ago
parent
commit
57f6936394

+ 1 - 1
prototyper/prototyper/src/firmware/mod.rs

@@ -28,7 +28,7 @@ pub struct BootHart {
 
 #[unsafe(naked)]
 #[unsafe(link_section = ".fdt")]
-#[repr(align(16))]
+#[rustc_align(16)]
 #[cfg(feature = "fdt")]
 pub extern "C" fn raw_fdt() {
     naked_asm!(concat!(".incbin \"", env!("PROTOTYPER_FDT_PATH"), "\""),)

+ 2 - 2
prototyper/prototyper/src/sbi/early_trap.rs

@@ -8,7 +8,7 @@ use riscv::register::mtvec;
 /// This function will change a0 and a1 and will NOT change them back.
 // TODO: Support save trap info.
 #[unsafe(naked)]
-#[repr(align(16))]
+#[rustc_align(16)]
 pub(crate) unsafe extern "C" fn light_expected_trap() {
     naked_asm!(
         "add a0, zero, zero",
@@ -39,7 +39,7 @@ impl Default for TrapInfo {
 }
 
 #[unsafe(naked)]
-#[repr(align(16))]
+#[rustc_align(16)]
 pub(crate) unsafe extern "C" fn expected_trap() {
     naked_asm!(
         "csrr a4, mepc",

+ 1 - 1
rust-toolchain.toml

@@ -1,4 +1,4 @@
 [toolchain]
 profile = "minimal"
-channel = "nightly"
+channel = "nightly-2025-08-01"
 components = ["rustfmt", "clippy", "llvm-tools-preview", "rust-src"]