Hi,
This is a novice question, but I can't seem to figure it out. I followed the Windows tool chain setup instructions and built a sample application. I am now ready to flash it to the DevC Kit board. When connected to my laptop, it shows up as COM27. In 'make menuconfig' I thus set the serial port to /dev/ttyS26 (Which is the device I see in MSYS32/dev when the board is plugged in).
However when I try to flash to the device, I get this error:
$ make flash
esp32/esp-idf/make/component_common.mk:1: Deprecated feature: No longer necessary to include component_common.mk from esp-idf/components/bt/component.mk
Flashing binaries to serial port /dev/ttyS26 (app at offset 0x10000)...
esptool.py v2.0-dev
Traceback (most recent call last):
File "esp32/esp-idf/components/esptool_py/esptool/esptool.py", line 2016, in <module>
main()
File "esp32/esp-idf/components/esptool_py/esptool/esptool.py", line 1841, in main
esp = chip_constructor_fun(args.port, initial_baud)
File "esp32/esp-idf/components/esptool_py/esptool/esptool.py", line 155, in __init__
self._port = serial.Serial(port)
File "C:/msys32/mingw32/lib/python2.7/site-packages/serial/serialwin32.py", line 31, in __init__
super(Serial, self).__init__(*args, **kwargs)
File "C:/msys32/mingw32/lib/python2.7/site-packages/serial/serialutil.py", line 182, in __init__
self.open()
File "C:/msys32/mingw32/lib/python2.7/site-packages/serial/serialwin32.py", line 62, in open
raise SerialException("could not open port {!r}: {!r}".format(self.portstr, ctypes.WinError()))
serial.serialutil.SerialException: could not open port '/??/COM27': WindowsError(123, 'The filename, directory name, or volume label syntax is incorrect.')
make: *** [esp32/esp-idf/components/esptool_py/Makefile.projbuild:48: flash] Error 1
Any ideas?
Thanks
flashing from windows machine
Re: flashing from windows machine
Hi ry1234,
Short/simple answer: You should be able to specify COM27 in the menuconfig (or running "make flash ESPPORT=COM27" on the command line and it should flash correctly.
Long/MSYS-is-tricky answer: The default Python installation (including pyserial) runs in pure mingw32 mode rather than MSYS2 mode. This was specifically so that COM ports could be used by their normal names, because I wasn't sure how well pyserial would run when compiled in MSYS mode, and because the precompiled binary package on pypi used this compilation mode also. It's interesting that it seems to have resolved /dev/ttyS26 to the correct COM even though it can't follow through with opening it. I can't explain that!
Short/simple answer: You should be able to specify COM27 in the menuconfig (or running "make flash ESPPORT=COM27" on the command line and it should flash correctly.
Long/MSYS-is-tricky answer: The default Python installation (including pyserial) runs in pure mingw32 mode rather than MSYS2 mode. This was specifically so that COM ports could be used by their normal names, because I wasn't sure how well pyserial would run when compiled in MSYS mode, and because the precompiled binary package on pypi used this compilation mode also. It's interesting that it seems to have resolved /dev/ttyS26 to the correct COM even though it can't follow through with opening it. I can't explain that!
Who is online
Users browsing this forum: No registered users and 96 guests