embassy/docs/modules/ROOT/pages/faq.adoc

39 lines
1.4 KiB
Plaintext
Raw Normal View History

2023-11-21 15:38:33 +01:00
= Frequently Asked Questions
These are a list of unsorted, commonly asked questions and answers.
Please feel free to add items to link:https://github.com/embassy-rs/embassy/edit/main/docs/modules/ROOT/pages/faq.adoc[this page], especially if someone in the chat answered a question for you!
== How to deploy to RP2040 without a debugging probe.
Install link:https://github.com/JoNil/elf2uf2-rs[elf2uf2-rs] for converting the generated elf binary into a uf2 file.
Configure the runner to use this tool, add this to `.cargo/config.toml`:
[source,toml]
----
[target.'cfg(all(target_arch = "arm", target_os = "none"))']
runner = "elf2uf2-rs --deploy --serial --verbose"
----
The command-line parameters `--deploy` will detect your device and upload the binary, `--serial` starts a serial connection. See the documentation for more info.
2023-11-21 15:38:33 +01:00
== Missing main macro
If you see an error like this:
[source,rust]
2023-11-21 16:01:46 +01:00
----
2023-11-21 15:38:33 +01:00
#[embassy_executor::main]
| ^^^^ could not find `main` in `embassy_executor`
2023-11-21 16:01:46 +01:00
----
2023-11-21 15:38:33 +01:00
You are likely missing some features of the `embassy-executor` crate.
For Cortex-M targets, consider making sure that ALL of the following features are active in your `Cargo.toml` for the `embassy-executor` crate:
* `arch-cortex-m`
* `executor-thread`
* `nightly`
2023-11-21 15:51:56 +01:00
For Xtensa ESP32, consider using the executors and `#[main]` macro provided by your appropriate link:https://crates.io/crates/esp-hal-common[HAL crate].