Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use rwtext as link section #200

Merged
merged 2 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions esp32/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ pub union Vector {
_reserved: u32,
}
#[cfg(feature = "rt")]
#[link_section = ".rwtext"]
#[doc(hidden)]
pub static __INTERRUPTS: [Vector; 69] = [
Vector { _handler: WIFI_MAC },
Expand Down
2 changes: 1 addition & 1 deletion esp32c2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pub union Vector {
}
#[cfg(feature = "rt")]
#[doc(hidden)]
#[link_section = ".trap.rodata"]
#[link_section = ".rwtext"]
#[no_mangle]
pub static __EXTERNAL_INTERRUPTS: [Vector; 42] = [
Vector { _handler: WIFI_MAC },
Expand Down
2 changes: 1 addition & 1 deletion esp32c3/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ pub union Vector {
}
#[cfg(feature = "rt")]
#[doc(hidden)]
#[link_section = ".trap.rodata"]
#[link_section = ".rwtext"]
#[no_mangle]
pub static __EXTERNAL_INTERRUPTS: [Vector; 62] = [
Vector { _handler: WIFI_MAC },
Expand Down
2 changes: 1 addition & 1 deletion esp32c6-lp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub union Vector {
}
#[cfg(feature = "rt")]
#[doc(hidden)]
#[link_section = ".trap.rodata"]
#[link_section = ".rwtext"]
#[no_mangle]
pub static __EXTERNAL_INTERRUPTS: [Vector; 22] = [
Vector { _reserved: 0 },
Expand Down
2 changes: 1 addition & 1 deletion esp32c6/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ pub union Vector {
}
#[cfg(feature = "rt")]
#[doc(hidden)]
#[link_section = ".trap.rodata"]
#[link_section = ".rwtext"]
#[no_mangle]
pub static __EXTERNAL_INTERRUPTS: [Vector; 77] = [
Vector { _handler: WIFI_MAC },
Expand Down
2 changes: 1 addition & 1 deletion esp32h2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ pub union Vector {
}
#[cfg(feature = "rt")]
#[doc(hidden)]
#[link_section = ".trap.rodata"]
#[link_section = ".rwtext"]
#[no_mangle]
pub static __EXTERNAL_INTERRUPTS: [Vector; 65] = [
Vector { _handler: PMU },
Expand Down
2 changes: 1 addition & 1 deletion esp32p4/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ pub union Vector {
}
#[cfg(feature = "rt")]
#[doc(hidden)]
#[link_section = ".trap.rodata"]
#[link_section = ".rwtext"]
#[no_mangle]
pub static __EXTERNAL_INTERRUPTS: [Vector; 128] = [
Vector { _reserved: 0 },
Expand Down
2 changes: 1 addition & 1 deletion esp32s2-ulp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub union Vector {
}
#[cfg(feature = "rt")]
#[doc(hidden)]
#[link_section = ".trap.rodata"]
#[link_section = ".rwtext"]
#[no_mangle]
pub static __EXTERNAL_INTERRUPTS: [Vector; 9] = [
Vector {
Expand Down
1 change: 1 addition & 0 deletions esp32s2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ pub union Vector {
_reserved: u32,
}
#[cfg(feature = "rt")]
#[link_section = ".rwtext"]
#[doc(hidden)]
pub static __INTERRUPTS: [Vector; 95] = [
Vector { _handler: WIFI_MAC },
Expand Down
2 changes: 1 addition & 1 deletion esp32s3-ulp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub union Vector {
}
#[cfg(feature = "rt")]
#[doc(hidden)]
#[link_section = ".trap.rodata"]
#[link_section = ".rwtext"]
#[no_mangle]
pub static __EXTERNAL_INTERRUPTS: [Vector; 12] = [
Vector {
Expand Down
1 change: 1 addition & 0 deletions esp32s3/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ pub union Vector {
_reserved: u32,
}
#[cfg(feature = "rt")]
#[link_section = ".rwtext"]
#[doc(hidden)]
pub static __INTERRUPTS: [Vector; 99] = [
Vector { _handler: WIFI_MAC },
Expand Down
10 changes: 2 additions & 8 deletions xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,8 @@ fn generate_package(workspace: &Path, chip: &Chip) -> Result<()> {
output_dir: Some(path.clone()),
impl_debug: true,
impl_debug_feature: Some("impl-register-debug".to_owned()),

..match target {
Target::RISCV => Config {
interrupt_link_section: Some(".trap.rodata".to_owned()),
..Config::default()
},
_ => Config::default(),
}
interrupt_link_section: Some(".rwtext".to_owned()),
..Config::default()
};

let input = fs::read_to_string(svd_file)?;
Expand Down
Loading