msys32/MINGW32 monitor function no longer works

catotonic
Posts: 36
Joined: Sun Jul 16, 2017 6:55 pm
Location: Houston, TX
Contact:

msys32/MINGW32 monitor function no longer works

Postby catotonic » Wed Dec 20, 2017 12:45 pm

I tried to run "make flash monitor" on two different project and both failed to run the monitor function.

output when I run "make flash monitor":

--- idf_monitor on COM3 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H --- ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPI
Traceback (most recent call last):
File "C:/msys32/home/jkk/esp/esp-idf/tools/idf_monitor.py", line 570, in <module> main()
File "C:/msys32/home/jkk/esp/esp-idf/tools/idf_monitor.py", line 504, in main monitor.main_loop()
File "C:/msys32/home/jkk/esp/esp-idf/tools/idf_monitor.py", line 269, in main_loop self.handle_serial_input(data)
File "C:/msys32/home/jkk/esp/esp-idf/tools/idf_monitor.py", line 302, in handle_serial_input self.console.write_bytes(b)
File "C:/msys32/mingw32/lib/python2.7/site-packages/serial/tools/miniterm.py",
line 63, in write_bytes self.byte_output.write(byte_string)
File "C:/msys32/home/johnk/esp/esp-idf/tools/idf_monitor.py", line 562, in write self.output.write(b) IOError: [Errno 0] Error
make: *** [/home/johnk/esp/esp-idf/components/esptool_py/Makefile.projbuild:96: monitor] Error 1

It seems to flash fine and I can still monitor it using putty, but not using msys32.

Has anyone else had this?
It happened right after a Windows update.

User avatar
ESP_krzychb
Posts: 400
Joined: Sat Oct 01, 2016 9:05 am
Contact:

Re: msys32/MINGW32 monitor function no longer works

Postby ESP_krzychb » Wed Dec 20, 2017 1:30 pm

This looks similar to https://github.com/espressif/esp-idf/issues/1136
Have you tried the latest esp-idf master release?

catotonic
Posts: 36
Joined: Sun Jul 16, 2017 6:55 pm
Location: Houston, TX
Contact:

Re: msys32/MINGW32 monitor function no longer works

Postby catotonic » Wed Dec 20, 2017 10:09 pm

@krzychb
Thanks for the reply.
Now you have me confused. When flashing I see esptool.py v2.1. I know I loaded what I thought was Ver 3.O over a month ago because I had a lot of problems with the change. But I don't know how to tell for sure. Have there been any recent releases because of Window 10 updates. "make flash monitor" has been working for months it just died yesterday. I had python ver2.7 on my computer but removed it and install ver3.3 but it made no difference. I think the API has its own python engine.

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

Re: msys32/MINGW32 monitor function no longer works

Postby ESP_Angus » Wed Dec 20, 2017 11:26 pm

catotonic wrote:@krzychb
Thanks for the reply.
Now you have me confused. When flashing I see esptool.py v2.1. I know I loaded what I thought was Ver 3.O over a month ago because I had a lot of problems with the change. But I don't know how to tell for sure. Have there been any recent releases because of Window 10 updates. "make flash monitor" has been working for months it just died yesterday.
A Windows 10 update broke monitor, and if you have a development version of "v3.0-dev" then it's probably broken in the version you have. It's also broken for some people in v3.0-rc1, although it will be fixed in the final release.

(You can check which version you have by changing to an IDF directory in the terminal and running "git describe --tags". It's also logged as part of startup from a built app. The esptool.py tool version is different to the IDF version.)

Your best options are to switch to the latest "master branch" for (v3.1-dev) or to the "release/v3.0" branch which has a few small fixes (including this one) on top of v3.0-rc1 (which will become v3.0-rc2 or the final v3.0 release, depending on how things go over the next week or so).

You can do this with either:

For master:

Code: Select all

git checkout master
git pull
OR

For release/v3.0:

Code: Select all

git fetch origin
git checkout release/v3.0
I had python ver2.7 on my computer but removed it and install ver3.3 but it made no difference. I think the API has its own python engine.
The MSYS2 environment install comes with a mingw version python 2.7, which is what IDF is intended to use. We don't support Python 3 at the moment.

catotonic
Posts: 36
Joined: Sun Jul 16, 2017 6:55 pm
Location: Houston, TX
Contact:

Re: msys32/MINGW32 monitor function no longer works

Postby catotonic » Sat Dec 23, 2017 7:27 pm

@ESP_Angus
Thank you for the suggestion, unfortunately the command you gave were without context. I was not sure where to run them. I am always afraid to run a command without know where it might do what. So I spent the last few days on and off trying to reinstall msys32 from scratch but kept getting "cannot find make/project.mk" After reading and reading I found the line "wrtm" (while reading the manual) about how to set the path. But after all that it still did not work.
After reading the error messages again, it finally sank in that monitor.py is in ESP-IDF and rebuilding msys32 would not fix anything, somehow monitor.py had became corrupted
Solution:
I copied monitor.py from github into my existing ESP-IDF.
This fixed it.
This long explanation is probably pointless, but if I open a problem I feel I should close it with an explaination with as much context as possible. So people can hopefully determine if this might help.
Again thanks for your diligence in helping all of us.

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

Re: msys32/MINGW32 monitor function no longer works

Postby ESP_Angus » Tue Dec 26, 2017 11:40 pm

Hi Catotonic,

I'm glad you found a solution. Sorry I didn't give more context, the commands were to be run in the "MINGW32" command line shell after changing the to IDF directory (ie `cd /path/to/idf`).

Probably the version of idf_monitor.py you downloaded from github is a newer version, so it's working now. Glad you got it sorted out.


Angus

Who is online

Users browsing this forum: No registered users and 106 guests