问题描述:
出现connecting····开始连接板子,按板子对应按钮始终连接不上,最后虚拟机崩溃。
Executing action: flash
Running ninja in directory /home/my-ubuntu/esp32/hello_world/build
Executing "ninja flash"...
[1/5] cd /home/my-ubuntu/esp32/hello_world/build/esp-idf/esptool_py && /home/my-ubuntu/.espressif/python_env/idf4.4_p...u/esp32/hello_world/build/partition_table/partition-table.bin /home/my-ubuntu/esp32/hello_world/build/hello_world.bin
hello_world.bin binary size 0x2a9e0 bytes. Smallest app partition is 0x100000 bytes. 0xd5620 bytes (83%) free.
[2/5] Performing build step for 'bootloader'
[1/1] cd /home/my-ubuntu/esp32/hello_world/build/bootloader/esp-idf/esptool_py && /home/my-ubuntu/.espressif/python_env/idf4.4_py3.6_env/bin/python /home/my-ubuntu/esp32/esp-idf/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x1000 /home/my-ubuntu/esp32/hello_world/build/bootloader/bootloader.bin
Bootloader binary size 0x6400 bytes. 0xc00 bytes (11%) free.
[2/3] cd /home/my-ubuntu/esp32/esp-idf/components/esptool_py && /usr/bin/cmake -D IDF_PATH="/home/my-ubuntu/esp32/esp.../home/my-ubuntu/esp32/hello_world/build" -P /home/my-ubuntu/esp32/esp-idf/components/esptool_py/run_serial_tool.cmake
esptool.py esp32 -p /dev/ttyUSB0 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 2MB 0x1000 bootloader/bootloader.bin 0x10000 hello_world.bin 0x8000 partition_table/partition-table.bin
esptool.py v3.3.4-dev
Serial port /dev/ttyUSB0
Connecting....
询问chatgpt:
我认为有可能是串口波特率问题,于是更改使用以下命令,将刚刚生成的二进制文件 (bootloader.bin, partition-table.bin 和 hello_world.bin) 烧录至ESP32 开发板:
idf.py -p PORT [-b BAUD] flash
将 PORT 替换为 ESP32 开发板的串口名称;可以将 BAUD 替换为希望的烧录波特率。默认波特率为 460800。
依旧没有解决。
最后尝试新建虚拟机,之前用的Ubuntu服务器版,新建的桌面版ubuntu问题解决。