-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Open
Labels
Description
I am trying to build micropython and flash it to an ESP32C3 board while it seems that there is
no output/REPL on the serial port. I have successfully verified my env by:
1. Run the 'hello_world' demo in espressif via 'idf.py build flash'.
2. Flash the official mp image 'esp32c3-20230426-v1.20.0.bin' and run some demos via mpremote.
My env:
- Ubuntu 22.04
- idf: v5.1
- Micropython:
commit a18d62e06727e0c424da1f43f80a5b0cb76bcc04 (HEAD -> master, origin/master, origin/HEAD)
Author: robert-hh <robert@hammelrath.com>
Date: Wed Aug 16 08:41:40 2023 +0200
Flashing cmd & output:
idf.py -D MICROPY_BOARD=GENERIC_C3 clean
idf.py -D MICROPY_BOARD=GENERIC_C3 build
idf.py -p /dev/ttyACM0 flash
idf.py -p /dev/ttyACM0 monitor
esp32-dev-micropython#idf.py -D MICROPY_BOARD=GENERIC_C3 flash
/data/2023/src/esp32c3/micropython/idf/esp-idf/tools/check_python_dependencies.py:12: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
import pkg_resources
Executing action: flash
Serial port /dev/ttyS0
Connecting.......................
/dev/ttyS0 failed to connect: Failed to connect to Espressif device: No serial data received.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
Serial port /dev/ttyACM0
Connecting....
Detecting chip type... ESP32-C3
Running ninja in directory /data/2023/src/esp32c3/micropython/micropython/ports/esp32/build
Executing "ninja flash"...
[1/225] Performing build step for 'bootloader'
[1/1] cd /data/2023/src/esp32c3/micropython/micropython/ports/esp32/build/bootloader/esp-idf/esptool_py && /root/.espressif/python_env/idf5.1_py3.10_env/bin/python /data/2023/src/esp32c3/micropython/idf/esp-idf/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x0 /data/2023/src/esp32c3/micropython/micropython/ports/esp32/build/bootloader/bootloader.bin
Bootloader binary size 0x3fb0 bytes. 0x4050 bytes (50%) free.
[2/223] cd /data/2023/src/esp32c3/micropython/micropython/ports/esp32/build/esp-idf/main_esp32c3 && /usr/bin/cmake -E make_directory /data/2023/src/esp32c3/micropython/micropython/ports/esp32/build/genhdr && /root/.espressif/python_env/idf5.1_py3.10_env/bin/python /data/2023/src/esp32c3/micropython/micropython/py/makeversionhdr.py /data/2023/src/esp32c3/micropython/micropython/ports/esp32/build/genhdr/mpversion.h
[3/10] cd /data/2023/src/esp32c3/micropython/micropython/ports/esp32/build/esp-idf/main_esp32c3 && /root/.espressif/python_env/idf5.1_py3.10_env/bin/python /data/2023/src/esp32c3/micropython/micropython/tools/makemanifest.py -o /data/2023/src/esp32c3/micropython/micropython/ports/esp32/build/frozen_content.c -v MPY_DIR=/data/2023/src/esp32c3/micropython/micropython -v MPY_LIB_DIR=/data/2023/src/esp32c3/micropython/micropython/lib/micropython-lib -v PORT_DIR=/data/2023/src/esp32c3/micropython/micropython/ports/esp32 -v BOARD_DIR=/data/2023/src/esp32c3/micropython/micropython/ports/esp32/boards/GENERIC_C3 -b /data/2023/src/esp32c3/micropython/micropython/ports/esp32/build -f-march=xtensawin --mpy-tool-flags= /data/2023/src/esp32c3/micropython/micropython/ports/esp32/boards/manifest.py
[4/5] cd /data/2023/src/esp32c3/micropython/micropython/ports/esp32/build/esp-idf/esptool_py && /root/.espressif/python_env/idf5.1_py3.10_env/bin/python /data/2023/src/esp32c3/micropython/idf/esp-idf/components/partition_table/check_sizes.py --offset 0x8000 partition --type app /data/2023/src/esp32c3/micropython/micropython/ports/esp32/build/partition_table/partition-table.bin /data/2023/src/esp32c3/micropython/micropython/ports/esp32/build/micropython.bin
micropython.bin binary size 0x179dc0 bytes. Smallest app partition is 0x1f0000 bytes. 0x76240 bytes (24%) free.
[4/5] cd /data/2023/src/esp32c3/micropython/idf/esp-idf/components/esptool_py && /usr/bin/cmake -D IDF_PATH=/data/2023/src/esp32c3/micropython/idf/esp-idf -D "SERIAL_TOOL=/root/.espressif/python_env/idf5.1_py3.10_env/bin/python;;/data/2023/src/esp32c3/micropython/idf/esp-idf/components/esptool_py/esptool/esptool.py;--chip;esp32c3" -D "SERIAL_TOOL_ARGS=--before=default_reset;--after=hard_reset;--no-stub;write_flash;@flash_args" -D WORKING_DIRECTORY=/data/2023/src/esp32c3/micropython/micropython/ports/esp32/build -P /data/2023/src/esp32c3/micropython/idf/esp-idf/components/esptool_py/run_serial_tool.cmake
esptool.py --chip esp32c3 -p /dev/ttyACM0 -b 460800 --before=default_reset --after=hard_reset --no-stub write_flash --flash_mode dio --flash_freq 80m --flash_size 4MB 0x0 bootloader/bootloader.bin 0x10000 micropython.bin 0x8000 partition_table/partition-table.bin
esptool.py v4.7.dev1
Serial port /dev/ttyACM0
Connecting....
Chip is ESP32-C3 (QFN32) (revision v0.4)
Features: WiFi, BLE
Crystal is 40MHz
MAC: 48:31:b7:35:cd:bc
Changing baud rate to 460800
Changed.
Enabling default SPI flash mode...
Configuring flash size...
Flash will be erased from 0x00000000 to 0x00003fff...
Flash will be erased from 0x00010000 to 0x00189fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Erasing flash...
Took 0.10s to erase flash block
Writing at 0x00000000... (6 %)
Writing at 0x00000400... (12 %)
Writing at 0x00000800... (18 %)
Writing at 0x00000c00... (25 %)
Writing at 0x00001000... (31 %)
Writing at 0x00001400... (37 %)
Writing at 0x00001800... (43 %)
Writing at 0x00001c00... (50 %)
Writing at 0x00002000... (56 %)
Writing at 0x00002400... (62 %)
Writing at 0x00002800... (68 %)
Writing at 0x00002c00... (75 %)
Writing at 0x00003000... (81 %)
Writing at 0x00003400... (87 %)
Writing at 0x00003800... (93 %)
Writing at 0x00003c00... (100 %)
Wrote 16384 bytes at 0x00000000 in 0.5 seconds (250.6 kbit/s)...
Hash of data verified.
Erasing flash...
Took 2.33s to erase flash block
Writing at 0x00010000... (0 %)
Writing at 0x00010400... (0 %)
Writing at 0x00010800... (0 %)
Writing at 0x00010c00... (0 %)
Writing at 0x00011000... (0 %)
Writing at 0x00011400... (0 %)
Writing at 0x00011800... (0 %)
Writing at 0x00011c00... (0 %)
Writing at 0x00012000... (0 %)
Writing at 0x00012400... (0 %)
Writing at 0x00012800... (0 %)
Writing at 0x00012c00... (0 %)
Writing at 0x00013000... (0 %)
Writing at 0x00013400... (0 %)
Writing at 0x00013800... (0 %)
Writing at 0x00013c00... (1 %)
...
Writing at 0x00188c00... (99 %)
Writing at 0x00189000... (99 %)
Writing at 0x00189400... (99 %)
Writing at 0x00189800... (99 %)
Writing at 0x00189c00... (100 %)
Wrote 1548288 bytes at 0x00010000 in 49.7 seconds (249.4 kbit/s)...
Hash of data verified.
Erasing flash...
Took 0.03s to erase flash block
Writing at 0x00008000... (33 %)
Writing at 0x00008400... (66 %)
Writing at 0x00008800... (100 %)
Wrote 3072 bytes at 0x00008000 in 0.1 seconds (260.7 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
Done