Previous commit changed binary "flash" to "st-flash" but the actual
code printed help message still called it "flash". This commit changes
it to "st-flash".
The indentation of various st-link source files is highly inconsistent.
Reindent all source files to 4 space indentions for consistency.
I went with 4 space indentations, as it was the most common style.
'-n' in st-util will cause it to skip the reset step, and thus allow you
to begin debugging at whatever point the code may currently be at.
Adding this feature required changing the stlink_open functions to
accept a reset flag that tells them whether or not to reset after
connecting. Skipping reset does not seem to have any adverse effects on
stlink usb devices. Unfortunately, I have to stlink v1 devices to test.
Commit 0ed3907 added the clearing of DMA registers that was preventing
programming (see issue #74), however it uses hardcoded addresses of the
DMA registers on the STM32F4. This seems to prevent the flashing and
verification on STM32L1, as the registers only partly cover the range
zeroed. So the DMA clearing has been limited to the STM32F4
microcontroller.
Additionally, sometimes, typically directly after erases, a 'flash
loader run error' will occur that terminates the writing. This is not
necessary, as the writing is successfully performed by page writing
(line 1581 onwards of stlink-common.c), and so has been returned to a
error message (see issue #112). There is a comment on line 1574 (added by
Uwe Bonnes in commit 0164043f) that this may happen on blank devices,
and so the fatal error message is the incorrect response.
This branch should work for F1 and F4 devices. It has currently been tested
with F1 value line, (a VL discovery board) programmed via gdb via both an
stlinkv1 and an stlinkv2.
F4 has _not_ yet been tested on this branch
Conflicts:
.gitignore
doc/tutorial/tutorial.pdf
example/blink/main.c
gdbserver/Makefile
gdbserver/gdb-server.c
src/stlink-common.c
src/stlink-common.h
src/stlink-usb.c