This commit is contained in:
guangzong 2024-05-01 23:35:23 -04:00
parent 2d8e73fc81
commit 97395e5517
Signed by: guangzong
GPG Key ID: 095389BACAE97D19
4 changed files with 12 additions and 4 deletions

2
Cargo.lock generated
View File

@ -600,7 +600,7 @@ dependencies = [
[[package]] [[package]]
name = "u5-lib" name = "u5-lib"
version = "0.1.0" 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 = [ dependencies = [
"aligned", "aligned",
"cortex-m", "cortex-m",

View File

@ -10,7 +10,7 @@ edition = "2021"
[dependencies] [dependencies]
cortex-m = { version = "0.7.7" } 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 = "0.3.6"
defmt-rtt = { version = "0.4.0" } defmt-rtt = { version = "0.4.0" }
cortex-m-rt = { version = "0.7.3", default-features = false } cortex-m-rt = { version = "0.7.3", default-features = false }
@ -28,4 +28,5 @@ debug = true
[features] [features]
stm32u575zi = ["u5-lib/stm32u575zi"] stm32u575zi = ["u5-lib/stm32u575zi"]
stm32u5a5zj = ["u5-lib/stm32u5a5zj"] stm32u5a5zj = ["u5-lib/stm32u5a5zj"]
stm32u575ci = ["u5-lib/stm32u575ci"]
#default = ["stm32u5a5zj"] #default = ["stm32u5a5zj"]

View File

@ -12,8 +12,10 @@ fn main() {
"probe-rs run --chip STM32U5A5ZJTx" "probe-rs run --chip STM32U5A5ZJTx"
} else if cfg!(feature = "stm32u575zi") { } else if cfg!(feature = "stm32u575zi") {
"probe-rs run --chip STM32U575ZITxQ" "probe-rs run --chip STM32U575ZITxQ"
} else if cfg!(feature = "stm32u575ci") {
"probe-rs run --chip STM32U575CIUxQ"
} else { } else {
panic!("No target specified") panic!("No chip selected");
}; };
let config_path = Path::new(".cargo").join("config.toml"); let config_path = Path::new(".cargo").join("config.toml");
let mut config_file = File::create(&config_path).expect("Failed to create config file"); let mut config_file = File::create(&config_path).expect("Failed to create config file");

View File

@ -3,4 +3,9 @@ MEMORY
FLASH : ORIGIN = 0x08000000, LENGTH = 4096K FLASH : ORIGIN = 0x08000000, LENGTH = 4096K
RAM : ORIGIN = 0x20000000, LENGTH = 768K /* 2514K?, 2496K for u5a5 */ RAM : ORIGIN = 0x20000000, LENGTH = 768K /* 2514K?, 2496K for u5a5 */
OTP : ORIGIN = 0x0bfa0000, LENGTH = 512 OTP : ORIGIN = 0x0bfa0000, LENGTH = 512
} }
/* 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 */