New tool for "make monitor": idf_monitor

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

New tool for "make monitor": idf_monitor

Postby ESP_Angus » Wed Mar 15, 2017 11:22 am

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

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

Re: New tool for "make monitor": idf_monitor

Postby ESP_igrr » Wed Mar 15, 2017 1:23 pm

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.

User avatar
rudi ;-)
Posts: 1729
Joined: Fri Nov 13, 2015 3:25 pm

Re: New tool for "make monitor": idf_monitor

Postby rudi ;-) » Wed Mar 15, 2017 3:09 pm

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 ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

TangentAudio
Posts: 1
Joined: Sat Mar 18, 2017 2:07 pm

Re: New tool for "make monitor": idf_monitor

Postby TangentAudio » Sat Mar 18, 2017 2:09 pm

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.

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

Re: New tool for "make monitor": idf_monitor

Postby ESP_Angus » Mon Mar 20, 2017 2:46 am

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

User avatar
pcbreflux
Posts: 28
Joined: Sat Feb 11, 2017 1:00 am
Location: germany
Contact:

Re: New tool for "make monitor": idf_monitor

Postby pcbreflux » Sun Apr 02, 2017 5:20 pm

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

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

Re: New tool for "make monitor": idf_monitor

Postby ESP_Angus » Mon Apr 03, 2017 12:45 am

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

Shcreasey
Posts: 9
Joined: Sun Jul 02, 2017 10:37 pm

Re: New tool for "make monitor": idf_monitor

Postby Shcreasey » Fri Oct 06, 2017 3:43 pm

@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,
Steve.

Who is online

Users browsing this forum: Teh2024 and 128 guests