make flash errors

tony2simmy
Posts: 15
Joined: Fri Jun 09, 2017 3:06 am

make flash errors

Postby tony2simmy » Tue Jun 20, 2017 10:56 am

In MSYS32, 'make app' works well. When i want to download the program to ESP32,executing command 'make flash'. But some errors happen.
Flashing binaries to serial port /dev/ttyS22 (app at offset 0x10000)...
esptool.py v2.0
Traceback (most recent call last):
File "D:/msys32/home/Tony.Yuan/esp/esp-idf/components/esptool_py/esptool/espto ol.py", line 2405, in <module>
_main()
File "D:/msys32/home/Tony.Yuan/esp/esp-idf/components/esptool_py/esptool/espto ol.py", line 2398, in _main
main()
File "D:/msys32/home/Tony.Yuan/esp/esp-idf/components/esptool_py/esptool/espto ol.py", line 2127, in main
esp = chip_class(args.port, initial_baud)
File "D:/msys32/home/Tony.Yuan/esp/esp-idf/components/esptool_py/esptool/espto ol.py", line 175, in __init__
self._port = serial.serial_for_url(port)
File "D:/msys32/mingw32/lib/python2.7/site-packages/serial/__init__.py", line 88, in serial_for_url
instance.open()
File "D:/msys32/mingw32/lib/python2.7/site-packages/serial/serialwin32.py", li ne 62, in open
raise SerialException("could not open port {!r}: {!r}".format(self.portstr, ctypes.WinError()))
serial.serialutil.SerialException: could not open port '/??/COM23': WindowsError (123, 'The filename, directory name, or volume label syntax is incorrect.')
make: *** [/home/Tony.Yuan/esp/esp-idf/components/esptool_py/Makefile.projbuild: 53: flash] Error 1

I guess it may be the problem of configuration , don't know how to solve it.

ESP_igrr
Posts: 2067
Joined: Tue Dec 01, 2015 8:37 am

Re: make flash errors

Postby ESP_igrr » Tue Jun 20, 2017 11:12 am

Are you starting mingw32 or msys2 prompt?
It should be mingw32 in order to use Windows port names.

tony2simmy
Posts: 15
Joined: Fri Jun 09, 2017 3:06 am

Re: make flash errors

Postby tony2simmy » Tue Jun 20, 2017 11:13 am

ESP_igrr wrote:Are you starting mingw32 or msys2 prompt?
It should be mingw32 in order to use Windows port names.
I start with mingw32.exe but my system is 64 bit.

f.h-f.s.
Posts: 214
Joined: Thu Dec 08, 2016 2:53 pm

Re: make flash errors

Postby f.h-f.s. » Tue Jun 20, 2017 11:26 am

You cant find a com port, are you using the correct COM port? 23 seems high.
serial.serialutil.SerialException: could not open port '/??/COM23': WindowsError (123, 'The filename, directory name, or volume label syntax is incorrect.')
You can also try addressing the /dev/ttyS*
In msys2 type ls -la /dev/ | grep ttyS

for me this outputs:

Code: Select all

schr0015@DESKTOP-NB6H7MP MSYS ~
$ ls -la /dev | grep ttyS
crw-rw-rw- 1 schr0015 Domain Users 117,   0 Jun 20 13:23 ttyS0
crw-rw-rw- 1 schr0015 Domain Users 117,   3 Jun 20 13:23 ttyS3
ttyS3 would be my ESP32.
Set that in "make menuconfig"
"Serial flasher config" -> "Default serial port"
/dev/ttyS3

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: make flash errors

Postby WiFive » Tue Jun 20, 2017 5:03 pm

Use windows port names in menuconfig such as "COM23"

tony2simmy
Posts: 15
Joined: Fri Jun 09, 2017 3:06 am

Re: make flash errors

Postby tony2simmy » Wed Jun 21, 2017 2:06 am

