Commit Graph

30 Commits

Author SHA1 Message Date
Roland Dobai
1b464d23a9 tools: Correct coding style of idf_monitor 2018-11-26 15:02:39 +01:00
Roland Dobai
608fc23278 tools: Fix idf_monitor test case occasional hangup or failure
Closes idf/esp-idf#39
2018-11-23 13:33:17 +01:00
Angus Gratton
b355854d4d Merge branch 'master' into feature/cmake 2018-09-05 10:35:04 +08:00
Roland Dobai
276cba1103 idf_monitor: Fix Unicode decoding on Windows
Closes https://github.com/espressif/esp-idf/issues/2348
2018-08-31 12:20:55 +02:00
Angus Gratton
a9c4ed7139 Merge branch 'master' into feature/cmake 2018-08-30 18:51:01 +08:00
Roland Dobai
7118f4734b tools: Support Python3 in idf_monitor
Closes https://github.com/espressif/esp-idf/pull/1284
2018-08-24 08:12:19 +02:00
Angus Gratton
ff2404a272 Merge branch 'master' into feature/cmake 2018-08-16 17:14:17 +10:00
Roland Dobai
c1ae49dda1 Test the IDF Monitor through sockets
Creates a socket by socat and sends tests to the idf_monitor through it.
2018-07-09 08:37:40 +02:00
Roland Dobai
797340f7f8 idf_monitor: Fix console performance
51e42d8e92
introduced filtering options which handles the last (unterminated) line
with a delay. This introduced poor performance for console applications
when the user interacts with the ESP32 device in the same line because
there is an artificial delay for each key-press.

bb152030a0
decreased the delay but there are still delays for each key-presses.

The current fix makes only one delay per line instead of each
key-presses. When an unterminated line is detected then no more
"delayed" print is used for the given line.

Fixes https://github.com/espressif/esp-idf/issues/2054
2018-06-19 13:29:57 +02:00
Roland Dobai
bb152030a0 Fix the console performance issue
The IDF monitor waits for one second before printing the last
unterminated line. This is necessary for the correct filtering.
However, this causes poor performance, for example, in the case of the
system/console example.

This fix reduces the waiting time which improves the response time of
the console example and doesn't seem to influence the monitor filter.

Closes https://github.com/espressif/esp-idf/issues/2054
2018-06-13 08:05:31 +02:00
Roland Dobai
51e42d8e92 idf_monitor: add support for filtering options 2018-06-05 12:23:27 +02:00
Angus Gratton
be4956fe7c docs: Add some tips about setting the Python interpreter, and a specific check in idf.py
Don't show the "Python 2 interpreter" option in menuconfig when using CMake.

This is a stop-gap until we support Python 2 & 3 together in ESP-IDF (soon).

Closes https://github.com/espressif/esp-idf/issues/1924
2018-05-29 16:34:45 +10:00
Angus Gratton
8453806a8c idf.py: Fix 'idf.py monitor' build & flash targets 2018-05-04 16:05:25 +10:00
Angus Gratton
3e83cfd77c idf_monitor: Fix bug with Windows 10 sometimes printing a character twice
Turns out when IOError is thrown by the console, the character is
also successfully displayed.

Revisits fix from https://github.com/espressif/esp-idf/issues/1136

As reported https://esp32.com/viewtopic.php?f=14&t=4766&p=20637
2018-02-21 08:35:43 +11:00
Angus Gratton
4eab275a51 idf_monitor: Fix remaining case of Windows "console write fails" bug
Closes https://github.com/espressif/esp-idf/pull/1567
2018-02-01 14:05:56 +08:00
Angus Gratton
19d3d25ec2 idf_monitor: Aggressively clean up any interactive gdb session
At least on Linux, this can get stuck sometimes and cause terminal weirdness.
2018-02-01 14:05:53 +08:00
Angus Gratton
b62e5a4b4e idf_monitor: Fix Windows 10 bug in cases where second console write also fails
Although in my tests the second write always passes, people have reported
different results.

