diff --git a/Cargo.toml b/Cargo.toml index a51868ae..0016461e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -121,6 +121,7 @@ stm32h743v = ["stm32h7/stm32h743v", "device-selected", "revision_v", "rm0433"] stm32h753v = ["stm32h7/stm32h753v", "device-selected", "revision_v", "rm0433"] stm32h750v = ["stm32h7/stm32h743v", "device-selected", "revision_v", "rm0433"] stm32h747cm7 = ["stm32h7/stm32h747cm7", "device-selected", "revision_v", "rm0399", "cm7", "dsi", "smps"] +stm32h747cm4 = ["stm32h7/stm32h747cm4", "device-selected", "revision_v", "rm0399", "cm4", "dsi", "smps"] stm32h7b3 = ["stm32h7/stm32h7b3", "device-selected", "revision_v", "rm0455", "smps"] stm32h7b0 = ["stm32h7/stm32h7b3", "device-selected", "revision_v", "rm0455", "smps"] stm32h7a3 = ["stm32h7/stm32h7b3", "device-selected", "revision_v", "rm0455", "smps"] diff --git a/build.rs b/build.rs new file mode 100644 index 00000000..21456f0c --- /dev/null +++ b/build.rs @@ -0,0 +1,4 @@ +fn main() { + // Tell Cargo that if the given file changes, to rerun this build script. + println!("cargo:rerun-if-changed=memory.x"); +} diff --git a/core1.x b/core1.x new file mode 100644 index 00000000..22c43503 --- /dev/null +++ b/core1.x @@ -0,0 +1,27 @@ +MEMORY +{ + /* FLASH and RAM are mandatory memory regions */ + FLASH0 : ORIGIN = 0x08000000, LENGTH = 1024K + FLASH : ORIGIN = 0x08100000, LENGTH = 1024K + RAM : ORIGIN = 0x30020000, LENGTH = 128K /* SRAM2 */ + + /* AXISRAM */ + AXISRAM : ORIGIN = 0x24000000, LENGTH = 512K + + /* SRAM */ + SRAM1 : ORIGIN = 0x30000000, LENGTH = 128K + /* SRAM2: See RAM */ + SRAM3 : ORIGIN = 0x30040000, LENGTH = 32K + SRAM4 : ORIGIN = 0x38000000, LENGTH = 64K + + /* Backup SRAM */ + BSRAM : ORIGIN = 0x38800000, LENGTH = 4K +} + +/* The location of the stack can be overridden using the + `_stack_start` symbol. Place the stack at the end of RAM */ +_stack_start = ORIGIN(RAM) + LENGTH(RAM); + +/* The location of the .text section can be overridden using the + `_stext` symbol. By default it will place after .vector_table */ +/* _stext = ORIGIN(FLASH) + 0x40c; */ diff --git a/src/lib.rs b/src/lib.rs index 054a7f65..2a154d51 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -73,6 +73,7 @@ compile_error!( stm32h753v stm32h750v stm32h747cm7 + stm32h747cm4 stm32h757cm7 stm32h7b3 stm32h7b0 @@ -108,6 +109,8 @@ pub use stm32h7::stm32h753 as stm32; pub use stm32h7::stm32h753v as stm32; // Dual core +#[cfg(any(feature = "stm32h747cm4",))] +pub use stm32h7::stm32h747cm4 as stm32; #[cfg(any(feature = "stm32h747cm7",))] pub use stm32h7::stm32h747cm7 as stm32; #[cfg(any(feature = "stm32h757cm7",))]