← index #9050Issue #9405
Related · high · value 1.293
QUERY · ISSUE

ESP32-C3_USB: rst:0xc (RTC_SW_CPU_RST),boot:0xe (SPI_FAST_FLASH_BOOT)

openby vivekmistryopened 2022-08-14updated 2026-03-19
bugport-esp32

I need to add ulab lib in micropython and have executed the following build.sh script. The script is executed successfully and it indicates to run the following command to flash binaries in esp32-c3_usb:

export BUILD_DIR=$(pwd)

echo "--- CLONING ULAB ---"
git clone --depth 1 https://github.com/v923z/micropython-ulab.git ulab

echo "--- CLONING MICROPYTHON ---"
git clone --depth 1 https://github.com/micropython/micropython.git

echo "--- CLONING ESP-IDF ---"
cd $BUILD_DIR/micropython/
git clone --depth 1 -b v4.3.2 --recursive https://github.com/espressif/esp-idf.git

echo "--- INSTALL ESP-IDF ---"
cd $BUILD_DIR/micropython/esp-idf
./install.sh
. ./export.sh

echo "--- MPY-CROSS ---"
cd $BUILD_DIR/micropython/mpy-cross
make

echo "--- ESP32 SUBMODULES ---"
cd $BUILD_DIR/micropython/ports/esp32
make submodules

echo "--- PATCH MAKEFILE ---"
cp $BUILD_DIR/micropython/ports/esp32/Makefile $BUILD_DIR/micropython/ports/esp32/MakefileOld
echo "BOARD = GENERIC_C3_USB" > $BUILD_DIR/micropython/ports/esp32/Makefile
echo "USER_C_MODULES = $(BUILD_DIR)/ulab/code/micropython.cmake" >> $BUILD_DIR/micropython/ports/esp32/Makefile
cat $BUILD_DIR/micropython/ports/esp32/MakefileOld >> $BUILD_DIR/micropython/ports/esp32/Makefile

echo "--- MAKE ---"
make

The command used to flash binaries on ESP32-C3:

esptool.py -p COM3 -b 460800 --before default_reset --after hard_reset --chip esp32c3 write_flash --flash_mode dio --flash_size detect --flash_freq 80m 0x0 bootloader.bin 0x8000 partition-table.bin 0x10000 micropython.bin

Error received:

rst:0xc (RTC_SW_CPU_RST),boot:0xe (SPI_FAST_FLASH_BOOT)
Saved PC:0x40387cc0
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd6100,len:0xf18
load:0x403ce000,len:0x6cc
load:0x403d0000,len:0x292c
entry 0x403ce000

I tried to change the frequency to 40m in the above command, but no luck. Please help, what is wrong here?

CANDIDATE · ISSUE

esp32c3-usb-20220618-v1.19.1.bin can not boot

closedby QGBopened 2022-09-25updated 2022-09-25
bugport-esp32

It print:

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:0xe3c
load:0x403ce000,len:0x6dc
load:0x403d0000,len:0x28ac
entry 0x403ce000






flash commands:

In [135]: !esptool --chip esp32c3 --port COM16 erase_flash
     ...:
     ...: !esptool --chip esp32c3 -p COM16 -b 921600 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 80m --flash_size 4MB 0x
     ...: 0 C:\test\ESP32\esp32c3\MicroPython=esp32c3-usb-20220618-v1.19.1.bin
esptool.py v3.2
Serial port COM16
Connecting....
Chip is ESP32-C3 (revision 3)
Features: Wi-Fi
Crystal is 40MHz
MAC: 60:55:f9:72:d7:48
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 11.2s
Hard resetting via RTS pin...
esptool.py v3.2
Serial port COM16
Connecting....
Chip is ESP32-C3 (revision 3)
Features: Wi-Fi
Crystal is 40MHz
MAC: 60:55:f9:72:d7:48
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Flash will be erased from 0x00000000 to 0x0015dfff...
Compressed 1431808 bytes to 868690...
Wrote 1431808 bytes (868690 compressed) at 0x00000000 in 22.6 seconds (effective 507.9 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

but esp32c3-20220117-micropython-v1.18.bin works well

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied