Support for execution of asynchronous target, such as openocd, which
by default runs in the background, but if it's the only target idf.py
outputs the openocd in the console waiting for termination by user.
Supports also blocking commands gdb and gdbtui to start a debugging
session in an active console.
Supports running gdbgui running a UI debugging session in a browser
window, using the active console for other commands, such as openocd
or monitor.
Supports combining the debug targets in one action list, such as
idf.py openocd gdbgui monitor
This adds detection of UART core dumps to IDF monitor. By default,
core dumps are not printed to the console, but are processed by
espcoredump.py using 'info_corefile' command. The result is printed
to stdout.
This feature can be disabled in menuconfig.
In the future this can be extended to allow running espcoredump.py
with 'dbg_corefile' argument, which is similar to the current GDB Stub
behavior.
Related to IDF-52.
This solves the issue that target is changed to the default one after
idf.py fullclean.
Also allow setting the default target using sdkconfig.defaults, e.g.
CONFIG_IDF_TARGET="esp32s2"
Closes IDF-1040
Python 2 expect the environ variables are all of type 'str', but
sometimes wrong 'unicode' type is given.
Here we force all variables that are not str to become str.
1. Call cli with explicit argv
When using debugging tools like `pydbg.py --some_arg idf.py -G Ninga
build`, those tools usually call the python script with sys.argv
modified to correct value. But if the cli is called with argv blank, the
cli will get the argv again, and finally get the original command line,
which is incorrect for debugging.
2. Encode the style unicode string back to ascii in menuconfig cmd
On Windows MSYS python2.7, the unicode string set in os.environ will
cause the subprocess creating to fail. All os.environ values should be
strings.