Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document how to run examples #7

Open
tschundler opened this issue Oct 14, 2024 · 1 comment
Open

Document how to run examples #7

tschundler opened this issue Oct 14, 2024 · 1 comment

Comments

@tschundler
Copy link
Contributor

Unlike esp-hal, something like cargo xtask run-example esp-hal-smartled esp32 hello_rgb does not work, and if it did, it isn't documented here.

attempts to cargo run --example hello_rgb --features esp32 were unsuccessful, even adding toolchain.toml to use esp toolchain, and I tried putting these in /cargo/config.toml:

[build]
target = "xtensa-esp32-none-elf"

[target.xtensa-esp32-none-elf]
runner = "espflash flash --monitor"

still no luck. I'm sure it's something simple that I'm missing, but I don't know what.

@akauppi
Copy link

akauppi commented Jan 5, 2025

I got the example adopted in another repo, but cannot build it here.

$ cargo run --features=esp32c6 --release --example=hello_rgb
[...]
   Compiling rand_core v0.6.4
error[E0583]: file not found for module `arch`
  --> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/esp-backtrace-0.14.2/src/lib.rs:46:1
   |
46 | pub mod arch;
   | ^^^^^^^^^^^^^
   |
   = help: to create the module `arch`, create file "/home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/esp-backtrace-0.14.2/src/arch.rs" or "/home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/esp-backtrace-0.14.2/src/arch/mod.rs"
   = note: if there is a `mod arch` elsewhere in the crate already, import it with `use crate::...` instead

   Compiling smart-leds v0.4.0
error[E0425]: cannot find function `backtrace` in module `crate::arch`
  --> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/esp-backtrace-0.14.2/src/lib.rs:69:34
   |
69 |     let backtrace = crate::arch::backtrace();
   |                                  ^^^^^^^^^ not found in `crate::arch`

error[E0425]: cannot find value `RA_OFFSET` in module `crate::arch`
  --> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/esp-backtrace-0.14.2/src/lib.rs:76:55
   |
76 |         println!("{}0x{:x}", RED, addr - crate::arch::RA_OFFSET);
   |                                                       ^^^^^^^^^ not found in `crate::arch`

Some errors have detailed explanations: E0425, E0583.
For more information about an error, try `rustc --explain E0425`.
error: could not compile `esp-backtrace` (lib) due to 3 previous errors
warning: build failed, waiting for other jobs to finish...

I am not able to understand what's really going on... And the fact that if I depend on esp-hal-smartled and smart-leds from another repository, dependencies are found, makes it a bit more bizarre.

Anyways, can help test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants