d55cea871d
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. |
||
---|---|---|
.. | ||
stubs | ||
README | ||
bootprog.py | ||
dfu-convert.py | ||
dfu.py | ||
gdb.py | ||
get_openocd_nrf51_ids.py | ||
hexprog.py | ||
stm32_mem.py | ||
swolisten.c |
README
This directory contains some useful scripts for working on the Black Magic Debug project. bootprog.py - Production programmer using the STM32 SystemMemory bootloader. hexprog.py - Write an Intel hex file to a target using the GDB protocol. stm32_mem.py - Access STM32 Flash memory using USB DFU class interface. stubs/ - Source code for the microcode strings included in hexprog.py.