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

Update on dual-core support (#62) #254

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
4 changes: 4 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -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");
}
27 changes: 27 additions & 0 deletions core1.x
Original file line number Diff line number Diff line change
@@ -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; */
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ compile_error!(
stm32h753v
stm32h750v
stm32h747cm7
stm32h747cm4
stm32h757cm7
stm32h7b3
stm32h7b0
Expand Down Expand Up @@ -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",))]
Expand Down