-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add async methods. Add async example (Embassy executor).
- Loading branch information
1 parent
96079f4
commit 0d86643
Showing
7 changed files
with
368 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[target.thumbv7em-none-eabihf] | ||
rustflags = [ | ||
"-C", "link-arg=-Tlink.x", | ||
] | ||
|
||
[build] | ||
target = "thumbv7em-none-eabihf" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
[package] | ||
name = "mavlink-embedded-async-read" | ||
edition = "2021" | ||
authors = ["Patrick José Pereira <[email protected]>"] | ||
version = "0.1.0" | ||
|
||
[profile.release] | ||
opt-level = 'z' # Optimize for binary size, but also turn off loop vectorization. | ||
lto = true # Performs "fat" LTO which attempts to perform optimizations across all crates within the dependency graph | ||
|
||
[dependencies] | ||
cortex-m = { version = "0.7", features = [ | ||
"inline-asm", | ||
"critical-section-single-core", | ||
] } # Low level access to Cortex-M processors | ||
cortex-m-rt = "0.7" # Startup code and minimal runtime for Cortex-M microcontrollers | ||
rtt-target = "0.5" | ||
panic-rtt-target = "0.1" # Panic handler | ||
static_cell = "2.1" | ||
|
||
embassy-time = { version = "0.3", features = ["tick-hz-32_768"] } | ||
embassy-executor = { version = "0.5", features = [ | ||
"arch-cortex-m", | ||
"executor-thread", | ||
"executor-interrupt", | ||
"integrated-timers", | ||
] } | ||
embassy-stm32 = { version = "0.1", features = [ | ||
"memory-x", | ||
"stm32f446re", | ||
"time-driver-any", | ||
] } | ||
|
||
[dependencies.mavlink] # MAVLink library (wait for 0.9.0 version) | ||
path = "../../" | ||
features = ["common", "embedded"] | ||
default-features = false | ||
|
||
[patch.crates-io] | ||
embassy-time-driver = { git = "https://github.com/embassy-rs/embassy.git", rev = "86c48dde4192cabcad22faa10cabb4dc5f035c0a" } | ||
embassy-time-queue-driver = { git = "https://github.com/embassy-rs/embassy.git", rev = "86c48dde4192cabcad22faa10cabb4dc5f035c0a" } | ||
embassy-stm32 = { git = "https://github.com/embassy-rs/embassy.git", rev = "86c48dde4192cabcad22faa10cabb4dc5f035c0a" } | ||
|
||
[workspace] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# rust-MAVLink Embedded async example (with reading loop) | ||
### How to run: | ||
- Install cargo flash: | ||
- cargo install cargo-flash | ||
- Install target | ||
- rustup target add thumbv7em-none-eabihf | ||
- Check if we can build the project | ||
- cargo build | ||
- Connect your STM32f446re board | ||
- Flash it! | ||
- cargo flash --chip stm32f446RETx --release --log info |
Oops, something went wrong.