您尚未登录。

楼主 #1 2018-08-11 17:44:25

钱泰多
会员
注册时间: 2018-08-08
已发帖子: 42
积分: 42

ESP32 eclipse 编译失败

17:44:06 **** Build of configuration Default for project esp-adf ****
bash G:/RD/Pro/ESP32/official/msys32/esp-adf/esp-idf/tools/windows/eclipse_make.sh flash
eclipse_make.sh has been replaced with eclipse_make.py. Check the Windows Eclipse docs for the new command.
This shell script will continue to work until the next major release.
Traceback (most recent call last):
  File "G:/RD/Pro/ESP32/official/msys32/esp-adf/esp-idf/tools/windows/eclipse_make.py", line 36, in <module>
    main()
  File "G:/RD/Pro/ESP32/official/msys32/esp-adf/esp-idf/tools/windows/eclipse_make.py", line 28, in main
    print("Running make in '%s'" % check_path(os.getcwd()))
  File "G:/RD/Pro/ESP32/official/msys32/esp-adf/esp-idf/tools/windows/eclipse_make.py", line 23, in check_path
    winpath = winpath.replace("\\", "/")  # make consistent with forward-slashes used elsewhere
TypeError: a bytes-like object is required, not 'str'

17:44:07 Build Finished. 0 errors, 0 warnings. (took 385ms)

离线

楼主 #2 2018-08-11 17:46:45

钱泰多
会员
注册时间: 2018-08-08
已发帖子: 42
积分: 42

Re: ESP32 eclipse 编译失败

命令行下编译则是这样,COM4我看了驱动管理器没有错


sky@DESKTOP-FEE8B4U MSYS /g/RD/Pro/ESP32/official/msys32/esp-adf/esp-idf/examples/get-started/hello_world
$ make flash
G:/RD/Pro/ESP32/official/msys32/esp-adf/esp-idf/make/project.mk:56: esp-idf build system only supports MSYS2 in "MINGW32" mode. Consult the ESP-IDF documentation for details.
/esp-adf/esp-idf/make/project.mk:56: esp-idf build system only supports MSYS2 in "MINGW32" mode. Consult the ESP-IDF documentation for details.
Flashing binaries to serial port /COM4 (app at offset 0x10000)...
esptool.py v2.1
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/serial/serialposix.py", line 288, in open
    self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
FileNotFoundError: [Errno 2] No such file or directory: '/COM4'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/esp-adf/esp-idf/components/esptool_py/esptool/esptool.py", line 2524, in <module>
    _main()
  File "/esp-adf/esp-idf/components/esptool_py/esptool/esptool.py", line 2517, in _main
    main()
  File "/esp-adf/esp-idf/components/esptool_py/esptool/esptool.py", line 2246, in main
    esp = chip_class(args.port, initial_baud)
  File "/esp-adf/esp-idf/components/esptool_py/esptool/esptool.py", line 177, in __init__
    self._port = serial.serial_for_url(port)
  File "/usr/lib/python3.6/site-packages/serial/__init__.py", line 90, in serial_for_url
    instance.open()
  File "/usr/lib/python3.6/site-packages/serial/serialposix.py", line 291, in open
    raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 2] could not open port /COM4: [Errno 2] No such file or directory: '/COM4'
make: *** [/esp-adf/esp-idf/components/esptool_py/Makefile.projbuild:55:flash] 错误 1

离线

楼主 #5 2018-08-11 19:59:42

钱泰多
会员
注册时间: 2018-08-08
已发帖子: 42
积分: 42

Re: ESP32 eclipse 编译失败

我的板子是有hello world程序的,用串口工具可以看到打印信息出来

离线

楼主 #7 2018-08-11 20:11:47

钱泰多
会员
注册时间: 2018-08-08
已发帖子: 42
积分: 42

Re: ESP32 eclipse 编译失败

现在在家了,板子在公司,只能周一再试试了,先谢谢晕哥

离线

楼主 #9 2018-08-11 20:53:21

钱泰多
会员
注册时间: 2018-08-08
已发帖子: 42
积分: 42

Re: ESP32 eclipse 编译失败

我用win7 的时候是不用装python的直接可以编译,感觉是Python的问题

离线

楼主 #11 2018-08-14 11:27:55

钱泰多
会员
注册时间: 2018-08-08
已发帖子: 42
积分: 42

Re: ESP32 eclipse 编译失败

已经解决问题,esp32原版的编译工具链里面其实已经自带了pyhon,是不用额外下载的,只需要配置好path就可以
msys32/etc/profile.d/esp32_toolchain

这里面改成
export PATH="/mingw32/bin:/usr/local/bin:/usr/bin:/bin:/c/windows/system32:/c/windows:/c/windows/system32/wbem:/opt/xtensa-esp32-elf/bin"

就能找到msys32/mingw32/bin里面的python了,是2.7的

自己在mingw32里更新的python是3.6的,打开串口可能有问题,估计原来的代码是用python2.7写的

离线

楼主 #13 2018-08-14 15:06:51

钱泰多
会员
注册时间: 2018-08-08
已发帖子: 42
积分: 42

Re: ESP32 eclipse 编译失败

是的,我用python自带的python烧录没问题

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn