georgik / esp32-spooky-maze-game

Rust Bare Metal implementation of maze game for ESP32
MIT License
30 stars 7 forks source link

Fix build on ESP32C3 LCD Kit by upgrading HAL #74

Open ottobonn opened 5 months ago

ottobonn commented 5 months ago

Thanks for making this project; it's a major help to people like me trying to get into Rust programming on ESP32 while the documentation is still lacking.

I was not able to compile this code for the ESP32C3 LCD Kit due to several different errors, the most pressing of which was the fact that newer versions of the mipidsi crate require the DelayNs trait to be present on Delay, but older versions of the esp32c3-hal don't implement it.

Upgrading the HAL in various places fixes the issue for this board. I haven't addressed the other boards in this PR; this is just to show what might be required to upgrade them. I did the corresponding upgrade to the DMA display driver as well.

georgik commented 5 months ago

@ottobonn Thank you very much for the upgrade. Amazing work!

I was waiting with upgrade until guys finished unification of HAL. Let me do some tests and validation before merging PR.

ottobonn commented 5 months ago

The changes I made to the DMA display driver definitely broke the other boards, so this PR isn't complete yet!

georgik commented 5 months ago

@ottobonn I've tested the build and flash with the latest Rust. It works nicely. I've just noticed, that the project is downloading all hals, which seems to be reduntant. Other than that, the changes seems to be in the good direction.

Do you plan to update rest of boards? Just let me know, I can replicate your changes and test it with real HW for all combinations.

ottobonn commented 5 months ago

I don't think I quite know enough about the other boards to make the changes for them, so you can go ahead! Thanks for taking a look!

georgik commented 4 months ago

@bjoernQ Do you have any suggestion how to update esp-display-interface-spi-dma to esp-hal 0.17?

I've got half way through the compilation, but it seems that there is need for one additional generic. I would appreciate any hint. Here's PR for esp-display-interface-spi-dma: https://github.com/georgik/esp-display-interface-spi-dma/pull/1/files

bjoernQ commented 4 months ago

@bjoernQ Do you have any suggestion how to update esp-display-interface-spi-dma to esp-hal 0.17?

I've got half way through the compilation, but it seems that there is need for one additional generic. I would appreciate any hint. Here's PR for esp-display-interface-spi-dma: https://github.com/georgik/esp-display-interface-spi-dma/pull/1/files

You probably don't need to be generic over DmaMode and just use esp_hal::Blocking I guess

georgik commented 4 months ago

During the upgrade of esp-display-interface-spi-dma we discovered a limitation of new HAL API https://github.com/esp-rs/esp-hal/issues/1512 . We need to figure out a proper solution to make the upgrade possible.