From 386b71d69af652d71aa7682052be5deadfa7b51a Mon Sep 17 00:00:00 2001 From: Richard Meadows <962920+richardeoin@users.noreply.github.com> Date: Sat, 4 Apr 2020 19:41:08 +0200 Subject: [PATCH 1/2] cherry-pick @richardeoin\'s fork to current master --- .travis.yml | 36 ++++++++++++++++++++++++++++++++++++ Cargo.toml | 1 + build.rs | 4 ++++ core1.x | 27 +++++++++++++++++++++++++++ src/lib.rs | 3 +++ 5 files changed, 71 insertions(+) create mode 100644 .travis.yml create mode 100644 build.rs create mode 100644 core1.x diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..a5093156 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,36 @@ +language: rust + +rust: + - 1.39.0 + - stable + - nightly + +cache: cargo + +branches: + only: + - staging + - trying + - master + +before_script: + - rustup target add thumbv7em-none-eabihf + +env: +- MCU=stm32h743 +- MCU=stm32h753 +- MCU=stm32h743v +- MCU=stm32h753v +- MCU=stm32h747cm7 +- MCU=stm32h747cm4 + +matrix: + allow_failures: + - rust: nightly + fast_finish: true + +script: + - RUSTFLAGS="-D warnings" cargo build --verbose --release --examples --features rt,$MCU + +notifications: + email: false diff --git a/Cargo.toml b/Cargo.toml index fa7a2d07..c058c0a3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -101,6 +101,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 b3028eec..1000beda 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -67,6 +67,7 @@ compile_error!( stm32h753v stm32h750v stm32h747cm7 + stm32h747cm4 stm32h757cm7 stm32h7b3 stm32h7b0 @@ -103,6 +104,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",))] From 5cd03f2f80540a4221b51068c83f9f69f531ca32 Mon Sep 17 00:00:00 2001 From: Edwin Svensson Date: Fri, 1 Oct 2021 23:39:06 +0200 Subject: [PATCH 2/2] remove travis ci --- .travis.yml | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a5093156..00000000 --- a/.travis.yml +++ /dev/null @@ -1,36 +0,0 @@ -language: rust - -rust: - - 1.39.0 - - stable - - nightly - -cache: cargo - -branches: - only: - - staging - - trying - - master - -before_script: - - rustup target add thumbv7em-none-eabihf - -env: -- MCU=stm32h743 -- MCU=stm32h753 -- MCU=stm32h743v -- MCU=stm32h753v -- MCU=stm32h747cm7 -- MCU=stm32h747cm4 - -matrix: - allow_failures: - - rust: nightly - fast_finish: true - -script: - - RUSTFLAGS="-D warnings" cargo build --verbose --release --examples --features rt,$MCU - -notifications: - email: false