Page 1 of 1

New tool for "make monitor": idf_monitor

Posted: Wed Mar 15, 2017 11:22 am
by ESP_Angus
Wanted to let everyone know about a new developer tool that just landed in github esp-idf master branch: idf_monitor

When you run "make monitor", it now invokes this custom Python program to monitor the serial output. This is similar to the old simple terminal monitor (still available as "make simple_monitor"), with some new features:
  • If a code address is printed over serial (for example, Backtrace following a crash), the source code line number and function will be automatically looked up via addr2line() and printed in the console.
  • If the gdbstub is started following a crash, idf_monitor will automatically run gdb
  • The keyboard shortcut Ctrl-T Ctrl-R will reset the board via the serial RTS line.
  • The keyboard shortcut Ctrl-T Ctrl-F will run "make flash" without leaving the monitor.
  • The keyboard shortcut Ctrl-T Ctrl-A will run "make app-flash" without leaving the monitor.
Hoping to add more integration, crash dumps for instance, in the future.

More details on the documentation page: http://esp-idf.readthedocs.io/en/latest ... nitor.html

There are unfortunately some known issues on Windows (listed in the docs) due to the difficulty of working in a hybrid *nix/Windows environment. Idf_monitor is still very useful on Windows, though.

Angus

Re: New tool for "make monitor": idf_monitor

Posted: Wed Mar 15, 2017 1:23 pm
by ESP_igrr
One note to OS X users: make sure you use /dev/cu.usbserialXX ports instead of /dev/tty.usbserialXX, otherwise gdb will hang trying to open the port. That's not something specific to idf_monitor, just mentioning this here because i got tripped over this when testing idf_monitor.

Re: New tool for "make monitor": idf_monitor

Posted: Wed Mar 15, 2017 3:09 pm
by rudi ;-)
will never miss this tool, i like this very much!
cause sometimes forget to close a terminal and flash procedure fails
or if we want see first bootlog after download the firmware from first moment on.

well done angus!

best wishes
rudi ;-)

Re: New tool for "make monitor": idf_monitor

Posted: Sat Mar 18, 2017 2:09 pm
by TangentAudio
I don't think this new monitor is honoring the 'make monitor' baud rate setting in the menuconfig. It seems to stick at 115200 regardless of the setting.

Running simple_monitor still works for me and it honors the baud rate.

Re: New tool for "make monitor": idf_monitor

Posted: Mon Mar 20, 2017 2:46 am
by ESP_Angus
Thanks TangentAudio. You are correct that it's not being set: the idf_monitor.py tool accepts this argument but the Makefile isn't passing it through. Will fix ASAP.

You can track the progress of this issue here: https://github.com/espressif/esp-idf/issues/436

Re: New tool for "make monitor": idf_monitor

Posted: Sun Apr 02, 2017 5:20 pm
by pcbreflux
Hi,

is there a way not reset the board when starting make monitor (maybe in make menuconfig) ?
I now use a board with reset via the serial RTS line but this should only reset after flash or on demand (Ctrl-T Ctrl-R).
And with the baudrate: wish we could set this on demand like before (Ctrl-T Ctrl-B).

Thank you and

Re: New tool for "make monitor": idf_monitor

Posted: Mon Apr 03, 2017 12:45 am
by ESP_Angus
pcbreflux wrote: is there a way not reset the board when starting make monitor (maybe in make menuconfig) ?
I now use a board with reset via the serial RTS line but this should only reset after flash or on demand (Ctrl-T Ctrl-R).
On Linux, this isn't technically possible and the board always resets. So there used to be a mismatch between the old "make monitor" behaviour depending on which platform you were on, which is awkward when writing documentation or giving people troubleshooting instructions. The new idf_monitor.py tool explicitly resets each time so the behaviour is the same across platforms.

You can configure the flasher in make menuconfig not to reset the board after flashing. This means if you do "make flash monitor" then the first reset after flashing will be when the monitor connects. Does this help?
pcbreflux wrote: And with the baudrate: wish we could set this on demand like before (Ctrl-T Ctrl-B).
I think this should be straightforward to add. I've added a feature request to track it on github: https://github.com/espressif/esp-idf/issues/481

Re: New tool for "make monitor": idf_monitor

Posted: Fri Oct 06, 2017 3:43 pm
by Shcreasey
@ESP_Angus,

It would be really helpful to be able to disconnect the 'monitor tool' and then re-connect it again later without causing a reset to the board.

Is there no way to achieve this?

For example, I am running some long term tests to check timing etc. and I want to connect to the board to check the serial debug data now and then.

I would like to be able to connect to another board in the meantime and develop code for that, whilst leaving the first board running, then just switch between them from time to time (without causing resets).

Is there any other way of achieving this kind of setup please?

Thanks,