Closed jcard0na closed 2 years ago
Should be fixed now.
By the way - and I'm not sure what you are trying to achieve - but - using no_std
on top of ESP-IDF is pretty much pointless.
It only exists "because we can", and "just in case".
Rust support for ESP-IDF is a STD compatible environment anyway, so you are not winning anything by living in no_std
land, and losing a lot. As in how do you plan to e.g. use networking or spin threads?
With that said, no_std
has value for library crates that depend only on embedded-hal
and embedded-svc
, as this makes these portable across various MCUs. But you should not be using the esp-idf-template
for library MCU-agnostic crates anyway.
Thanks a lot for the clarification @ivmarkov.
Mi project does not use networking, nor spin threads. I only use an epd display on waveshare's esp32 driver board. I was looking to use no_std
because I'm migrating a no_std
project from a different target and did not want to inadvertently introduce std
dependencies that would prevent me to migrate back. For my use case, the ideal environment would be to depend exclusively on embedded-hal
and embedded-svc
and not use ESP-IDF at all, but I do not think that is possible with this target, is that right?
Cheers,
With or without this target, there is no chance to not depend on something which is MCU specific. I mean, e.g. instantiating the SPI and pins is always MCU specific and not covered by e.g. embedded-hal
which is just a bunch of traits. Regardless of the MCU.
If you want to split your code to MCU-independent part and MCU-dependent part, you should use two crates: a library crate which only depends on embedded-hal
, and then a binary crate that depends on the MCU specific hal stuff and also on the library crate.
As for embedded-svc
- given that you just want to draw on an epd display, you don't need that at all.
And, it currently has an implementation for the ESP32 anyway (in esp-idf-svc
). With a PC (and RPI) implementation likely to follow sometime this year.
I just tried to build a
no_std
project and it failed to compile.std
project compiles and runs successfully.Project created as:
Then built as...
Same toolchain,
std
project builds fine...