rust-embedded / riscv

Low level access to RISC-V processors
841 stars 162 forks source link

Update for embedded-hal to 1.0.0-rc.2 #159

Closed purplethunder closed 11 months ago

purplethunder commented 11 months ago

embedded-hal 1.0.0-rc.2 introduced backwards incompatible changes that break riscv builds. This change pins the crate to 1.0.0-rc.1.

error[E0432]: unresolved import `embedded_hal::delay::DelayUs`
 --> riscv/src/delay.rs:3:5
  |
3 | use embedded_hal::delay::DelayUs;
  |     ^^^^^^^^^^^^^^^^^^^^^-------
  |     |                    |
  |     |                    help: a similar name exists in the module: `DelayNs`
  |     no `DelayUs` in `delay`

For more information about this error, try `rustc --explain E0432`.
MabezDev commented 11 months ago

I don't think we should accept this PR, instead we should upgrade riscv to the newest release candidate. Would you mind PRing that instead?

romancardenas commented 11 months ago

Hmm... maybe we need to bump riscv-rt to 1.60?

romancardenas commented 11 months ago

You will probably also need to update the CI to make it pass: https://github.com/rust-embedded/riscv/blob/f8c39238c815af9ca92ce945c0dc4ab83c58a004/.github/workflows/riscv-rt.yaml#L14

purplethunder commented 11 months ago

1.60.0 appears to be problematic as well.

romancardenas commented 11 months ago

Seems that the issue comes with riscv-target, used for building the riscv-rt crate and check the different RISC-V extensions...

I'll try to develop a quick solution to stop using this dependency and allow us to leave the MSRV to 1.60

romancardenas commented 11 months ago

@purplethunder check #160 and use my commit to get rid of the riscv-target build dependency. I think with that you should be able to pass the CI

romancardenas commented 11 months ago

Closing as #160 now solves this