29 Commits

Author SHA1 Message Date
Koen De Vleeschauwer
8851504a41 new semihosting commands 2020-04-23 09:43:46 +02:00
Uwe Bonnes
470c8e8cf1 target_flash_erase: Do not crash when requesting erase of unavailable flash.
Allow to erase from command line.
2019-12-13 14:59:42 +01:00
Uwe Bonnes
fae2966b72 Target: Default to nop-function() for all exported target functions.
Fixes #522.
2019-09-23 17:42:29 +02:00
Gareth McMullin
20cad17ce3 target: Implement generic multi-register read/write 2019-09-01 20:38:38 +02:00
Gareth McMullin
9f4cf4124e target: Add new methods for read/write individual regs. 2019-09-01 20:38:38 +02:00
Uwe Bonnes
e29f2b4fb9 jtag/swd: Rename defines/make variables to allow removal of weak attribute
jtagtap.c is libopencm3 generic. Move to common.
2019-07-18 20:54:10 +02:00
Uwe Bonnes
dd3cb193f3 Indicate the Core in the Target list. 2019-07-17 17:38:21 +02:00
David R. Piegdon
02b2fdb2ae fix overwriting of still-needed value (refs #487)
this fixes a bug that was introduced in blackmagic PR #475 which lead to
firmware crashes when connecting to a BMP more than once without a
power-cycle.
2019-06-24 16:45:18 +02:00
Richard Meadows
600bc9f029 Generate DEBUG warnings and return if malloc/calloc fail.
This is will make debugging earier if this does happen, rather than
dereferencing the null pointer (or passing it to memcpy, or worse).

blackmagic PR #475
2019-05-26 18:56:12 +02:00
Uwe Bonnes
f3cacba219 libftdi: Flush buffer with detach. 2018-05-30 19:21:03 +02:00
Uwe Bonnes
5f404cdbc0 Construct memory map on the stack
The memory map uses 1k of SRAM and is only needed during attach. Release
after use lowers pressure on SRAM.
2018-04-23 10:51:04 +12:00
Gareth McMullin
00decb3718 target: Separate function to free memory map. 2018-04-23 10:48:05 +12:00
Gareth McMullin
048e8447a5 target: Only support buffered flash writes 2017-10-13 08:58:37 +13:00
Uwe Bonnes
120a2d9378 target: Fix calculation of erase size. 2017-10-05 22:11:01 +02:00
Uwe Bonnes
a7815fff3d target.c: No need to split write while still in same flash block. 2017-10-04 21:52:29 +02:00
Uwe Bonnes
25610e5ec5 target: Fix unconsistant use of tmplen. 2017-10-04 21:52:29 +02:00
stoyan shopov
01e3582525 fixed a bug in the breakpoint removal code 2017-04-28 13:22:59 +03:00
Gareth McMullin
3d2fa6d233 target: Add new targets to end of list.
This shows targets enumerated in their natural order,
rather than in reverse.
2017-03-27 14:59:54 +13:00
Gareth McMullin
ca364a889e Fix #145
Don't tc_printf in the probe.
tc_printf fixed to not crash of no controller connected.
2016-08-22 09:56:24 +12:00
Gareth McMullin
779e0b5d15 Print sizes in memory map using 32-bit formatting for newlib-nano. 2016-08-08 13:42:03 +12:00
Gareth McMullin
f131460168 Don't use zx format with printf. Doesn't work with newlib.
Fixes #144.
2016-07-19 10:45:46 +12:00
Gareth McMullin
9a45d89b4a target: Remove target_check_error from external interface. 2016-07-13 08:31:09 +12:00
Gareth McMullin
9aacc18f60 target: Restructure internal break/watch handling.
cortexa: Implement soft breakpoints.
2016-07-13 08:31:09 +12:00
Gareth McMullin
9136cf4c98 target: target_halt_wait and target_check_hw_wp replaced with target_halt_poll.
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.
2016-07-13 08:31:09 +12:00
Gareth McMullin
ab06243e93 target: Use size_t instead of unsigned in syscall interface. 2016-07-13 08:31:09 +12:00
Gareth McMullin
26fab877da target: Provide errno definitions and fallback for unimplemented syscalls. 2016-07-13 08:31:09 +12:00
Gareth McMullin
82cb6c8e83 target: Use target_addr for flash routines. 2016-07-13 08:31:09 +12:00
Gareth McMullin
aeaca988c3 target: Use new target_addr type consistently in external interface.
Flash routines still use uint32_t internally.
2016-07-13 08:31:09 +12:00
Gareth McMullin
b494279fe5 Move target files into separate directory. 2016-07-13 08:31:09 +12:00