IDF.PY BUILD OK but can't flash
Posted: Mon Mar 08, 2021 12:26 pm
C:\Users\sharb\Desktop\esp-idf-2\s>idf.py -p 17 -b 115200 flash
Executing action: flash
Running ninja in directory c:\users\sharb\desktop\esp-idf-2\s\build
Executing "ninja flash"...
[1/4] Performing build step for 'bootloader'
ninja: no work to do.
[1/2] cmd.exe /C "cd /D C:\Users\sharb\Desktop\esp-idf-2\c...Desktop/esp-idf-2/components/esptool_py/run_esptool.cmake"
esptool.py --chip esp32 -p 17 -b 115200 --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 wifi_softAP.bin
esptool.py v3.0
Serial port 17
Traceback (most recent call last):
File "C:/Users/sharb/Desktop/esp-idf-2/components/esptool_py/esptool/esptool.py", line 3969, in <module>
_main()
File "C:/Users/sharb/Desktop/esp-idf-2/components/esptool_py/esptool/esptool.py", line 3962, in _main
main()
File "C:/Users/sharb/Desktop/esp-idf-2/components/esptool_py/esptool/esptool.py", line 3551, in main
esp = chip_class(each_port, initial_baud, args.trace)
File "C:/Users/sharb/Desktop/esp-idf-2/components/esptool_py/esptool/esptool.py", line 271, in __init__
self._port = serial.serial_for_url(port)
File "C:\gitclone\.espressif\python_env\idf4.2_py3.7_env\lib\site-packages\serial\__init__.py", line 90, in serial_for_url
instance.open()
File "C:\gitclone\.espressif\python_env\idf4.2_py3.7_env\lib\site-packages\serial\serialwin32.py", line 64, in open
raise SerialException("could not open port {!r}: {!r}".format(self.portstr, ctypes.WinError()))
serial.serialutil.SerialException: could not open port '17': FileNotFoundError(2, '系统找不到指定的文件。', None, 2)
CMake Error at run_cmd.cmake:14 (message):
esptool.py failed
Call Stack (most recent call first):
run_esptool.cmake:21 (include)
FAILED: CMakeFiles/flash
cmd.exe /C "cd /D C:\Users\sharb\Desktop\esp-idf-2\components\esptool_py && C:\gitclone\.espressif\tools\cmake\3.16.4\bin\cmake.exe -D IDF_PATH="C:/Users/sharb/Desktop/esp-idf-2" -D ESPTOOLPY="C:\gitclone\.espressif\python_env\idf4.2_py3.7_env\Scripts\python.exe C:/Users/sharb/Desktop/esp-idf-2/components/esptool_py/esptool/esptool.py --chip esp32" -D ESPTOOL_ARGS="--before=default_reset --after=hard_reset write_flash @flash_args" -D WORKING_DIRECTORY="C:/Users/sharb/Desktop/esp-idf-2/s/build" -P C:/Users/sharb/Desktop/esp-idf-2/components/esptool_py/run_esptool.cmake"
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
C:\Users\sharb\Desktop\esp-idf-2\s>
Executing action: flash
Running ninja in directory c:\users\sharb\desktop\esp-idf-2\s\build
Executing "ninja flash"...
[1/4] Performing build step for 'bootloader'
ninja: no work to do.
[1/2] cmd.exe /C "cd /D C:\Users\sharb\Desktop\esp-idf-2\c...Desktop/esp-idf-2/components/esptool_py/run_esptool.cmake"
esptool.py --chip esp32 -p 17 -b 115200 --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 wifi_softAP.bin
esptool.py v3.0
Serial port 17
Traceback (most recent call last):
File "C:/Users/sharb/Desktop/esp-idf-2/components/esptool_py/esptool/esptool.py", line 3969, in <module>
_main()
File "C:/Users/sharb/Desktop/esp-idf-2/components/esptool_py/esptool/esptool.py", line 3962, in _main
main()
File "C:/Users/sharb/Desktop/esp-idf-2/components/esptool_py/esptool/esptool.py", line 3551, in main
esp = chip_class(each_port, initial_baud, args.trace)
File "C:/Users/sharb/Desktop/esp-idf-2/components/esptool_py/esptool/esptool.py", line 271, in __init__
self._port = serial.serial_for_url(port)
File "C:\gitclone\.espressif\python_env\idf4.2_py3.7_env\lib\site-packages\serial\__init__.py", line 90, in serial_for_url
instance.open()
File "C:\gitclone\.espressif\python_env\idf4.2_py3.7_env\lib\site-packages\serial\serialwin32.py", line 64, in open
raise SerialException("could not open port {!r}: {!r}".format(self.portstr, ctypes.WinError()))
serial.serialutil.SerialException: could not open port '17': FileNotFoundError(2, '系统找不到指定的文件。', None, 2)
CMake Error at run_cmd.cmake:14 (message):
esptool.py failed
Call Stack (most recent call first):
run_esptool.cmake:21 (include)
FAILED: CMakeFiles/flash
cmd.exe /C "cd /D C:\Users\sharb\Desktop\esp-idf-2\components\esptool_py && C:\gitclone\.espressif\tools\cmake\3.16.4\bin\cmake.exe -D IDF_PATH="C:/Users/sharb/Desktop/esp-idf-2" -D ESPTOOLPY="C:\gitclone\.espressif\python_env\idf4.2_py3.7_env\Scripts\python.exe C:/Users/sharb/Desktop/esp-idf-2/components/esptool_py/esptool/esptool.py --chip esp32" -D ESPTOOL_ARGS="--before=default_reset --after=hard_reset write_flash @flash_args" -D WORKING_DIRECTORY="C:/Users/sharb/Desktop/esp-idf-2/s/build" -P C:/Users/sharb/Desktop/esp-idf-2/components/esptool_py/run_esptool.cmake"
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
C:\Users\sharb\Desktop\esp-idf-2\s>