Page 1 of 2

make monitor not working on windows

Posted: Thu Mar 16, 2017 1:44 pm
by preetam
Hi Team,

i have the latest esp-idf , just cloned few minutes ago.
when i try to run make monitor , it is no where to be found

Could you resolve this soon.

Thank you
Paul

Re: make monitor not working on windows

Posted: Thu Mar 16, 2017 1:58 pm
by ESP_Sprite
Could you be a bit more specific to what you see? 'is nowhere to be found' isn't much of a problem description. What's the result if you try to run 'make monitor'?

Re: make monitor not working on windows

Posted: Thu Mar 16, 2017 1:59 pm
by preetam
here is the error

Code: Select all

$ make monitor
MONITOR
/bin/sh: winpty: command not found.
make: *** [~/ESP32/esp-idf/components/esptool_py/Makefile.projbuild:92: monitor] error 127

Re: make monitor not working on windows

Posted: Thu Mar 16, 2017 4:32 pm
by rudi ;-)
hi

have you winpty out the box installed, path missing?

best wishes
rudi ;-)

edit:
if you use msys32 ( win32 )
https://github.com/rprichard/winpty/rel ... a32.tar.gz

msys1.0
https://github.com/rprichard/winpty/rel ... sys.tar.gz
if you use cygwin..
if you use..
https://github.com/rprichard/winpty/releases

edit:
if you have install git bash, git cmd
you find the winpty.exe in
example:
c:/programme/git/bin

you can then example add in your path
set PATH=C:\Programme\git\usr\bin;%PATH%
or
set PATH=%PATH%;C:\Programme\git\usr\bin
like you need

( i use winpty.exe from git bash and have append path )


@angus
not sure that you know,
in msys32 environment, winpty is not installed auto

Re: make monitor not working on windows

Posted: Thu Mar 16, 2017 5:27 pm
by preetam
Hi Rudi,

Thank you for the suggestion.
did try to install winpty for msys32

Now i get a new error

Code: Select all

$ make monitor
MONITOR
C:/winpty/bin/winpty.exe: error while loading shared libraries: msys-1.0.dll: cannot open shared object file: No such file or directory

Re: make monitor not working on windows

Posted: Thu Mar 16, 2017 5:48 pm
by rudi ;-)
preetam wrote:Hi Rudi,

Thank you for the suggestion.
did try to install winpty for msys32

Now i get a new error

Code: Select all

$ make monitor
MONITOR
C:/winpty/bin/winpty.exe: error while loading shared libraries: msys-1.0.dll: cannot open shared object file: No such file or directory

Hi Paul

can suggest to you, take the msys-1.0.dll from
vm/share/mingw/msys/1.0
and cpy it to c:/msys32/usr/bin
but then you will get
$ make monitor
MONITOR
stdin is not a tty
i would suggest to you,
install git bash and add the path in environment
then you have no further problem ( 32/64 ) too

or perhabs Angus append the thing for window in next msys32 environment
or miniterm.py

best wishes
rudi ;-)


btw:
a second is,
you can try to install the cygwin version, ( have not tested will have a look later to it )
and add the things to path

Re: make monitor not working on windows

Posted: Thu Mar 16, 2017 6:01 pm
by rudi ;-)
Hi Paul

try this:
MSys32 ( msys-2.dll )
https://github.com/rprichard/winpty/rel ... a32.tar.gz

best wishes
rudi ;-)

Re: make monitor not working on windows

Posted: Thu Mar 16, 2017 6:17 pm
by rudi ;-)
@Angus
( not sure, i use usually vm )

can you please check the monitor.py for using in windows
looks like the slash and back slash is here a problem again?

not "found"
$ make monitor
MONITOR
python: can't open file '/c/eMbeddedHome2017/esp32AT/esp-idf/tools/idf_monitor.py': [Errno 2] No such file or directory
make: *** [/c/eMbeddedHome2017/esp32AT/esp-idf/components/esptool_py/Makefile.projbuild:92: monitor] Fehler 2
test by hand (windows backslashes) "not found"
sysop@By15 MSYS /c/eMbeddedHome2017/esp32AT
$ python c:\eMbeddedHome2017\esp32AT\esp-idf\tools\idf_monitor.py
C:\msys32\mingw32\bin\python.exe: can't open file 'c:eMbeddedHome2017esp32ATesp-idftoolsidf_monitor.py': [Errno 2] No such file or directory
test by hand ( windows slashes ) "found"
sysop@By15 MSYS /c/eMbeddedHome2017/esp32AT
$ python c:/eMbeddedHome2017/esp32AT/esp-idf/tools/idf_monitor.py
usage: idf_monitor - a serial output monitor for esp-idf [-h] [--port PORT]
[--baud BAUD]
[--make MAKE]
elf_file
idf_monitor - a serial output monitor for esp-idf: error: too few arguments
best wishes
rudi ;-)

Re: make monitor not working on windows

Posted: Fri Mar 17, 2017 7:31 am
by PPotempa
Hello everybody, I am new in this forum.

I was also hit but this issue but I used putty as a workaround. Nonetheless, after seeing rudi's post I looked around a bit:

The error is located in esp-idf/components/esptool_py/Makefile.projbuild:92
Looking into github file history:
https://github.com/espressif/esp-idf/co ... 9a8e8e519a
I found:

Code: Select all

-	$(PYTHON) -m serial.tools.miniterm --rts 0 --dtr 0 --raw $(ESPPORT) $(MONITORBAUD)
+	$(summary) MONITOR
+	[ -f $(APP_ELF) ] || echo "*** 'make monitor' target requires an app to be compiled and flashed first."
+	[ -f $(APP_ELF) ] || echo "*** Run 'make flash monitor' to build, flash and monitor"
+	[ -f $(APP_ELF) ] || echo "*** Or alternatively 'make simple_monitor' to view the serial port as-is."
+	[ -f $(APP_ELF) ] || exit 1
+	$(MONITOR_PYTHON) $(IDF_PATH)/tools/idf_monitor.py --port $(ESPPORT) --make "$(MAKE)" $(APP_ELF)
I commented out the current line 92

Code: Select all

$(MONITOR_PYTHON) $(IDF_PATH)/tools/idf_monitor.py --port $(ESPPORT) --make "$(MAKE)" $(APP_ELF)
and pasted in the old version:

Code: Select all

$(PYTHON) -m serial.tools.miniterm --rts 0 --dtr 0 --raw $(ESPPORT) $(MONITORBAUD)
and now it works for me, until the new code is corrected.

Re: make monitor not working on windows

Posted: Fri Mar 17, 2017 7:53 am
by WiFive
"make simple_monitor" should do the old version already