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

cpu/esp32: Migration to ESP-IDF v5.4 #21261

Open
wants to merge 76 commits into
base: master
Choose a base branch
from

Conversation

gschorcht
Copy link
Contributor

@gschorcht gschorcht commented Mar 2, 2025

Contribution description

This PR provides the migration to ESP-IDF v5.4. There are some very small problems to be fixed:

Module implemented esp32 esp32s2 esp32s3 esp32c3
periph/adc x OK OK OK OK
periph/can x OK - - -
periph/cpuid x OK OK OK OK
periph/dac x OK OK - -
periph/flash x OK OK OK OK
periph/flashpage x OK OK OK OK
periph/gpio x OK OK OK OK
periph/gpio_ll x OK OK OK OK
periph/gpio_ll_irq x OK OK OK OK
periph/hwrng x OK OK OK OK
periph/i2c_sw x OK OK OK OK
periph/i2c_hw x OK OK OK OK
periph/pm x (OK) OK OK OK
periph/pwm x OK OK OK OK
periph/rtt x - - - -
periph/rtt_sys x OK OK OK OK
periph/rtt_hw x OK OK - -
periph/sdmmc x OK - ERR -
periph/spi x OK OK OK OK
periph/timer x OK OK OK OK
esp_hw_counter x OK OK OK -
esp_spi_ram x OK OK OK -
esp_eth x OK - - -
esp_now x OK OK OK OK
esp_wifi x OK OK OK OK
esp_wifi_ap x OK OK OK OK
esp_wifi_enterprise x OK OK OK OK
esp_ble_nimble x OK - OK OK
esp_ble_nimble + esp_wifi x OK - OK OK
esp_idf_gpio_hal x OK OK OK OK
esp_idf_usb x - OK OK -
esp_idf_heap x OK OK OK OK
stdio_usb_serial_jtag x - - OK OK
tinyusb x - -
ztimer x OK OK OK OK

Problems to be solved (checked when solved)

  • WiFi Enterprise is not working
  • Wake-up on UART doesn't work for ESP32
  • Ethernet send process hangs while receiving packets
  • SDMMC doesn't work reliable on ESP32-S3
  • ws281x RMT peripheral uses the legacy driver
  • Legacy driver used for esp_i2c_hw
  • pkg/tinyusb is not compilable

The PR includes PR #21144 for now to be compilable with local toolchain installtion.

Testing procedure

t.b.d.

Issues/PRs references

Depends on PR #21144
Depends on PR RIOT-OS/riotdocker#255 to be compilable in riotdocker and CI

@gschorcht gschorcht requested a review from kaspar030 as a code owner March 2, 2025 15:22
@github-actions github-actions bot added Area: doc Area: Documentation Area: build system Area: Build system Area: pkg Area: External package ports Area: tools Area: Supplementary tools Area: boards Area: Board ports Platform: ESP Platform: This PR/issue effects ESP-based platforms Area: cpu Area: CPU/MCU ports labels Mar 2, 2025
@gschorcht gschorcht added the Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation label Mar 2, 2025
@gschorcht gschorcht force-pushed the cpu/esp32/migration_to_esp-idf.5.4 branch 2 times, most recently from cb7fef6 to 87d66cf Compare March 2, 2025 15:58
@crasbe
Copy link
Contributor

crasbe commented Mar 4, 2025

This PR supersedes PR #18767, doesn't it?

@gschorcht gschorcht added the State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet label Mar 4, 2025
@gschorcht gschorcht force-pushed the cpu/esp32/migration_to_esp-idf.5.4 branch from 87d66cf to a72bdd3 Compare March 4, 2025 14:06
@gschorcht
Copy link
Contributor Author

This PR supersedes PR #18767, doesn't it?

Yes.

@gschorcht gschorcht force-pushed the cpu/esp32/migration_to_esp-idf.5.4 branch 3 times, most recently from cc47218 to cb22538 Compare March 14, 2025 17:35
@gschorcht gschorcht requested a review from maribu as a code owner March 14, 2025 17:35
@github-actions github-actions bot added the Area: drivers Area: Device drivers label Mar 14, 2025
Copy link
Member

@maribu maribu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx, looks good to me. Some comments/questions inline.

Removes the echo command that was added in past for debugging.
When sourcing a script, $0 refers to the shell in which the script is running, not the script being sourced. The only way to refer the install script is to specify the full path based on a variable pointing to the RIOT directory.
It is needed in the future to implement WPA3. In that case ESP-IDF uses crypto and tls from mbedtls.
SD Card responses on CMD3 with R6 instead of R3 to publish its RCA. Bug found when migrating SDMMC for ESP32x to ESP-IDF v5.4.
@gschorcht gschorcht force-pushed the cpu/esp32/migration_to_esp-idf.5.4 branch from cb22538 to ef490ba Compare March 15, 2025 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: boards Area: Board ports Area: build system Area: Build system Area: cpu Area: CPU/MCU ports Area: doc Area: Documentation Area: drivers Area: Device drivers Area: pkg Area: External package ports Area: tools Area: Supplementary tools Platform: ESP Platform: This PR/issue effects ESP-based platforms State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants