From 97395e551747106bbfaa81857988fa163df93004 Mon Sep 17 00:00:00 2001 From: Guangzong Chen Date: Wed, 1 May 2024 23:35:23 -0400 Subject: [PATCH] update --- Cargo.lock | 2 +- Cargo.toml | 3 ++- build.rs | 4 +++- memory.x | 7 ++++++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e48db4e..866a8dd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -600,7 +600,7 @@ dependencies = [ [[package]] name = "u5-lib" version = "0.1.0" -source = "git+ssh://gitea@git.ggeta.com:2002/guangzong/u5_new.git?rev=36dfec969e#36dfec969e0b2a455fbfa29b3b4d0194ac864b63" +source = "git+ssh://gitea@git.ggeta.com:2002/guangzong/u5_new.git?rev=2f8448f9bf#2f8448f9bf3a69d3e43ea5fd568df49951eda0c2" dependencies = [ "aligned", "cortex-m", diff --git a/Cargo.toml b/Cargo.toml index 7cd8c96..54a6a00 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ edition = "2021" [dependencies] cortex-m = { version = "0.7.7" } -u5-lib = {git = "ssh://gitea@git.ggeta.com:2002/guangzong/u5_new.git", features = ["utils"], rev= "36dfec969e"} +u5-lib = {git = "ssh://gitea@git.ggeta.com:2002/guangzong/u5_new.git", features = ["utils"], rev= "2f8448f9bf"} defmt = "0.3.6" defmt-rtt = { version = "0.4.0" } cortex-m-rt = { version = "0.7.3", default-features = false } @@ -28,4 +28,5 @@ debug = true [features] stm32u575zi = ["u5-lib/stm32u575zi"] stm32u5a5zj = ["u5-lib/stm32u5a5zj"] +stm32u575ci = ["u5-lib/stm32u575ci"] #default = ["stm32u5a5zj"] diff --git a/build.rs b/build.rs index c4af735..9827de3 100644 --- a/build.rs +++ b/build.rs @@ -12,8 +12,10 @@ fn main() { "probe-rs run --chip STM32U5A5ZJTx" } else if cfg!(feature = "stm32u575zi") { "probe-rs run --chip STM32U575ZITxQ" + } else if cfg!(feature = "stm32u575ci") { + "probe-rs run --chip STM32U575CIUxQ" } else { - panic!("No target specified") + panic!("No chip selected"); }; let config_path = Path::new(".cargo").join("config.toml"); let mut config_file = File::create(&config_path).expect("Failed to create config file"); diff --git a/memory.x b/memory.x index f44a1f7..2e5898f 100644 --- a/memory.x +++ b/memory.x @@ -3,4 +3,9 @@ MEMORY FLASH : ORIGIN = 0x08000000, LENGTH = 4096K RAM : ORIGIN = 0x20000000, LENGTH = 768K /* 2514K?, 2496K for u5a5 */ OTP : ORIGIN = 0x0bfa0000, LENGTH = 512 -} \ No newline at end of file +} +/* For stm32 u575 */ +/* the dataset shows it has 786k RAM. But actually we only use 192 + 64 + 512 = 768k */ + +/* For stm32 u5a5 */ +/* the dataset shows it has 2514k RAM. But actually we only use 192 + 64 + ... = 2496k */ \ No newline at end of file