Flash port

wevets
Posts: 112
Joined: Sat Mar 09, 2019 2:56 am

Flash port

Postby wevets » Wed Jan 08, 2020 7:18 am

Someone gave me a LOLIN32 dev board which I want to use for some tests. The problem is that when I plug it into my Win dev box, it comes up on COM5. So I go into "serial flasher config" in "make menuconfig" and I set the Default serial port to COM5. I verfied that sdkconfig knows this. It shows the line:
CONFIG_ESPTOOLPY_PORT="COM5"
When I go to flash a program on to the LOLIN32 that works on the DevKitC, which I flash through COM3, the esp-idf flash python code insists on using COM3, the port that the DefKitC uses. Here's what the flasher says:
Flashing binaries to serial port COM3 (app at offset 0x10000)...
esptool.py v2.8-dev
Serial port COM3
Traceback (most recent call last):
File "C:/msys32/home/Steve/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 3167, in <module>
_main()
File "C:/msys32/home/Steve/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 3160, in _main
main()
File "C:/msys32/home/Steve/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 2855, in main
esp = chip_class(each_port, initial_baud, args.trace)
File "C:/msys32/home/Steve/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 237, in __init__
self._port = serial.serial_for_url(port)
File "C:/msys32/mingw32/lib/python2.7/site-packages/serial/__init__.py", line 88, in serial_for_url
instance.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 'COM3': WindowsError(2, 'The system cannot find the file specified.')
make: *** [/home/Steve/esp/esp-idf/components/esptool_py/Makefile.projbuild:67: flash] Error 1
Note the "COM3" in the first line.
What switch do I have to pull to get the flash program to respond to the "COM5" in the sdkconfig file?

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

Re: Flash port

Postby ESP_Angus » Wed Jan 08, 2020 7:26 am

Hi wevets,

If there's a environment variable ESPPORT defined (or set on the make command line) then this will override the serial port set in sdkconfig. Is it possible ESPPORT is defined somewhere (can run "echo $ESPPORT" to check it).


Angus

wevets
Posts: 112
Joined: Sat Mar 09, 2019 2:56 am

Re: Flash port

Postby wevets » Wed Jan 08, 2020 8:16 am

Angus,
That fixed it. I must have set that months ago and, never having had cause to change it, forgot about it.
Thanks. Works perfectly now.
wevets

Who is online

Users browsing this forum: No registered users and 279 guests