make flash errors
-
- Posts: 15
- Joined: Fri Jun 09, 2017 3:06 am
make flash errors
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.
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.
Re: make flash errors
Are you starting mingw32 or msys2 prompt?
It should be mingw32 in order to use Windows port names.
It should be mingw32 in order to use Windows port names.
-
- Posts: 15
- Joined: Fri Jun 09, 2017 3:06 am
Re: make flash errors
I start with mingw32.exe but my system is 64 bit.ESP_igrr wrote:Are you starting mingw32 or msys2 prompt?
It should be mingw32 in order to use Windows port names.
Re: make flash errors
You cant find a com port, are you using the correct COM port? 23 seems high.
In msys2 type ls -la /dev/ | grep ttyS
for me this outputs:
ttyS3 would be my ESP32.
Set that in "make menuconfig"
"Serial flasher config" -> "Default serial port"
/dev/ttyS3
You can also try addressing the /dev/ttyS*serial.serialutil.SerialException: could not open port '/??/COM23': WindowsError (123, 'The filename, directory name, or volume label syntax is incorrect.')
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
Set that in "make menuconfig"
"Serial flasher config" -> "Default serial port"
/dev/ttyS3
Re: make flash errors
Use windows port names in menuconfig such as "COM23"
-
- Posts: 15
- Joined: Fri Jun 09, 2017 3:06 am
Re: make flash errors
Hi f.h-fs,f.h-f.s. wrote:You cant find a com port, are you using the correct COM port? 23 seems high.You can also try addressing the /dev/ttyS*serial.serialutil.SerialException: could not open port '/??/COM23': WindowsError (123, 'The filename, directory name, or volume label syntax is incorrect.')
In msys2 type ls -la /dev/ | grep ttyS
for me this outputs:ttyS3 would be my ESP32.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
Set that in "make menuconfig"
"Serial flasher config" -> "Default serial port"
/dev/ttyS3
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.
-
- Posts: 15
- Joined: Fri Jun 09, 2017 3:06 am
Re: make flash errors
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.
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.
Re: make flash errors
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.
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
Re: make flash errors
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.)
(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.)
Re: make flash errors
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.
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 95 guests