-
Notifications
You must be signed in to change notification settings - Fork 2k
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: Upgrade to ESP-IDF v4.4 #17601
cpu/esp32: Upgrade to ESP-IDF v4.4 #17601
Conversation
a1e2c71
to
cbea8bc
Compare
c74d1b0
to
2063c2e
Compare
Regarding the What I am most interested in here is that the But what is confusing me is the fact, that in RIOT CPUs say, that they support Rust by setting the |
I am currently working on the EPS32C3 support, also to see how best to structure the
In this way it should be possible to enable the
But to be honest, I can't say if and how it will work with Rust at all. Neither do I have experience with Rust, nor do I know how it uses the ESP-IDF. The RIOT port uses only a small part and a slightly patched version of the ESP-IDF. At the moment I don't have time to learn anything about Rust, so this is not my focus. |
Do you have a PR for riotdocker too? |
Not yet. At the moment I am working intensively on the port for the ESP32C3 (RISC-V based) to see what is the best way to restructure the |
WIth PR #17734 and some additional small changes of this PR (I will provide them soon) it will become possible to use the precompiled Espressif toolchains as they are. |
@leandrolanzieri In addition to this ESP32 port for ESP-IDF 4.4, I have already a working and complete port for the RISC-V based ESP32C3 which can be adapted quite easy to other ESP32x variants. Could you please have a look at https://www.espressif.com/en/products/socs where you can get a complete overview of all ESP32x SoCs, their variants and modules that are used by most boards. Do you have any idea how we can structure them in a way that makes sense without defining each possible combination. For example, the RISC-V based ESP32-C3 doesn't have flash on chip, but the ESP32-C3-WROOM-02x module which is used by ESP32-C3-DevKitC-02 has 4 MB external flash on module. On the other hand, ESP32-C3-FN4 and ESP32-C3-FH4 have 4 MB embedded flash that are used by module ESP32-C3-MINI-1x which in turn is used by the ESP32-C3-DevKitM-1 board. In fact all boards that use these modules have the same size of RAM/ROM/SRAM and Flash. The situation becomes much more difficult for ESP32-S3 where there are 5 chip variants with different sizes of Flash and PSRAM on chip. It becomes even more difficult because there are 20 versions of the ESP32-S3-WROOM-1x module with different sizes of Flash and PSRAM on module. That is, the initial idea to identify the size of RAM and Flash by the CPU model doesn't work here. Any suggestion is welcome. |
Assertions for uninitialized locks must not be triggered as long as the scheduler is not running. Furthemore, the handling of the __malloc_static_object lock is only necessary for ESP8266.
2fd98d3
to
aa9dd30
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran some tests on my esp32-wroom-32
, all looking good:
- examples/gnrc_border_router (
esp_wifi
&esp_now
) - tests/mtd_raw
- tests/periph_gpio
- tests/periph_i2c
- tests/periph_rtc
- tests/periph_rtt
- tests/periph_hwrng
- tests/periph_adc
I don't have a board with esp_eth
interface, maybe @yarrick could test that.
But if you already checked that there is no regression, I would trust your testing, you can just merge in that case.
Test output of
|
Thanks to everyone who reviewed, supported, and finally merged this large PR, especially @benpicco. As next step, I will rebase PR #17841 which replaces peripheral implentations for ESP32 by an implementation that uses the ESP-IDF HAL for ESP32x peripherals. This is the prerequesite for the port to ESP32-C3 PR #17844 and ESP32-S3 that is already completely working. |
Contribution description
This PR provides an upgrade of the ESP32 port to ESP-IDF v4.4 with following changes:
esp_sdk
is upgraded to newest ESP-IDF release v4.4esp32_sdk
To ensure that the RIOT port for ESP32 is still working and to keep the changes as small as possible, the implementations of the peripherals are not changed for the moment. They still use the hardware directly and therefore can only be used for the ESP32.
The next steps will be to change step by step the peripheral implementations to use the HAL provided by the ESP-IDF (PR #17841) for all ESP32 variants. This will allow to support these variants (PR #17842, PR #17843) without having to re-implement the peripheral implementations for each ESP32 variant again and again.
Testing procedure
Can't be compiled nor tested in CI since the PR requires a new toolchain version. This new toolchain version includes
I will provide it on GitHub in next days.
Issues/PRs references