Page 1 of 1

ESPConsole - Multiplatform Serial + Ethernet terminal with Backtrace decoding

Posted: Tue May 16, 2023 8:16 am
by martins
When working with multiple ESP boards at the same time I got tired with putty and idf monitor pretty quickly. ScriptCommunicator on the other hand uses one button to Connect/Disconnect, which is much more comfortable:

ScriptCommunicator is scriptable multiplatform (Windows/Linux/MacOS) data terminal (serial, TCP/UDP server/client and others). In addition to the simple sending and receiving of data, ScriptCommunicator has JavaScript interface which allows you to process the data as you wish (custom protocol decoding for example) and even create your own GUI to manipulate and/or display the data.

Home: https://github.com/szieke/ScriptCommuni ... l-terminal and https://sourceforge.net/projects/scriptcommunicator/

The basic program does not colorize the log output and does not have backtrace decoding, so I made this script which extends the ScriptCommunicator to do just that:

ESPConsole is a "worker script" written for ScriptCommunicator as more GUI friendly alterantive to idf.py monitor. It shows ESP-Log outputs using ANSI coloring, but can also decode backtraces if hexadeciaml address is found in the log output, just like idf monitor does.

scriptcomm_backtrace_example.png
scriptcomm_backtrace_example.png (168.35 KiB) Viewed 7180 times

To decode backtrace address the *-elf-addr2line IDF tool is used. Script can find correct tool version from build folder automatically if you run the ScriptCommunicator on the same system where the CMake build was made. Just select your project's build .ELF file and the script does the rest.

You can also select the tool manually if you wish to do so. That may be helpful if you are runing script on different system than where the build was made or even wihout ESP-IDF installed. For that you will have to find correct *-elf-addr2line version and path manually.

And obviously, if you don't care about backtrace, you can leave the feature disabled and use it as regular terminal but with ESP-Log color coding.

Installation instructions:

1. Download and install ScriptCommunicator for your OS: https://sourceforge.net/projects/script ... tor/files/
2. Start ScriptCommunicator and open Script Window ("Scripts" button in main window)
3. From menu, select "Script -> Add worker script (CTRL+A)" and find the ESPConsole.js location:
<path-to-installed-folder>/exampleScripts/WorkerScripts/MainWindowConsole/ESPConsole/ESPConsole.js

Usage:

1. Select ESPConsole in the list of scripts and click the "Start" button
2. Select your connection options in "Settings" and connect
3. You should now see the ESP-Log output in ESPConsole tab
4. To use backtrace decoding, select your project's .ELF file in "Backtrace Settings" window
5. To clear the detected backtrace or refresh your project build info (after rebulding the project) press the Clear button in main window

For more details see the ESPConsole readme: https://github.com/szieke/ScriptCommuni ... /README.md

scriptcomm_backtrace_settings.png
scriptcomm_backtrace_settings.png (81.91 KiB) Viewed 7180 times