-
-
Notifications
You must be signed in to change notification settings - Fork 664
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 bootloop #821
Comments
Please use release Platformio Arduino core 2.0.3
|
Have you defined a valid partition scheme? The standard is a 4MB one and will fail with a 2MB device. I see no entry for a custom partition scheme in your platformio.ini |
I did not. Can you specify how I can set that? |
Platformio has a good docu. See https://docs.platformio.org/en/latest//platforms/espressif32.html?highlight=partitions+csv#partition-tables |
I guess you need to use the [env:esp32-c3-devkitm-1]
board = esp32-c3-devkitm-1
board_build.filesystem = littlefs
...
board_build.partitions = minimal.csv |
This unfortunately doesn't help either, still seeing the bootloop:
with this config: [env:foobar]
platform = espressif32
board = esp32-c3-devkitm-1
framework = arduino
monitor_speed = 115200
board_build.filesystem = littlefs
board_build.partitions = minimal.csv
board_upload.flash_size = "2MB"
board_upload.maximum_size = 2097152
board_build.flash_mode = dio
board_build.f_flash = 40000000L Some build output:
Related issue: espressif/arduino-esp32#6519 |
Can you try |
I did replicate the same issue in my [env:esp32-c3]
board = esp32-c3-devkitm-1
framework = arduino
platform = espressif32
pload_speed = 1500000 |
@hpsaturn The bug is fixed in Arduino core 2.0.4 See comment espressif/arduino-esp32#6862 (comment) |
I have a doubt, the version name of PlatformIO Package and toolspio pkg list
Resolving esp32-c3 dependencies...
Platform espressif32 @ 5.0.0 (required: espressif32)
├── framework-arduinoespressif32 @ 3.20003.220626 (required: platformio/framework-arduinoespressif32 @ ~3.20003.0)
├── tool-cmake @ 3.16.4 (required: platformio/tool-cmake @ ~3.16.0)
├── tool-esptoolpy @ 1.30300.0 (required: platformio/tool-esptoolpy @ ~1.30300.0)
├── tool-mkfatfs @ 2.0.1 (required: platformio/tool-mkfatfs @ ~2.0.0)
├── tool-mklittlefs @ 1.203.210628 (required: platformio/tool-mklittlefs @ ~1.203.0)
├── tool-mkspiffs @ 2.230.0 (required: platformio/tool-mkspiffs @ ~2.230.0)
├── tool-ninja @ 1.7.1 (required: platformio/tool-ninja @ ^1.7.0)
├── tool-openocd-esp32 @ 2.1100.20220411 (required: platformio/tool-openocd-esp32 @ ~2.1100.0)
└── toolchain-riscv32-esp @ 8.4.0+2021r2-patch3 (required: espressif/toolchain-riscv32-esp @ 8.4.0+2021r2-patch3) that to say, version 3.2 of 220626. This package is published here: Whats means |
|
thanks for clarify it. But, one question, how you know that? that to say, where I looking for where is the current target of a PlatformIO framework release? |
Platformio crew only do releases from release versions |
This issue has been automatically marked as stale because it has not had recent activity. Please provide more details or it will be closed if no further activity occurs. Thank you for your contributions. |
Hi, FYI, in the last version of PlatformIO, the issue persist: Resolving esp32c3 dependencies...
Platform espressif32 @ 5.1.0 (required: espressif32)
├── framework-arduinoespressif32 @ 3.20004.220818 (required: platformio/framework-arduinoespressif32 @ ~3.20004.0)
├── tool-esptoolpy @ 1.30300.0 (required: platformio/tool-esptoolpy @ ~1.30300.0)
├── tool-mkfatfs @ 2.0.1 (required: platformio/tool-mkfatfs @ ~2.0.0)
├── tool-mklittlefs @ 1.203.210628 (required: platformio/tool-mklittlefs @ ~1.203.0)
├── tool-mkspiffs @ 2.230.0 (required: platformio/tool-mkspiffs @ ~2.230.0)
└── toolchain-riscv32-esp @ 8.4.0+2021r2-patch3 (required: espressif/toolchain-riscv32-esp @ 8.4.0+2021r2-patch3) |
@hpsaturn What issue exactly? |
well, the bootloop execution issue described here in the issue. The output is similar:
|
Which device? Please post your platformio config |
My ini file: [env]
framework = arduino
upload_speed = 1500000
monitor_speed = 115200
build_flags =
-D CORE_DEBUG_LEVEL=0
lib_deps =
https://github.com/hpsaturn/SerialTerminal.git
[esp32_common]
platform = espressif32
board = esp32dev
framework = ${env.framework}
upload_speed = ${env.upload_speed}
monitor_speed = ${env.monitor_speed}
lib_deps = ${env.lib_deps}
build_flags =
${env.build_flags}
[env:esp32c3]
extends = esp32_common
platform = espressif32
board = esp32-c3-devkitm-1
framework = arduino
build_src_filter = -<*> +<advanced/>
lib_deps =
${esp32_common.lib_deps} NOTE: The board is a Esptool output: esptool.py v3.3
Serial port /dev/ttyACM0
Connecting....
Detecting chip type... ESP32-C3
Chip is ESP32-C3 (revision 3)
Features: Wi-Fi
Crystal is 40MHz
MAC: 84:f7:03:27:fe:40
Uploading stub...
Running stub...
Stub running...
Manufacturer: 20
Device: 4016
Detected flash size: 4MB |
The complete source code is here: in the provisional branch: fix_esp32c3_issue |
Your code is doing the WDTs |
Here is a C3 bootlog from starting Tasmota (same build as current release of Platformio, only bootlog enabled)
|
Thanks for your answer and help. Whats means #include <Arduino.h>
// Set LED_BUILTIN if it is not defined by Arduino framework
#ifndef LED_BUILTIN
¦ #define LED_BUILTIN 2
#endif
void setup()
{
Serial.begin(115200);
// initialize LED digital pin as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
void loop()
{
// turn the LED on (HIGH is the voltage level)
digitalWrite(LED_BUILTIN, HIGH);
Serial.println("HIGH");
// wait for a second
delay(1000);
// turn the LED off by making the voltage LOW
digitalWrite(LED_BUILTIN, LOW);
Serial.println("LOW");
¦// wait for a second
delay(1000);
} And the output is similar but without loop, only it is freezes, and the Serial messages are missing. entry 0x403ce000
ESP-ROM:esp32c3-api1-20210207
Build:Feb 7 2021
rst:0x1 (POWERON),boot:0xc (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd6100,len:0x438
load:0x403ce000,len:0x918
load:0x403d0000,len:0x24e4
SHA-256 comparison failed:
Calculated: 080c5cb68a075ced55f248b97bca965e3e5bd5da80a64e34e6a1638f89d6f64e
Expected: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
Attempting to boot anyway...
entry 0x403ce000 The weird is that I remember use this board with my code some months ago, something change.. |
Really strange!
sketch
platformio.ini
|
Oh! well, these parameters, |
Tried all other modes (dio, qout, dout) too. All flash modes worked. |
What is the actual issue here? I can get a boot with
|
Interestingly I have 2.0.4 working but C3 crashes instantly if i enable wifi, however @Jason2866 branch works perfectly, i see its using IDF 4.4.3 though, so not sure whats wrong with 4.4.1 I am pretty much done working with this at this point, talk about aggrevating |
@tablatronix Which C3 board do you have? There are some C3 boards which have PCB design flaws. The most "famous" example is the Lolin C3 mini. The board is borked. |
I tested my extended code that was fails on this C3 board, and works fine but I need put |
@hpsaturn Thats why different boards.json manifest do exits. Not all boards do support flash mode |
I understand that but:
|
I never got a free board from anyone... @hpsaturn From which "extended code" you are talking? |
Yes my devkit is the same, directly from espressif, but I think there was a rev 2 cause and these early ones were buggy I think i remember there being something about it, either way newer IDF works it seems. |
With a basic code that you suggested, it works, I confirmed here: And my extended code is this: For the test you don't need nothing, because it is a simple CLI, only run and upload normally:
This code is working on:
|
Ouuch, the advanced example uses a not possible GPIO in line23 |
I remember test it without these lines. Let me check again it.. |
It is working on M5StampC3 now! I think that was many variables, toolchain version, dio, and the LED issue. But in the dev-kit it doesn't works. Details from these boards: M5StampC3: ESP-ROM:esp32c3-api1-20210207
Build:Feb 7 2021
rst:0x1 (POWERON),boot:0xc (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd6100,len:0x38c
load:0x403ce000,len:0x6ac
load:0x403d0000,len:0x24e4
SHA-256 comparison failed:
Calculated: 697c37ed1f62ec376bac84a4be3161309fd96b67171cac136349db0d3925a5d8
Expected: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
Attempting to boot anyway...
entry 0x403ce000
SSID is empty, please set a valid SSID into quotes
SerialTerm v1.1.2
(C) 2022, MikO - Hpsaturn
available commands:
help show detail usage information
setSSID set the Wifi SSID
setPASW set the WiFi password
connect save and connect to WiFi network
list list saved WiFi networks
select select the default AP (default: last)
mode set the default operation single/multi AP (slow)
scan scan WiFi networks
status WiFi status information
disconnect WiFi disconnect
delete remove saved WiFi network by SSID
sleep <mode> <time> ESP32 will enter to sleep mode
echo "message" Echo the msg. Parameter into quotes
setLED <PIN> config the LED GPIO for blink
reboot perform a ESP32 reboot
st> esp32-c3-devkitm-1: ESP-ROM:esp32c3-20200918
Build:Sep 18 2020
rst:0x3 (RTC_SW_SYS_RST),boot:0xc (SPI_FAST_FLASH_BOOT)
Saved PC:0x40381976
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd6100,len:0x38c
load:0x403ce000,len:0x6ac
load:0x403d0000,len:0x24e4
SHA-256 comparison failed:
Calculated: 697c37ed1f62ec376bac84a4be3161309fd96b67171cac136349db0d3925a5d8
Expected: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
Attempting to boot anyway...
entry 0x403ce000
Guru Meditation Error: Core 0 panic'ed (Illegal instruction). Exception was unhandled.
Core 0 register dump:
MEPC : 0x40001be4 RA : 0x420680a2 SP : 0x3fca2a00 GP : 0x3fc8f000
TP : 0x3fc8f5b8 T0 : 0x40057fa6 T1 : 0x40383b3e T2 : 0xffffffff
S0/FP : 0x3fc95e08 S1 : 0x40384016 A0 : 0x3fc900cc A1 : 0x40383f18
A2 : 0x4038579e A3 : 0x40383c5a A4 : 0x40383c92 A5 : 0x3fcdf4f8
A6 : 0x40383d28 A7 : 0x40383cfc S2 : 0x3c08863c S3 : 0x00000002
S4 : 0x3fc96000 S5 : 0x3fce0000 S6 : 0x3fce0000 S7 : 0x3fce0000
S8 : 0x3ff1b000 S9 : 0x3fce0000 S10 : 0x3fcdf8d4 S11 : 0x00000000
T3 : 0x40384474 T4 : 0x4038420a T5 : 0x3fc90000 T6 : 0x4203e3a2
MSTATUS : 0x00001881 MTVEC : 0x40380001 MCAUSE : 0x00000002 MTVAL : 0x00000000
MHARTID : 0x00000000
Stack memory:
3fca2a00: 0x00000001 0x3fca6434 0x3fca6434 0x4206847a 0x52520000 0x484c4c50 0x4648484c 0x4446464a
3fca2a20: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca2a40: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca2a60: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca2a80: 0x00000000 0x00000000 0x00000000 0x00000000 0x3fc9622c 0x3fce0000 0x3fce0000 0x00001102
3fca2aa0: 0x00000003 0x00000002 0x3fca6434 0x420159d0 0x00000000 0x00000000 0x42a1df7c 0x4038d0f4
3fca2ac0: 0x3fce0000 0x3fce0000 0x3fce0000 0x3fc929f4 0x3fc9622c 0x3fc96000 0x3fc96234 0x42015a44
3fca2ae0: 0x00000000 0x3fc93000 0x3fce0000 0x42021c7c 0x3fca2c40 0x00000001 0x3fca0a18 0x00000001
3fca2b00: 0x3fc929f4 0x00000001 0x00000000 0x420225b8 0x3fce0000 0x3fce0000 0x3fc94dc0 0x3ff1b594
3fca2b20: 0x3fc929f4 0xffffffff 0x3fca640c 0x42020b5e 0x00000000 0x3fcdf918 0x3fce0000 0x4003fe8a
3fca2b40: 0x00000000 0x00000000 0x00000006 0x3fca640c 0x00000000 0x00000000 0x00000000 0x00000000
3fca2b60: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x4038a4e0
3fca2b80: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
3fca2ba0: 0x27146414 0x01010107 0x00000001 0x000001ff 0x00000000 0x00000000 0xffffffff 0x7fefffff
3fca2bc0: 0x00000000 0x3fc00000 0x00000000 0x40300000 0x00000000 0x3fe00000 0x00000000 0x3ff80000
3fca2be0: 0x636f4361 0x3fd287a7 0x8b60c8b3 0x3fc68a28 0x509f79fb 0x3fd34413 0x00000000 0x3ff00000
3fca2c00: 0x00000000 0x40240000 0x00000000 0x401c0000 0x00000000 0x40140000 0x00000000 0x43500000
3fca2c20: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xbaad5678 0x00000160 0xabba1234 0x00000154
3fca2c40: 0x3fca2a70 0x6d09f49d 0x3fc927a4 0x3fc927a4 0x3fca2c40 0x3fc9279c 0x00000002 0x3fca0b54
3fca2c60: 0x3fca0b54 0x3fca2c40 0x00000000 0x00000017 0x3fca1230 0x69666977 0xed7a6500 0xc27194eb
3fca2c80: 0x00fc2efc 0x00000000 0x3fca2c20 0x00000017 0x00000001 0x00000000 0x00000000 0x00000000
3fca2ca0: 0x3fc97554 0x3fc975bc 0x3fc97624 0x00000000 0x00000000 0x00000001 0x00000000 0x00000000
3fca2cc0: 0x00000000 0x4207207a 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca2ce0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca2d00: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca2d20: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca2d40: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca2d60: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fca2d80: 0x00000000 0x00000000 0x00000000 0x00000000 0x69000000 0xbaad5678 0x00000060 0xabba1234
3fca2da0: 0x00000054 0x3fca2da4 0x3fca2da4 0x3fca2da4 0x3fca2da4 0x00000000 0x3fca2dbc 0xffffffff
3fca2dc0: 0x3fca2dbc 0x3fca2dbc 0x00000000 0x3fca2dd0 0xffffffff 0x3fca2dd0 0x3fca2dd0 0x00000000
3fca2de0: 0x00000001 0x00000000 0x1500ffff 0x00000000 0xb33fffff 0x00000000 0xbaad5678 0x00000018
ELF file SHA256: 0000000000000000
Rebooting... |
Can not reproduce. Using
to free GPIO 12 / 13 for LED usage
|
The devkit board you have has a very old build date |
The sambe board in this photo: But not problem, I understand. For my its fine that works in the M5StampC3 and esp32c3pico. Is enough for me. Thanks a lot. |
|
So verified, you have a board rev which is not supported from Arduino. |
@tablatronix It is the same for you not working board. It is a not supported old revision. All open cases/questions in this issue thread solved. |
@Jason2866 how exactly does your fork support this board? Curious |
@tablatronix The arduino framework is builded with the sdkonfig set to support the c3 from rev.0. which is used in the platform |
I think its not, anymore. I believe that bootloader is built to support rev1, since esp-idf is no longer supporting esp32 C3 rev0, at least not the esp_wifi component. |
I did not write it is supported. The setting for arduino is rev. 3 |
This issue has been automatically marked as stale because it has not had recent activity. Please provide more details or it will be closed if no further activity occurs. Thank you for your contributions. |
Selected an incorrect board, [env:airm2m_core_esp32c3] |
I've an ESP32-C3 (2MB) but I'm unable to flash this through platformIO. It keeps resetting in a bootloop:
I've tried setting
platform = https://github.com/Jason2866/platform-espressif32/releases/download/v2.0.3-rc1/platform-espressif32-2.0.3-rc1.zip
But this does not work.
My full config:
I've verified it is working with arduino IDE.
The text was updated successfully, but these errors were encountered: