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: changes to use ESP-IDF HAL/LL API #17841

Closed
wants to merge 46 commits into from

Conversation

gschorcht
Copy link
Contributor

@gschorcht gschorcht commented Mar 22, 2022

Contribution description

This PR is provides all changes that are required to support other variants (families) of the ESP32 SoC series.

As a follow up to PR #17601, this PR contains all the changes to not use the ESP32 at the register level, but to use the ESP-IDF HAL and LL APIs. HAL and LL APIs provide an interface that is independent on used ESP32 SoC family. This allows the support of other variants of the ESP32 SoC series with very little effort.

Since this PR is a splitt-off of a subsequent PR for the ESP32C3 variant, it already contains some changes which

  • make the ESP32 implementation independent of the used ESP32 SoC family
  • make the ESP32 implementation independent of the Xtensa architecture
  • contains conditional code for other ESP32 SoC variants
  • takes the RISC-V based ESP32 architecture into account.

It was impossible to completely clean up the fork from the aforementioned changes and would not have made sense.

This PR includes PR #17601 for the moment to be compilable. Once PR #17601 is merged, this PR is rebased. The first additional commit of this PR is e2ecce7.

Testing procedure

Green CI with test run.

Issues/PRs references

Depends on PR #17601
Prerequisite for PR #17842
Splitt-offs from this PR are #18246 #18247 #18248 #18249 #18250 #18252 #18253 #18259 #18260 #18261 #18266 #18267 #18268 #18271 #18270 #18272 #18273 #18274 #18276 #18277 #18278 #18279 #18280 #18281 #18282

@github-actions github-actions bot added 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: Kconfig Area: Kconfig integration Area: pkg Area: External package ports Area: sys Area: System Area: tools Area: Supplementary tools Platform: ESP Platform: This PR/issue effects ESP-based platforms labels Mar 22, 2022
@gschorcht gschorcht added State: waiting for other PR State: The PR requires another PR to be merged first CI: run tests If set, CI server will run tests on hardware for the labeled PR Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation labels Mar 22, 2022
@gschorcht gschorcht force-pushed the cpu/esp32/periph_hal_esp32 branch from 5cf4865 to 63b3532 Compare March 22, 2022 14:41
@gschorcht gschorcht force-pushed the cpu/esp32/periph_hal_esp32 branch from 63b3532 to 727afc9 Compare March 23, 2022 06:01
@gschorcht gschorcht force-pushed the cpu/esp32/periph_hal_esp32 branch 3 times, most recently from bc67814 to 7209985 Compare April 6, 2022 05:40
@gschorcht gschorcht force-pushed the cpu/esp32/periph_hal_esp32 branch from 7209985 to 492a78e Compare May 1, 2022 00:09
@gschorcht gschorcht requested a review from MrKevinWeiss as a code owner May 1, 2022 00:09
@gschorcht
Copy link
Contributor Author

@benpicco I'm sorry for producing so many PRs and CI compilation load (for some even twice, I wish the hash value problem was already solved), but these are the changes as split-offs from this PR that are small enough and can be compiled independently.

PR #18246, #18247, #18248, #18249, #18250, #18252, and #18252 are all changes necessary to use the ESP-IDF HAL/LL except for the peripherals. Once these PRs are merged, I can provide the changes PR by PR for the peripherals (21 commits).

@gschorcht
Copy link
Contributor Author

@benpicco Do you think there is a chance to continue reviewing and merging the small spin-offs from this PR in the next few days? They are the prerequisite for me to split PR #17842 into smaller PRs, which in turn are the prerequisite for PR #17844, the first ESP32x variant support. Not that we are finally using ESP-IDF 4.4 when it is already obsolete 😉 ESP-IDF 5.0 seems to be already released and supports the very interesting ESP32H2 RISC-V based SoC with BLE 5.0 and IEEE802.15.4.

@gschorcht
Copy link
Contributor Author

All splitt-offs were merged, so we can close this PR.

@gschorcht gschorcht closed this Jul 18, 2022
@gschorcht gschorcht deleted the cpu/esp32/periph_hal_esp32 branch August 31, 2022 08:42
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: Kconfig Area: Kconfig integration Area: pkg Area: External package ports Area: tools Area: Supplementary tools CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ESP Platform: This PR/issue effects ESP-based platforms 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.

4 participants