fixed
This commit is contained in:
@@ -1,22 +1,15 @@
|
||||
[target.'cfg(all(target_arch = "arm", target_os = "none"))']
|
||||
runner = ["probe-rs", "run", "--chip", "STM32U575ZI", "--log-format=oneline"]
|
||||
[build]
|
||||
target = "thumbv8m.main-none-eabihf"
|
||||
|
||||
[target.thumbv8m.main-none-eabihf]
|
||||
runner = "probe-rs run --chip STM32U575ZITxQ"
|
||||
|
||||
rustflags = [
|
||||
"-C", "linker=flip-link",
|
||||
"-C", "linker=rust-lld",
|
||||
"-C", "link-arg=-Tlink.x",
|
||||
"-C", "link-arg=-Tdefmt.x",
|
||||
"-C", "link-arg=--nmagic",
|
||||
]
|
||||
|
||||
[build]
|
||||
target = "thumbv8m.main-none-eabihf"
|
||||
|
||||
[target.thumbv8m.main-none-eabihf]
|
||||
runner = "probe-rs run --chip STM32U575ZI"
|
||||
|
||||
[alias]
|
||||
rb = "run --bin"
|
||||
rrb = "run --release --bin"
|
||||
|
||||
[env]
|
||||
DEFMT_LOG = "info"
|
||||
[package.metadata.cargo-flash]
|
||||
chip = "STM32U575ZIT"
|
||||
|
||||
99
hal_adc/Cargo.lock
generated
99
hal_adc/Cargo.lock
generated
@@ -178,15 +178,6 @@ dependencies = [
|
||||
"syn 2.0.107",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "defmt"
|
||||
version = "0.3.100"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f0963443817029b2024136fc4dd07a5107eb8f977eaf18fcd1fdeb11306b64ad"
|
||||
dependencies = [
|
||||
"defmt 1.0.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "defmt"
|
||||
version = "1.0.1"
|
||||
@@ -226,7 +217,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "93d5a25c99d89c40f5676bec8cefe0614f17f0f40e916f98e345dae941807f9e"
|
||||
dependencies = [
|
||||
"critical-section",
|
||||
"defmt 1.0.1",
|
||||
"defmt",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -244,7 +235,6 @@ version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "554e3e840696f54b4c9afcf28a0f24da431c927f4151040020416e7393d6d0d8"
|
||||
dependencies = [
|
||||
"defmt 1.0.1",
|
||||
"embassy-futures",
|
||||
"embassy-hal-internal",
|
||||
"embassy-sync",
|
||||
@@ -265,7 +255,6 @@ checksum = "06070468370195e0e86f241c8e5004356d696590a678d47d6676795b2e439c6b"
|
||||
dependencies = [
|
||||
"cortex-m",
|
||||
"critical-section",
|
||||
"defmt 1.0.1",
|
||||
"document-features",
|
||||
"embassy-executor-macros",
|
||||
"embassy-executor-timer-queue",
|
||||
@@ -303,7 +292,6 @@ checksum = "95285007a91b619dc9f26ea8f55452aa6c60f7115a4edc05085cd2bd3127cd7a"
|
||||
dependencies = [
|
||||
"cortex-m",
|
||||
"critical-section",
|
||||
"defmt 1.0.1",
|
||||
"num-traits",
|
||||
]
|
||||
|
||||
@@ -312,9 +300,6 @@ name = "embassy-net-driver"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "524eb3c489760508f71360112bca70f6e53173e6fe48fc5f0efd0f5ab217751d"
|
||||
dependencies = [
|
||||
"defmt 0.3.100",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "embassy-net-driver-channel"
|
||||
@@ -341,7 +326,6 @@ dependencies = [
|
||||
"cortex-m",
|
||||
"cortex-m-rt",
|
||||
"critical-section",
|
||||
"defmt 1.0.1",
|
||||
"document-features",
|
||||
"embassy-embedded-hal",
|
||||
"embassy-futures",
|
||||
@@ -376,28 +360,6 @@ dependencies = [
|
||||
"volatile-register",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "embassy-stm32u575zi-examples"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"cortex-m",
|
||||
"cortex-m-rt",
|
||||
"defmt 1.0.1",
|
||||
"defmt-rtt",
|
||||
"embassy-executor",
|
||||
"embassy-futures",
|
||||
"embassy-stm32",
|
||||
"embassy-sync",
|
||||
"embassy-time",
|
||||
"embassy-usb",
|
||||
"embedded-graphics",
|
||||
"embedded-hal 1.0.0",
|
||||
"heapless",
|
||||
"micromath",
|
||||
"panic-probe",
|
||||
"tinybmp",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "embassy-sync"
|
||||
version = "0.7.2"
|
||||
@@ -406,11 +368,10 @@ checksum = "73974a3edbd0bd286759b3d483540f0ebef705919a5f56f4fc7709066f71689b"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"critical-section",
|
||||
"defmt 1.0.1",
|
||||
"embedded-io-async",
|
||||
"futures-core",
|
||||
"futures-sink",
|
||||
"heapless",
|
||||
"heapless 0.8.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -421,7 +382,6 @@ checksum = "f4fa65b9284d974dad7a23bb72835c4ec85c0b540d86af7fc4098c88cff51d65"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"critical-section",
|
||||
"defmt 1.0.1",
|
||||
"document-features",
|
||||
"embassy-time-driver",
|
||||
"embedded-hal 0.2.7",
|
||||
@@ -446,7 +406,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "80e2ee86063bd028a420a5fb5898c18c87a8898026da1d4c852af2c443d0a454"
|
||||
dependencies = [
|
||||
"embassy-executor-timer-queue",
|
||||
"heapless",
|
||||
"heapless 0.8.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -455,13 +415,12 @@ version = "0.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dc4462e48b19a4f401a11901bdd981aab80c6a826608016a0bdc73cbbab31954"
|
||||
dependencies = [
|
||||
"defmt 1.0.1",
|
||||
"embassy-futures",
|
||||
"embassy-net-driver-channel",
|
||||
"embassy-sync",
|
||||
"embassy-usb-driver",
|
||||
"embedded-io-async",
|
||||
"heapless",
|
||||
"heapless 0.8.0",
|
||||
"ssmarshal",
|
||||
"usbd-hid",
|
||||
]
|
||||
@@ -472,7 +431,6 @@ version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "17119855ccc2d1f7470a39756b12068454ae27a3eabb037d940b5c03d9c77b7a"
|
||||
dependencies = [
|
||||
"defmt 1.0.1",
|
||||
"embedded-io-async",
|
||||
]
|
||||
|
||||
@@ -483,7 +441,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "288751f8eaa44a5cf2613f13cee0ca8e06e6638cb96e897e6834702c79084b23"
|
||||
dependencies = [
|
||||
"critical-section",
|
||||
"defmt 1.0.1",
|
||||
"embassy-sync",
|
||||
"embassy-usb-driver",
|
||||
]
|
||||
@@ -560,9 +517,6 @@ name = "embedded-io"
|
||||
version = "0.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d"
|
||||
dependencies = [
|
||||
"defmt 0.3.100",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "embedded-io-async"
|
||||
@@ -570,7 +524,6 @@ version = "0.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3ff09972d4073aa8c299395be75161d582e7629cd663171d62af73c8d50dba3f"
|
||||
dependencies = [
|
||||
"defmt 0.3.100",
|
||||
"embedded-io",
|
||||
]
|
||||
|
||||
@@ -640,6 +593,29 @@ dependencies = [
|
||||
"pin-utils",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hal_adc"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"cortex-m",
|
||||
"cortex-m-rt",
|
||||
"defmt",
|
||||
"defmt-rtt",
|
||||
"embassy-executor",
|
||||
"embassy-futures",
|
||||
"embassy-stm32",
|
||||
"embassy-sync",
|
||||
"embassy-time",
|
||||
"embassy-usb",
|
||||
"embedded-graphics",
|
||||
"embedded-hal 1.0.0",
|
||||
"heapless 0.9.1",
|
||||
"micromath",
|
||||
"panic-halt",
|
||||
"panic-probe",
|
||||
"tinybmp",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hash32"
|
||||
version = "0.3.1"
|
||||
@@ -668,6 +644,16 @@ dependencies = [
|
||||
"stable_deref_trait",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "heapless"
|
||||
version = "0.9.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b1edcd5a338e64688fbdcb7531a846cfd3476a54784dcb918a0844682bc7ada5"
|
||||
dependencies = [
|
||||
"hash32",
|
||||
"stable_deref_trait",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ident_case"
|
||||
version = "1.0.1"
|
||||
@@ -722,6 +708,12 @@ version = "1.21.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
|
||||
|
||||
[[package]]
|
||||
name = "panic-halt"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a513e167849a384b7f9b746e517604398518590a9142f4846a32e3c2a4de7b11"
|
||||
|
||||
[[package]]
|
||||
name = "panic-probe"
|
||||
version = "1.0.0"
|
||||
@@ -729,7 +721,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fd402d00b0fb94c5aee000029204a46884b1262e0c443f166d86d2c0747e1a1a"
|
||||
dependencies = [
|
||||
"cortex-m",
|
||||
"defmt 1.0.1",
|
||||
"defmt",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -900,7 +892,6 @@ checksum = "6fd8ec3a292a0d9fc4798416a61b21da5ae50341b2e7b8d12e662bf305366097"
|
||||
dependencies = [
|
||||
"cortex-m",
|
||||
"cortex-m-rt",
|
||||
"defmt 0.3.100",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -972,7 +963,7 @@ version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "98816b1accafbb09085168b90f27e93d790b4bfa19d883466b5e53315b5f06a6"
|
||||
dependencies = [
|
||||
"heapless",
|
||||
"heapless 0.8.0",
|
||||
"portable-atomic",
|
||||
]
|
||||
|
||||
|
||||
@@ -1,57 +1,27 @@
|
||||
[package]
|
||||
edition = "2024"
|
||||
name = "embassy-stm32u575zi-examples"
|
||||
version = "0.1.0"
|
||||
license = "MIT OR Apache-2.0"
|
||||
publish = false
|
||||
authors = ["Priec <filippriec@gmail.com>"]
|
||||
name = "hal_adc"
|
||||
edition = "2024"
|
||||
version = "0.1.0"
|
||||
|
||||
|
||||
[dependencies]
|
||||
# Embassy core crates from crates.io (no relative paths)
|
||||
embassy-stm32 = { version = "0.4.0", features = [
|
||||
"defmt",
|
||||
"stm32u575zi",
|
||||
"time-driver-any",
|
||||
] }
|
||||
embassy-sync = { version = "0.7.2", features = ["defmt"] }
|
||||
embassy-executor = { version = "0.9.1", features = [
|
||||
"arch-cortex-m",
|
||||
"executor-thread",
|
||||
"defmt",
|
||||
] }
|
||||
embassy-time = { version = "0.5.0", features = [
|
||||
"defmt",
|
||||
"defmt-timestamp-uptime",
|
||||
"tick-hz-32_768",
|
||||
] }
|
||||
embassy-usb = { version = "0.5.1", features = ["defmt"] }
|
||||
embassy-futures = { version = "0.1.2" }
|
||||
cortex-m = { version = "0.7.7", features = ["inline-asm", "critical-section-single-core"] }
|
||||
cortex-m-rt = "0.7.5"
|
||||
panic-halt = "1.0.0"
|
||||
|
||||
# Logging and panic behavior
|
||||
defmt = "1.0.1"
|
||||
defmt-rtt = "1.0.0"
|
||||
panic-probe = { version = "1.0", features = ["print-defmt"] }
|
||||
embassy-executor = { version = "0.9.1", features = ["arch-cortex-m", "executor-thread"] }
|
||||
embassy-futures = "0.1.2"
|
||||
embassy-stm32 = { version = "0.4.0", features = ["unstable-pac", "stm32u575zi", "time-driver-any", "memory-x"] }
|
||||
embassy-sync = "0.7.2"
|
||||
embassy-time = { version = "0.5.0", features = ["tick-hz-32_768"] }
|
||||
embassy-usb = "0.5.1"
|
||||
|
||||
# MCU + HAL utilities
|
||||
cortex-m = { version = "0.7", features = ["inline-asm", "critical-section-single-core"] }
|
||||
cortex-m-rt = "0.7"
|
||||
embedded-hal = "1.0.0"
|
||||
heapless = { version = "0.8", default-features = false }
|
||||
embedded-graphics = "0.8.1"
|
||||
heapless = { version = "0.9.1", default-features = false }
|
||||
micromath = "2.1.0"
|
||||
tinybmp = "0.6.0"
|
||||
micromath = "2.0.0"
|
||||
|
||||
[features]
|
||||
## Allow building secure binaries if TrustZone is enabled
|
||||
trustzone-secure = ["embassy-stm32/trustzone-secure"]
|
||||
|
||||
[profile.release]
|
||||
lto = "fat"
|
||||
opt-level = "s"
|
||||
debug = 2
|
||||
codegen-units = 1
|
||||
|
||||
[package.metadata.embassy]
|
||||
build = [
|
||||
{ target = "thumbv8m.main-none-eabihf", artifact-dir = "out/examples/stm32u5" }
|
||||
]
|
||||
panic-probe = { version = "1.0.0", features = ["defmt"] }
|
||||
defmt-rtt = "1.1.0"
|
||||
defmt = "1.0.1"
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
/* memory.x - STM32U575ZITxQ memory layout */
|
||||
|
||||
/* Flash: 2 MB starting at 0x08000000 */
|
||||
/* SRAM1 + SRAM2 + SRAM3 total 786 KB starting at 0x20000000 */
|
||||
|
||||
MEMORY
|
||||
{
|
||||
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 2048K
|
||||
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 786K
|
||||
}
|
||||
|
||||
/* provide stack start symbol (end of RAM) */
|
||||
_stack_start = ORIGIN(RAM) + LENGTH(RAM);
|
||||
Reference in New Issue
Block a user