前段时间ESP-IDF5更新了,我就想着下载下来玩玩。可是尝试了几次都可以编译但无法正常下载(VSCODE环境),powershell与cmd能正常下载编译。
VScode命令行报错信息:
Traceback (most recent call last):
File "f:\ESP32\idf\esp-idf\components\esptool_py\esptool\esptool.py", line 22, in <module>
esptool._main() # type: ignore
AttributeError: module 'esptool' has no attribute '_main'
* The terminal process "f:\ESP32\tools\python_env\idf5.0_py3.8_env\Scripts\python.exe 'f:\ESP32\idf\esp-idf\components\esptool_py\esptool\esptool.py', '-p', 'COM8', '-b', '460800', '--before', 'default_reset', '--after', 'hard_reset', '--chip', 'esp32s2', 'write_flash', '--flash_mode', 'dio', '--flash_freq', '80m', '--flash_size', '2MB', '0x1000', 'bootloader/bootloader.bin', '0x10000', 'hello_world.bin', '0x8000', 'partition_table/partition-table.bin'" terminated with exit code: 1.
随后我就在github上提问了,有老哥给出了解决办法。
不能科学sw的老哥可直接看我发的截图:
有兴趣的老哥可以看原文链接: