cpu/esp32: add ESP32-C6 support#21616
Conversation
crasbe
left a comment
There was a problem hiding this comment.
As usual, just some styling stuff and typos. Everything else looks good. Next week I should probably have a C6 board for testing, then I can test the BLE and IEEE 802.15.4 PRs afterwards too.
Thank you for your continued herculean effort on the ESP32s :)
pkg/esp32_sdk/patches/0042-esp_system-cpu_start-keep-PLL-running-for-lower-CPU-.patch
Outdated
Show resolved
Hide resolved
tests/build_system/external_board_dirs/esp-ci-boards/esp32c6-ci/Kconfig
Outdated
Show resolved
Hide resolved
e5e8b5d to
7134725
Compare
|
My ESP32C6 devkit finally arrived and I can try this PR out. Unfortunately it appears that there are two errors occurring: First it tries to get something with an invalid tag and then it seems to select the wrong SDK. This is odd because I ran the export script, but it does not appear to actually alter the PATH variable: Adding the PATH manually does not change the behavior of the compilation though. It still gives the same error. What worked is removing the other SDK from my Not sure what the best way forward is here, but considering the C6 needs a newer SDK, it's not unlikely that $USER will run into the same issue that an old SDK will be present and selected Searching for the SHA checksum reveals that it's the ESP32 SDK: Line 4 in f572bbe It's quite odd though because that IS a valid commit ID of that repository: https://github.com/espressif/esp-idf/tree/c8bb53292d08d6449a09823cf554e62ac839cd8c The error only occurs on the first compilation run, not on the second one. Speaking of race conditions: When calling This does not happen when not using multiple threads. I also noticed a typo in the documentation (unrelated to this PR). It should be `export.sh` instead of `install.sh` in this line. https://github.com/RIOT-OS/RIOT/blob/f572bbeef9d1d769ba0c4ec72e356105907bd487/cpu/esp32/doc.md?plain=1#L538 I could make a separate PR, but I want to avoid a merge conflict with your PR. |
|
I successfully tested |
Really strange. If I remember correctly, I've never seen this error before, even when switching back and forth between different SDK versions.
🤔 Obviously, we need to improve the script a little. It checks whether the compiler for the architecture is already included in the PATH, but the check is not version-sensitive 😟 More bad is printed out even if the path was not added. It suggests that the PATH was extended by the right version of the compiler for the architecture. |
|
The script problem is not new for ESP32-C6, it affects all ESP32x variants and should be fixed, probably as a separate PR. |
|
As always: Stackoverflow to the rescue! https://stackoverflow.com/a/6445255 This is the command that causes the error: Line 10 in f572bbe I ran the following command: As you can see, the result of the This only happens the very first time I call the make command in a fresh repository or after I ran In terms of fixing that, I'll have to tinker with the proposed solutions in Stackoverflow some more. But yeah, this is fine for a separate PR. I just wanted to document my experience :) |
|
Alternatively to |
|
I found the issue. Apparently the SHA1 sum is not correct for the v5.4 tag: https://github.com/espressif/esp-idf/tree/v5.4 has This also results in |
Hm, I can't reproduce it after removing Might it be that it is because I use |
|
With So what does I know that this is going beyond this PR, but the fact is that if one is not using |
ESP-IDF just requires that |
It doesn't seem that this one failed. It would have been interesting what |
|
Okay, this is mean: Lines 154 to 177 in 51958b3 When a git cache is present, the Removing the Now.. obviously that's not a good idea, because for some repositories that would increase the clone time MASSIVELY. With a fast internet connection, this adds about 16 seconds to the build process, but of course only the first time. I'll create a separate PR for this, because this is already derailed a bit 😅 |
My bad, I can't read the documentation. There is a smöl dot in front of the export script that means that the script is "sourced". I did not know what "sourcing a script" means, but apparently it means that it's run in the same shell as the calling shell and not in a sub-shell. I'll create another PR to make the documentation more explicit and I have some lines of code to add to the script to check if it was "sourced". |
crasbe
left a comment
There was a problem hiding this comment.
Since all the sidequests are now addressed in separate PRs, this is good to go. Please squash :)
Use an external board definition to be able compile modules that are not enabled by default in CI.
d45a263 to
3af41ab
Compare
|
Thanks for reviewing and approving the PR. Now we support more ESP32 variants than the Zephyr project 😉 |
Contribution description
This PR adds the support for the ESP32-C6 variant, a RISC-V based ESP32x SoC with WiFi, IEEE802.15.4 and Bluetooth 5 (LE). It includes a board definition for the Espressif development board ESP32-C6-DevKitM-1.
Testing procedure
Basic tests for peripherals and ESP-specific modules have to work. Following peripherals and modules have been tested successfully:
[-] not supported by ESP32-H2
Issues/PRs references