Closed RaynalHugo closed 8 months ago
I don't have an esp32h2
board yet, so I can only guess what is going on here.
There's a slim chance that it could be caused by us using the wrong Rust target (but the chance is really slim!).
What you can do, is to enable the riscv32imac-esp-espidf
target in your .cargo/config.toml
file (pay attention - the currently enabled target there is most likely riscv32imc-esp-espidf
, without the "a") and then try again.
If it works for you with this change (but the chance is really slim), I'll update esp-idf-sys
to default to the imAc target for the h2.
I don't have an
esp32h2
board yet, so I can only guess what is going on here. There's a slim chance that it could be caused by us using the wrong Rust target (but the chance is really slim!).What you can do, is to enable the
riscv32imac-esp-espidf
target in your.cargo/config.toml
file (pay attention - the currently enabled target there is most likelyriscv32imc-esp-espidf
, without the "a") and then try again.If it works for you with this change (but the chance is really slim), I'll update
esp-idf-sys
to default to the imAc target for the h2.
The template already uses the IMAC target: https://github.com/esp-rs/esp-idf-template/blob/master/cargo/pre-script.rhai#L28
I'm out of ideas then. In any case we need to update esp-idf-sys
as it is not deriving the IMAC target.
I can confirm that the template I used had the riscv32imac-esp-espidf
target.
I don't have an
esp32h2
board yet, so I can only guess what is going on here.
@ivmarkov let me know, if there is anything you want me to try on my end. Thank you for having a look at this anyway!
@RaynalHugo Did you manage to get it to work? I got my h2-devkit yesterday and sadly have the exact same problem.
@Syphixs Unfortunately, I haven't. I paused this project for a moment. But please let me know if you find any workaround.
@ivmarkov just revamped the template project and bumped dependencies, please try generating a new project and trying it again, I did some testing on C6 which also had a similar issue and it was now working fine
@ivmarkov just revamped the template project and bumped dependencies, please try generating a new project and trying it again, I did some testing on C6 which also had a similar issue and it was now working fine
I confirm that re-generating your project might fix it.
The previous version of the template did not set the MCU=esp32h2
variable, so it is likely that you got something compiled for a different MCU altogether.
Just tried with an ESP32-H2 and I can confirm that the problem is now fixed!
Hey there 👋 First of all, I'd like to thank you all for the work you provide here. I am relatively new to embedded rust. The various books, tools and examples you provide made it easier for me to start in this field! ❤️
Bug description
Template using std doesn't work on esp32-h2. Whereas the no-std template work
To Reproduce
Steps to reproduce the behavior:
cargo generate esp-rs/esp-idf-template cargo
esp32h2
as a MCU to targetfalse
)cd
to the newly created foldercargo run
/dev/tty.usbserial-10 - CP2102N USB to UART Bridge Controller
, or/dev/cu.usbserial-10 - CP2102N USB to UART Bridge Controller
, the result seems to be the same)The process now enters a loop, this is the first output
Then, this part gets repeated every 7-8s, indefinitely.
Expected behavior
When I use the no std version, using
cargo generate esp-rs/esp-template
, this is the log I receive:(And , it doesn't loop)
Environment
I installed all dependencies following the documentation.
rust-toolchain.toml
)Additional context
Thank you for looking into this! Let me know if there is anything I can do on my side to help out.