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

Add support for the ESP32-H2 #224

Closed
5 tasks done
jessebraham opened this issue Oct 24, 2022 · 19 comments
Closed
5 tasks done

Add support for the ESP32-H2 #224

jessebraham opened this issue Oct 24, 2022 · 19 comments
Assignees

Comments

@jessebraham
Copy link
Member

jessebraham commented Oct 24, 2022

I'll be taking care of this one as well (possibly in collaboration with some colleague(s)), and this likely won't happen until the new year, but just wanted to create a tracking issue regardless.

Status

  • Create an SVD
  • Create a PAC
  • Add support to ancillary crates (esp-backtrace, esp-println)
  • Create a HAL package
  • Final review and publication (in progress)
@jessebraham jessebraham self-assigned this Oct 24, 2022
@jessebraham jessebraham pinned this issue Oct 25, 2022
@jessebraham jessebraham unpinned this issue Jan 27, 2023
@jessebraham
Copy link
Member Author

I've begun work on HAL support for this device.

@jessebraham
Copy link
Member Author

Development will take place in this branch until the changes are ready to merge into main:
https://github.com/esp-rs/esp-hal/tree/feature/esp32h2

@jessebraham
Copy link
Member Author

jessebraham commented Apr 20, 2023

Merged #482 today which begins adding support for the H2. A few more PRs will likely be merged to this branch before merging into main.

I will periodically rebase the feature/esp32h2 branch on main until we're ready to merge.

@jessebraham
Copy link
Member Author

jessebraham commented May 9, 2023

Initial support for this device has been merged into main. We will continue to add support for additional peripherals in the coming weeks.

We can track the status roughly by tracking which examples are working:

  • adc
  • advanced_serial
  • aes
  • blinky
  • blinky_erased_pins
  • debug_assist
  • embassy_hello_world
  • embassy_i2c
  • embassy_serial
  • embassy_spi
  • embassy_wait
  • gpio_interrupt
  • hello_rgb
  • hello_world
  • i2c_bmp180_calibration_data
  • i2c_display
  • i2s_read
  • i2s_sound
  • interrupt_preemption
  • ledc
  • mcpwm
  • pcnt_encoder
  • pulse_control
  • qspi_flash
  • ram
  • read_efuse
  • rng
  • rsa
  • rtc_time
  • rtc_watchdog
  • serial_interrupts
  • sha
  • software_interrupts
  • spi_eh1_device_loopback
  • spi_eh1_loopback
  • spi_halfduplex_read_manufacturer_id
  • spi_loopback
  • spi_loopback_dma
  • systimer
  • timer_interrupt
  • usb_serial_jtag
  • watchdog

In addition to the above examples, we must also address the direct-boot feature:

  • Fix the direct-boot feature and re-enable in CI

Once all the above items have been completed, we need to do a final pass of review, cleanup, documentation, etc.

  • Final review and cleanup prior to publishing
    • Make sure Cargo.toml and README.md are in good shape
    • Eliminate any warnings that may still be present
    • Use a published version of the PAC (when available)

@jessebraham
Copy link
Member Author

I will start working on the six SPI-related examples: embassy_spi, spi_eh1_device_loopback, spi_eh1_loopback, spi_halfduplex_read_manufacturer_id, spi_loopback, and spi_loopback_dma.

@SergioGasquez
Copy link
Member

SergioGasquez commented May 11, 2023

I'm working on RSA and SHA

Also, I've tried to add support for RNG but the bootloader that we currently use does not have bootloader_random_enable/bootloader_random_disable implemented yet, hence RNG can't work. We'll need to check if there is a more recent bootloader or wait until those methods are implemented.

@SergioGasquez
Copy link
Member

SergioGasquez commented May 11, 2023

Also, I've tried to add support for RNG but the bootloader that we currently use does not have bootloader_random_enable/bootloader_random_disable implemented yet, hence RNG can't work. We'll need to check if there is a more recent bootloader or wait until those methods are implemented.

Just tried with the latest esp-idf bootloader, and it still does not implement those methods, here is how I tried it:

  1. Downloaded esp-idf master
  2. Installed it for esp32h2
  3. Built, flash and monitored (idf.py flash monitor) one of the examples (get-started/blink)

Results in:

I (23) boot: ESP-IDF v5.2-dev-503-g17451f1fb3 2nd stage bootloader
...
W (48) bootloader_random: bootloader_random_enable() has not been implemented yet
...
I (155) boot: Disabling RNG early entropy source...
W (160) bootloader_random: bootloader_random_disable() has not been implemented yet

Update: did some more research on this end and ESP-IDF has also this issue tracked under espressif/esp-idf#11038, once that IDF-6274 is fixed, we may add it.

@jessebraham
Copy link
Member Author

jessebraham commented May 17, 2023

Added a few more examples in #548 (advanced_serial, embassy_hello_world, systimer, usb_serial_jtag).

The SPI examples are "done" but there are some issues to be debugged, so still in-progress.

EDIT: figured out the issues, see #549 for SPI examples.

@SergioGasquez
Copy link
Member

Working on PCNT!

@jessebraham
Copy link
Member Author

jessebraham commented May 18, 2023

Working on all the interrupt-related examples (ie. those with interrupt in their names)

(See #557)

@SergioGasquez
Copy link
Member

Working on RMT!

@playfulFence
Copy link
Contributor

playfulFence commented May 23, 2023

I'll take i2s! (both read and sound)

@JurajSadel
Copy link
Contributor

I will look into LEDC

@SergioGasquez
Copy link
Member

Im working in debug_assist

@JurajSadel
Copy link
Contributor

I'm working on ADC 😅

@JurajSadel
Copy link
Contributor

Looking into timer_interrupt example

@JurajSadel
Copy link
Contributor

I'll look into i2s

@jessebraham
Copy link
Member Author

With #597 merged we have completed all examples for this device!

We should done one final round of review (clean up any warnings, etc.) and verify that all examples are still working (this is in-progress) and then I think we're good for our first release!

Thanks to everybody who contributed to supporting this device!

@jessebraham
Copy link
Member Author

esp32h2-hal@0.1.0 has been published!

@jessebraham jessebraham unpinned this issue Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

4 participants