请选择 进入手机版 | 继续访问电脑版

ESP32S2 idf.py flash 烧固件遇到问题

[复制链接]
查看23247 | 回复1 | 2021-3-23 14:02:14 | 显示全部楼层 |阅读模式
最近在搭建环境,准备上手ESP32,买了NodeMCU-32S Lua WiFi物联网开发板串口WiFi+蓝牙模块ESP32开发板。
用的是win10里面的ubuntu。
环境,编译都过了,用 idf.py flash 烧固件进开发板的时候出现这样的问题:

Serial port /dev/ttyS18
Connecting....
Detecting chip type... ESP32
Running ninja in directory /mnt/e/ESP32/SDK/esp-idf/examples/get-started/hello_world/build
Executing "ninja flash"...
[1/4] Performing build step for 'bootloader'
ninja: no work to do.
[1/2] cd /mnt/e/ESP32/SDK/esp-idf/components/esptool_py && /usr/bin/cmake -D IDF_PATH="/mnt/e/ES...arted/hello_world/build" -P /mnt/e/ESP32/SDK/esp-idf/components/esptool_py/run_serial_tool.cmak
esptool.py esp32 -p /dev/ttyS18 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 4MB 0x8000 partition_table/partition-table.bin 0x1000 bootloader/bootloader.bin 0x10000 hello-world.bin
esptool.py v3.1-dev
Serial port /dev/ttyS18
Connecting.....
Chip is ESP32-D0WD (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: e8:db:84:11:f6:70
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Traceback (most recent call last):
  File "/mnt/e/ESP32/SDK/esp-idf/components/esptool_py/esptool/esptool.py", line 4290, in <module>
    _main()
  File "/mnt/e/ESP32/SDK/esp-idf/components/esptool_py/esptool/esptool.py", line 4283, in _main
    main()
  File "/mnt/e/ESP32/SDK/esp-idf/components/esptool_py/esptool/esptool.py", line 3890, in main
    esp.change_baud(args.baud)
  File "/mnt/e/ESP32/SDK/esp-idf/components/esptool_py/esptool/esptool.py", line 146, in inner
    return func(*args, **kwargs)
  File "/mnt/e/ESP32/SDK/esp-idf/components/esptool_py/esptool/esptool.py", line 845, in change_baud
    self._set_port_baudrate(baud)
  File "/mnt/e/ESP32/SDK/esp-idf/components/esptool_py/esptool/esptool.py", line 328, in _set_port_baudrate
    self._port.baudrate = baud
  File "/home/xucd/.espressif/python_env/idf4.4_py3.8_env/lib/python3.8/site-packages/serial/serialutil.py", line 299, in baudrate
    self._reconfigure_port()
  File "/home/xucd/.espressif/python_env/idf4.4_py3.8_env/lib/python3.8/site-packages/serial/serialposix.py", line 517, in _reconfigure_port
    termios.tcsetattr(
termios.error: (5, 'Input/output error')
CMake Error at run_serial_tool.cmake:50 (message):
  /home/xucd/.espressif/python_env/idf4.4_py3.8_env/bin/python
  /mnt/e/ESP32/SDK/esp-idf/components/esptool_py/esptool/esptool.py --chip
  esp32 failed


FAILED: CMakeFiles/flash
cd /mnt/e/ESP32/SDK/esp-idf/components/esptool_py && /usr/bin/cmake -D IDF_PATH="/mnt/e/ESP32/SDK/esp-idf" -D SERIAL_TOOL="/home/xucd/.espressif/python_env/idf4.4_py3.8_env/bin/python /mnt/e/ESP32/SDK/esp-idf/components/esptool_py/esptool/esptool.py --chip esp32" -D SERIAL_TOOL_ARGS="--before=default_reset --after=hard_reset write_flash @flash_args" -D WORKING_DIRECTORY="/mnt/e/ESP32/SDK/esp-idf/examples/get-started/hello_world/build" -P /mnt/e/ESP32/SDK/esp-idf/components/esptool_py/run_serial_tool.cmake
ninja: build stopped: subcommand failed.
ninja failed with exit code 1


另外还想请教一下,这个开发板能用esp-idf这个SDK吗?还是只能用nodemcu-firmware。
回复

使用道具 举报

可以使用这个SDK,看样子是波特率过高了,你设置下载波特率为115200.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

1

主题

1

帖子

21

积分

新手上路

Rank: 1

积分
21