update build

This commit is contained in:
guangzong 2024-04-02 19:10:58 -04:00
parent 9ab13c8a4a
commit e7437560c2
Signed by: guangzong
GPG Key ID: 095389BACAE97D19
4 changed files with 37 additions and 28 deletions

22
Cargo.lock generated
View File

@ -95,7 +95,7 @@ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"strsim", "strsim",
"syn 2.0.53", "syn 2.0.57",
] ]
[[package]] [[package]]
@ -106,7 +106,7 @@ checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f"
dependencies = [ dependencies = [
"darling_core", "darling_core",
"quote", "quote",
"syn 2.0.53", "syn 2.0.57",
] ]
[[package]] [[package]]
@ -139,7 +139,7 @@ dependencies = [
"proc-macro-error", "proc-macro-error",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.53", "syn 2.0.57",
] ]
[[package]] [[package]]
@ -194,7 +194,7 @@ dependencies = [
"darling", "darling",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.53", "syn 2.0.57",
] ]
[[package]] [[package]]
@ -397,9 +397,9 @@ checksum = "8d5439c4ad607c3c23abf66de8c8bf57ba8adcd1f129e699851a6e43935d339d"
[[package]] [[package]]
name = "pin-project-lite" name = "pin-project-lite"
version = "0.2.13" version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02"
[[package]] [[package]]
name = "pin-utils" name = "pin-utils"
@ -502,7 +502,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.53", "syn 2.0.57",
] ]
[[package]] [[package]]
@ -549,9 +549,9 @@ dependencies = [
[[package]] [[package]]
name = "syn" name = "syn"
version = "2.0.53" version = "2.0.57"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7383cd0e49fff4b6b90ca5670bfd3e9d6a733b3f90c686605aa7eec8c4996032" checksum = "11a6ae1e52eb25aab8f3fb9fca13be982a373b8f1157ca14b897a825ba4a2d35"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -575,13 +575,13 @@ checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.53", "syn 2.0.57",
] ]
[[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?branch=dev#85f674f6dbd42e04f34f4f51bbf557a35d87c183" source = "git+ssh://gitea@git.ggeta.com:2002/guangzong/u5_new.git?branch=dev#bc8db5f8e5b3119434beec539902ad507bfb61b6"
dependencies = [ dependencies = [
"cortex-m", "cortex-m",
"cortex-m-rt", "cortex-m-rt",

View File

@ -20,10 +20,12 @@ cortex-m = { version = "0.7.7", features = [
]} ]}
u5-lib = { git = "ssh://gitea@git.ggeta.com:2002/guangzong/u5_new.git",features = [ u5-lib = { git = "ssh://gitea@git.ggeta.com:2002/guangzong/u5_new.git",features = [
"stm32u5a5qj", "stm32u5a5qj",
# "memory-x",
# "stm32u575zi" # "stm32u575zi"
], default-features = false, branch = "dev" } ], default-features = false, branch = "dev" }
eb_cmds = { git = "ssh://gitea@git.ggeta.com:2002/guangzong/eb_cmds.git"} eb_cmds = { git = "ssh://gitea@git.ggeta.com:2002/guangzong/eb_cmds.git"}
critical-section = "1.1.2" critical-section = "1.1.2"
defmt = "0.3.6" defmt = "0.3.6"
defmt-rtt = { version = "0.4.0" } defmt-rtt = { version = "0.4.0" }
defmt-itm = { version = "0.3.0" } defmt-itm = { version = "0.3.0" }

View File

@ -1,20 +1,21 @@
fn main() { fn main() {
println!("cargo:rustc-link-arg-bins=--nmagic"); println!("cargo:rustc-link-arg-bins=-Tmemory.x");
println!("cargo:rustc-link-arg-bins=-Tlink.x"); // println!("cargo:rustc-link-arg-bins=--nmagic");
println!("cargo:rustc-link-arg-bins=-Tdefmt.x"); // println!("cargo:rustc-link-arg-bins=-Tlink.x");
// println!("cargo:rustc-link-arg-bins=-Tdefmt.x");
// enable cfg sdmmc // enable cfg sdmmc
println!("cargo:rustc-cfg=sdmmc"); // println!("cargo:rustc-cfg=sdmmc");
for (key, _value) in std::env::vars() { // for (key, _value) in std::env::vars() {
// Check if the current environment variable is a feature that starts with "STM32U5" // // Check if the current environment variable is a feature that starts with "STM32U5"
if key.starts_with("CARGO_FEATURE_STM32U575") { // if key.starts_with("CARGO_FEATURE_STM32U575") {
// If found, print the cargo directive to set the `stm32u5` cfg flag // // If found, print the cargo directive to set the `stm32u5` cfg flag
println!("cargo:rustc-cfg=stm32u575"); // println!("cargo:rustc-cfg=stm32u575");
break; // Exit the loop once the first matching feature is found // break; // Exit the loop once the first matching feature is found
} // }
if key.starts_with("CARGO_FEATURE_STM32U5A5") { // if key.starts_with("CARGO_FEATURE_STM32U5A5") {
// If found, print the cargo directive to set the `stm32u5` cfg flag // // If found, print the cargo directive to set the `stm32u5` cfg flag
println!("cargo:rustc-cfg=stm32u5a5"); // println!("cargo:rustc-cfg=stm32u5a5");
break; // Exit the loop once the first matching feature is found // break; // Exit the loop once the first matching feature is found
} // }
} // }
} }

6
memory.x Normal file
View File

@ -0,0 +1,6 @@
MEMORY
{
FLASH : ORIGIN = 0x08000000, LENGTH = 4096K /* BANK_1 */
RAM : ORIGIN = 0x20000000, LENGTH = 2514K
OTP : ORIGIN = 0x0bfa0000, LENGTH = 512
}