您尚未登录。

楼主 #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

离线

#3 2018-08-11 18:05:23

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,238
积分: 9197

Re: ESP32 eclipse 编译失败

是不是多加了斜杠,  COM4 试一试.





离线

#4 2018-08-11 19:30:59

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,238
积分: 9197

Re: ESP32 eclipse 编译失败

下载一个sscom32,
RX, TX 自发自收,
看是否正常。





离线

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

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

Re: ESP32 eclipse 编译失败

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

离线

#6 2018-08-11 20:05:57

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,238
积分: 9197

Re: ESP32 eclipse 编译失败

make monitor

有串口信息输出吗?





离线

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

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

Re: ESP32 eclipse 编译失败

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

离线

#8 2018-08-11 20:50:56

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,238
积分: 9197

Re: ESP32 eclipse 编译失败

不用客气,
这个一定有办法解决的,
我是直接用make monitor 连接串口终端的。

如果这个不行,说明Python库和windows系统有点问题.





离线

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

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

Re: ESP32 eclipse 编译失败

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

离线

#10 2018-08-11 20:57:43

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,238
积分: 9197

Re: ESP32 eclipse 编译失败

看起来编译已经完成,到了烧录步骤,因为串口问题没有成功。





离线

楼主 #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写的

离线

#12 2018-08-14 11:29:35

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,238
积分: 9197

Re: ESP32 eclipse 编译失败

那就是说 其他版本的 python 导致了不能打开串口 ?
直接使用 esp32 sdk 自带的 python 就没问题?





离线

楼主 #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