Firmware BMP with ENABLE_DEBUG=1 will print WARN and INFO as before.
PC-Hosted BMPwill alway print to stderr. Warn is printed unconditional,
INFO, GDB, TARGET, DONGLE and WIRE will print if their appropriate bit in
cl_debuglevel is set via the -v verbose command line argument.
INFO will go to stdout with -t or -l.
This adds a new function to the internal target interface
to allow the target to get control before reset is complete
so that it can do any additional work. On this target there
is a proprietary internal bit that has to be reset in some
cases to allow the core to continue operating.
The new function returns a stop reason which must be translated in gdb server.
In the case of a watchpoint hit, the address is returned by a pointer parameter.
Simplify the extenal interface for set/clear breaki-/watchpoints.
When gdb issues a `m xx,200` command, the probe should respond with a
packet of size 2*0x200=1024 which is the size of the packet buffer.
However, the `hexify()` procedures writes 1025 bytes in the buffer.
During my tests, it caused the probe to hang when issuing a `dump`
command. Presumably by overwritting the `cur_target` variable.
All source files include general.h first and before anything else.
This inlcludes platform.h and platform_support.h
No header file needs to include to include any of these, but should include
any others needed for it's own declarations.
Implement bare minimum necessary to support console IO.
This works with standard newlib builds and is based on the reference
documentation:
http://infocenter.arm.com/help/topic/com.arm.doc.dui0471c/CHDJHHDI.html
Tested using gcc-arm-none-eabi-4_7-2013q1-20130313 for both
stm32f1-based BMP and stm32f0 target.
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
With gcc-arm-none-eabi-4_7-2013q1-20130313 and -O2 I get
text data bss dec hex filename
45744 304 2376 48424 bd28 blackmagic
With -Os the results are even more impressive:
text data bss dec hex filename
37900 304 2376 40580 9e84 blackmagic
Since -Os might lower the debugging speed, do not enable it yet in the
absence of real measurements.
Signed-off-by: Paul Fertser <fercerpav@gmail.com>