Closes https://github.com/espressif/esp-idf/issues/1136 (again)
2017-12-15 16:45:44 +11:00
michael
cb810ccbe1 feat(monitor): add pause feature. 2017-12-14 13:48:03 +08:00
michael
a8f89009a4 feat(monitor): add new feature allowing disabling log display. 2017-12-14 13:48:03 +08:00
Angus Gratton
19598fa6d3 monitor: Fix Windows 10 crash since Fall Creators Update
Closes https://github.com/espressif/esp-idf/issues/1136
2017-11-20 17:47:43 +11:00
Krzysztof Bociurko
5827fd8c71 idf_monitor: Fixed a bug where pressing a key that doesn't encode into
a proper ASCII character, terminated the monitor with an exception
2017-11-03 16:47:30 +08:00
Angus Gratton
d20fbffae1 idf_monitor: Demangle C++ names 2017-10-17 14:46:08 +08:00
Ivan Grokhotkov
141b1174c6 idf_monitor: send CR when ENTER is pressed
Other terminal emulators (screen, minicom) default to sending CR when
ENTER is pressed on the keyboard. Make behavior of idf_monitor
consistent with them.
2017-08-21 15:58:28 +08:00
Ivan Grokhotkov
d7d6f1e376 idf_monitor: use cancellation and Console.getkey from pyserial 3.3.0+
Between 3.1.0 and 3.3.0, pyserial had thread cancellation implemented
using a select, which blocked on the stdin and an auxiliary pipe. When
thread had to be cancelled, a byte would be sent into the pipe,
unblocking stdin.

Unfortunately, this method suffers from a problem with using select on
a StreamReader (which represents the decoder wrapped around stdin).
In some cases, when the TTY sends an escape sequence in response to
an escape sequence received from serial, this escape sequence will not
be read from stdin until some key is pressed.

In https://github.com/pyserial/pyserial/commit/cab3dab, this method
was replaced with an TIOCSTI ioctl. This change makes sure we use the
new cancellation method even if the script is running with older
pyserial.
2017-08-21 15:58:28 +08:00
Angus Gratton
5055290baf build system: Add idf_size.py tool for better "make size" output & analysis
Add new "make size_components" and "make size_files" targets for analysing makeup of the ELF file.

Plain "make size" output now looks like this:

Total sizes:
 DRAM .data size:   11156 bytes
 DRAM .bss  size:   22304 bytes
Used static DRAM:   33460 bytes ( 294220 available, 10.2% used)
Used static IRAM:   80480 bytes (  50592 available, 61.4% used)
      Flash code:  421463 bytes
    Flash rodata:  103824 bytes
Total image size:~ 616923 bytes (.bin may be padded larger)
2017-06-21 15:43:22 +10:00
Henrik Maier
b95bef4d9b Update idf_monitor.py to make --toolchain-prefix argument work
--toolchain-prefix command line argument was not taken into account when specified

Merges https://github.com/espressif/esp-idf/pull/617
2017-05-18 10:47:19 +10:00
Angus Gratton
e88226c256 idf_monitor: Use ANSI color codes for all output we inject into stderr 2017-03-23 10:41:14 +08:00
Angus Gratton
5f3b9876b8 idf_monitor: Fix issues using Ctrl-F/Ctrl-A/gdb with older pyserial
Previously error was "AttributeError: 'Console' object has no attribute 'cancel'"
2017-03-21 16:08:06 +08:00
Angus Gratton
e477ce93e9 idf_monitor: Small fixes (baud rate, EOL, /dev/tty.X on macOS, Ctrl-T on failure)
* "make monitor" not passed the configured baud rate
  Closes #436 https://github.com/espressif/esp-idf/issues/436
* Pass toolchain prefix from sdkconfig into monitor tool
* Allow setting EOL in idf_monitor.py, use CRLF by default
* Detect if /dev/tty.X is used on macOS, warn and replace with /dev/cu.X
* If a build fails or gdb exits, ignore Ctrl-T (allowing Ctrl-T Ctrl-A/F to be same key sequence everywhere)
* Add a note about winpty on Windows
  Ref 02fdf8271d (commitcomment-21369196)
2017-03-21 16:00:32 +08:00
Angus Gratton
1544544f8a tools: New idf_monitor 'make monitor' tool for smarter monitor output 2017-03-13 09:31:45 +08:00