The swolisten program failed to print the cbw buffer correctly while in dump mode. As printf() is used to print the dump, it is expected that the cbw buffer is zero-terminated, which would only be the case, if the cbw buffer is initialized with zeros, before filling it with new data. One could set the entire cbw buffer to zero, but it will be more efficient to only set the size-th byte to zero. Furthermore, if a '%' character appears in the data, printf() will attempt to format it, causing unexpected results. This patch fixes the above 2 problems, by: 1. using the size variable to set the size-th byte of the cbw buffer to zero, before passing it to printf(). 2. calling printf() with a "%s" formatting string, followed by the data buffer, cbw. |
||
---|---|---|
driver | ||
libopencm3@89074d6a13 | ||
scripts | ||
src | ||
upgrade | ||
.gitignore | ||
.gitmodules | ||
.travis.yml | ||
COPYING | ||
HACKING | ||
Makefile | ||
README.md | ||
UsingSWO |
README.md
Black Magic Probe
Firmware for the Black Magic Debug Probe.
The Black Magic Probe is a modern, in-application debugging tool for embedded microprocessors. It allows you see what is going on 'inside' an application running on an embedded microprocessor while it executes. It is able to control and examine the state of the target microprocessor using a JTAG or Serial Wire Debugging (SWD) port and on-chip debug logic provided by the microprocessor. The probe connects to a host computer using a standard USB interface. The user is able to control exactly what happens using the GNU source level debugging software, GDB.
See online documentation at https://github.com/blacksphere/blackmagic/wiki
Binaries from the latest automated build are at http://builds.blacksphere.co.nz/blackmagic