f.h-f.s. wrote:You cant find a com port, are you using the correct COM port? 23 seems high.
serial.serialutil.SerialException: could not open port '/??/COM23': WindowsError (123, 'The filename, directory name, or volume label syntax is incorrect.')
You can also try addressing the /dev/ttyS*
In msys2 type ls -la /dev/ | grep ttyS

for me this outputs:

Code: Select all

schr0015@DESKTOP-NB6H7MP MSYS ~
$ ls -la /dev | grep ttyS
crw-rw-rw- 1 schr0015 Domain Users 117,   0 Jun 20 13:23 ttyS0
crw-rw-rw- 1 schr0015 Domain Users 117,   3 Jun 20 13:23 ttyS3
ttyS3 would be my ESP32.
Set that in "make menuconfig"
"Serial flasher config" -> "Default serial port"
/dev/ttyS3
Hi f.h-fs,
Please see the below log:
"Flashing binaries to serial port /dev/ttyS22 (app at offset 0x10000)..."
I had changed the com port number. ttyS22 is my ESP32.

tony2simmy
Posts: 15
Joined: Fri Jun 09, 2017 3:06 am

Re: make flash errors

Postby tony2simmy » Mon Jun 26, 2017 3:06 am

1.Download MSYS2.
You can get it from https://dl.espressif.com/dl/esp32_win32 ... 170330.zip
2.Extract it.
Extract the file of compressed from directory that you have chosen in previous step.
3.Run MSYS2 .
Double click ‘msys2_shell.cmd’.
4.Install tools in MSYS2.
Install python,pip,pyserial.

chegewara
Posts: 2207
Joined: Wed Jun 14, 2017 9:00 pm

Re: make flash errors

Postby chegewara » Mon Jun 26, 2017 3:50 am

ttyS22 is pretty high and can be equivalent to com23 in windows. like f.h-f.s said, try ls -la /dev/ | grep ttyS command and see what port you have open. Or maybe you have running putty or other serial program on this port.

EDIT: Just checked with my config, ls -la /dev/ | grep ttyS shows me /dev/ttyS2, but i got same message as you when im using it in menuconfig. With com3 all is fine.
$ make -j3 flash
Flashing binaries to serial port /dev/ttyS2 (app at offset 0x10000)...
esptool.py v2.0
Traceback (most recent call last):
File "F:/esp-idf/components/esptool_py/esptool/esptool.py", line 2405, in <module>
_main()
File "F:/esp-idf/components/esptool_py/esptool/esptool.py", line 2398, in _main
main()
File "F:/esp-idf/components/esptool_py/esptool/esptool.py", line 2127, in main
esp = chip_class(args.port, initial_baud)
File "F:/esp-idf/components/esptool_py/esptool/esptool.py", line 175, in __init__
self._port = serial.serial_for_url(port)
File "C:\Python27\lib\site-packages\serial\__init__.py", line 88, in serial_for_url
instance.open()
File "C:\Python27\lib\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 '/??/COM3': WindowsError(3, 'System nie mo\xbfe odnale\x9f\xe6 okre\x9clonej \x9ccie\xbfki.')
make: *** [/f/esp-idf/components/esptool_py/Makefile.projbuild:53: flash] Błąd 1

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: make flash errors

Postby ESP_Angus » Mon Jun 26, 2017 5:23 am

The version of Python we ship is not actually an MSYS2 Python, it's a MinGW python. So it doesn't ever recognise paths of the form "/dev/ttyXX". Use "COMxx" instead, same as for a normal Windows program.

(Unfortunately the only options we have for Windows Python/pyserial is either a version that works with COMxx, or a version that works with /dev/ttyXX, never a version that works with both. We went for COMxx as this is what we figure most Windows developers are more familiar with.)

f.h-f.s.
Posts: 214
Joined: Thu Dec 08, 2016 2:53 pm

Re: make flash errors

Postby f.h-f.s. » Mon Jun 26, 2017 11:06 am

I noticed a change here too, I was using /dev/ttyS3.
Since a esp-idf update, I got errors and now I am using COM4 which works for me.

Who is online

Users browsing this forum: No registered users and 128 guests