-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
ESP32-C3 boot-loops with CP 8.0.0-beta.2 #7060
Comments
I did a bisect on esp-idf to track this down, and the breaking commit is |
I'm seeing the same issue with ESP32 boards. Not with ESP32-S3. |
This issue is also present in |
What board is it ? I'm not seeing it with the Feather ESP32 V2.
|
First off let me say that I'm a complete amatuer here. I was porting circuitpython to non-adafruit boards. I able to get it to work on M5-ATOM by rewriting Huzzah32. I also got it to work on M5-STAMP-c3u by rewriting QTYPY-esp32-c3. They worked rather well with REPL and Workflow. However, since the last update none of them work. I get a boot up message that ends with "Serial console setup" and nothing more. The ESP32 chip that goes with those are very basic, while the chip that goes with the feather esp32v2 has more memory and doesn't port to those more basic chips. |
I believe we can narrow this issue down to only being present on |
After some more testing, I think these are two different problems. The ESP32 problem is a simple hang; the ESP32-C3 problem is a boot-loop. More on ESP32-C3 problem in the next comment. I will re-title this and open another issue for ESP32. |
From the current tip of Now we need to do some more C3/RISC-V-specific searching in the ESP-IDF issues, etc. to see if anyone else is seeing this. |
Recording some notes: I did a debug build and added some logging to catch where it's hanging:
The last four lines are logging I added, in esp-idf/components/esp_system/startup.c, in the #if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
ESP_EARLY_LOGI("ESP_SYSTEM_INIT_FN", "before esp_coex_adapter_register"); /// ADDED
esp_coex_adapter_register(&g_coex_adapter_funcs);
ESP_EARLY_LOGI("ESP_SYSTEM_INIT_FN", "before coex_pre_init"); /// ADDED
coex_pre_init(); /// <-------------------------
ESP_EARLY_LOGI("ESP_SYSTEM_INIT_FN", "after coex_pre_init"); /// ADDED
#endif (EDIT: compile-time testing shows that both Interestingly, there is a substantial size difference between the |
RV32IMC: the base 32-bit instruction set, with "M" (integer multiplication & division) and "C" (compressed instruction) support. Notably, without "F", it would be software floating point. RV32GC: "G" is "Shorthand for the IMAFDZicsr_Zifencei base and extensions" and "C" is compressed again. That alphabet soup says there's support for things like atomic instructions, single and double precision floating point arithmetic, and a few others. So RV32GC is strictly a superset of IMC. https://en.wikipedia.org/wiki/RISC-V#ISA_base_and_extensions |
@microdev1 Since the failure is happening very early, in |
Not sure if it helps any, but I figured out the specific build where this started happening, at least for the Seeed XIAO ESP32C3. The error does not occur on |
I did a bisect inside esp-idf to narrow it down further inside the esp-idf update. See #7060 (comment). The change that causes the problem is not a code change in esp-idf, but an update to the compiler toolchain. |
I am having a problem too with the same model XIAO. The S1 version you provided actually got it to where I can see the REPL in Thonny. However, it will not fully uploaded to the library. The flash problems were happening before this new issue. I will be interested to see how this is resolved. |
@WULFFJ I was running into the same error & was able to get it working through the CircuitPython Web Workflow after following the steps here. You may need to try a few times before it works as I kept having Thonny's backend crash. Web Workflow occasionally crashes as well, but generally speaking it's worked much better for me than Thonny over USB. |
I will let you know shortly if that works. If I can get it to upload what I need, I dont mind a little disconnect occasionally. I have been able to get this to show up on my homes wife before, so maybe this will work for me. |
So, made it a bit further with your advice. Thonny did not work very good but was better. I was able to upload an env file. Though, my Wifi shows off now, despite the board being listed as connected in my Wifi software. Thonny wont upload more than one really small file at a time. It starts the restart error message again. Through Putty, it provides no Wifi address for the board. |
I intended to roll back the toolchain for ESP32-C3 today for 8.0.0-beta.3. However, when I tested the latest main against this rollback, it did not work on QT Py ESP32-C3 (my main C3 testing board). So I did not include it and released beta.3 with C3 boards still not working. I was confused because I thought I had demonstrated to myself that the toolchain rollback worked, and yet I could not reproduce. I then did a bisect again, with the toolchain rollback in all my builds, and found that the very recent commit f86377e also causes a boot loop. That commit is part of #7073, and is a change in the partition table for the QT Py ESP32-C3. This is interesting. So one reason for a boot-loop is the toolchain advance, and another reason is this partition change, without the toolchain advance. These may be unrelated issues, or one may be a clue for the other.. Certainly it is worth tracking down what it is about the partition change that is causing a problem. @microdev1 ping for intereset. |
This is ridiculously confusing. I went back to the tip of main with the patch3 toolchain and now C3 is working again. |
I think I have a similar issue with a boot-loop on an esp32-s3. See issue #7093 |
Fixed by #7094. Thanks @microdev1! |
Can confirm this is working for me as well on both Seeed Xiao ESP32C3 and Adafruit QT PY ESP32-C3. Thanks @dhalbert and @microdev1! |
How do you get this fix to work? Im trying using Ubuntu WSL. I can get the firmware.bin file to make. However, its the same issue as before on the Xiao ESP32c3. I must be doing something wrong??? I am making with the 8.1 beta branch. Is that correct? I am flashing with the online webtool and it uploads. However, it will not work with Thonny, MU or Putty at all. |
The fix for this should be present in the |
8.0.0-beta.1 works on QT Py ESP32-C3; beta.2 does not. Bisected to #7023, which updates the ESP-IDF
The text was updated successfully, but these errors were encountered: