108 Commits

Author SHA1 Message Date
Gareth McMullin
b03cc59bea target: Add target controller structure for indirect calls back to host. 2016-07-13 08:31:09 +12:00
Gareth McMullin
5832d8a42a Clean up common SWD stuff. 2016-07-13 08:31:09 +12:00
Gareth McMullin
9b8e2c3ad1 target: Replace all calls to gdb_out with new tc_printf. 2016-07-13 08:31:09 +12:00
Gareth McMullin
5c5f76d60e target: Remove last accesses to private structure from outside.
Only include target_internal.h from inside target files.
2016-07-13 08:31:09 +12:00
Gareth McMullin
07f27d1b70 Hide target list internals form command.c
Remove unused support for extended target structure size.
2016-07-13 08:31:09 +12:00
Gareth McMullin
72790893ae target: move mmio routines out of public interface.
Fix crc routine to use buffered reads on stm32.
2016-07-13 08:31:09 +12:00
Gareth McMullin
e28e158721 Move *scan prototypes to target.h. 2016-07-13 08:31:09 +12:00
Gareth McMullin
4e04c1dded Split out non-public target stuff into new header.
Wrap target methods with functions instead of macros.
2016-07-13 08:31:09 +12:00
Gareth McMullin
0fc61efe7c Move STM32L[01] bit definitions to their driver and remove header. 2016-07-13 08:31:09 +12:00
Gareth McMullin
419aae4940 lpc15xx cleanup 2016-07-06 10:34:51 +12:00
David Lawrence
4addec0a21 lpc15xx support 2016-07-05 16:53:47 -04:00
Gareth McMullin
8b4342394f Overhaul of timeouts so they may be nested. 2016-06-28 14:35:43 +12:00
Gareth McMullin
bcf5b1eaa3 Merge pull request #126 from gsmcmullin/cortexa
Cortex-A support
2016-04-28 10:56:43 +12:00
Gareth McMullin
bed6627579 adiv5: Implement access to DP ABORT register. 2016-04-20 11:36:42 -07:00
Gareth McMullin
d94f7e0c75 Remove old arm7tdmi header. 2016-04-19 22:23:19 -07:00
Gareth McMullin
60f3be501e Pass breakpoint length to target. 2016-04-19 13:24:05 -07:00
Gareth McMullin
459bae4ea1 ADIv5 structural changes.
- Probe ROM table
- Mem-AP no longer pretends to be a target
- AP no longer provides priv pointer
2016-04-19 13:24:05 -07:00
Gareth McMullin
cd1d72257f Cleanup of SRST handling.
- Remove connect_assert_srst global.
- Attach functions always release reset.
- Platforms provide a method to poll the reset pin.
- Reset on scan is all internal to command.c
- Reset is released on a failed scan.  Fixes #111
2016-04-19 13:12:16 -07:00
Gareth McMullin
d5e263122f Increase JTAG_MAX_DEVS to 32.
Fixes #112
2016-02-02 10:04:57 +13:00
Richard Meadows
fa7cccff23 [efm32] Formatting fixes 2015-11-14 14:56:03 +00:00
Richard Meadows
07f7571dd1 Add basic support for EFM32/EZR32 chips
Tested with EZR32LG230
2015-10-23 19:58:44 +01:00
Uwe Bonnes
2336a313e4 Add STM32L4 handling. No option write handling yet. 2015-08-22 12:59:56 +02:00
Gareth McMullin
9009ed6581 cortexm: Add target option to inhibit assersion of SRST. 2015-04-11 16:08:59 -07:00
Gareth McMullin
09b781f1c1 target: Remove old flash interface. 2015-04-11 16:05:41 -07:00
Gareth McMullin
3d8b34f180 lpc: split out common code and rewrite to use new interface. 2015-04-11 16:05:40 -07:00
Gareth McMullin
cd5d569d38 lpc: Reduce differences between lpc11xx and lpc43xx code. 2015-04-11 16:05:40 -07:00
Gareth McMullin
45328ea124 Add buffering support for flash drivers.
Some devices can get a significant boost in performance by writing to
flash memories one page at a time.  Generic function to do this are
provided at the target layer and may be used by flash drivers.
2015-04-11 16:05:40 -07:00
Gareth McMullin
36f749fed9 Fix flash buffer alignment in target layer. 2015-04-03 21:21:30 -07:00
Gareth McMullin
7202db5860 Add new functions to wrap flash driver erase/write/done operations. 2015-04-03 21:20:01 -07:00
Gareth McMullin
691d21989a Add function to add simple flash driver to target.
Clean up ram/flash/memory map on target destruction.
2015-04-03 21:18:16 -07:00
Gareth McMullin
0fc635b3f8 Add functions for dynamically generating the XML memory map. 2015-04-03 21:18:16 -07:00
Gareth McMullin
21d464293c gdb: don't access target fields directly. 2015-03-29 18:06:13 -07:00
Gareth McMullin
c2cde32716 Improve cortexm_read/write_regs. Use more sensible return types. 2015-03-29 17:37:03 -07:00
Gareth McMullin
274b818517 Make cortexm_pc_write static. 2015-03-29 16:48:51 -07:00
Gareth McMullin
31fae032f7 cortexm: Separate stub loading from running. 2015-03-29 15:20:00 -07:00
Gareth McMullin
9f271d5cd7 Consistently use 'target *t' for target var. 2015-03-28 20:47:17 -07:00
Gareth McMullin
1e54139f4a target: Remove pc_read/pc_write methods. 2015-03-28 20:15:33 -07:00
Gareth McMullin
4313b64bbe Add a flash_done target method. 2015-03-26 20:47:57 -07:00
Gareth McMullin
64c79e1d03 Consistently name target var 't' in cortexm. 2015-03-26 20:47:57 -07:00
Gareth McMullin
d6225eec76 Raise timeout exception when target is in WFI.
Ignore the exception when polling for halt, and report the exception
to the user if halting the target fails.
Remove old allow_timeout flag in DP struct that's no longer needed.
2015-03-22 12:26:45 -07:00
Gareth McMullin
fa046601a5 Add exception handling mechanism and raise exception on low-level comms failure. 2015-03-22 12:26:45 -07:00
Gareth McMullin
a497127a8d Move MIN macro to general.h 2015-03-22 12:23:03 -07:00
Gareth McMullin
437aedda11 Rewrote stm32f1 stub in C and call with parameters in registers. 2015-03-19 07:48:57 -07:00
Gareth McMullin
c2462a6788 Add cortexm generic stub call, and use in stm32f1 driver. 2015-03-19 07:48:47 -07:00
Gareth McMullin
c3f798438a Remove abstraction of adiv5_dp_write. Both implementations were identical. 2015-03-15 17:12:31 -07:00
Gareth McMullin
2bf54f9a72 Replace adiv5_ap_mem* functions with inline wrappers to target mem*. 2015-03-15 16:02:09 -07:00
Gareth McMullin
ee3af96a73 Consolidate target_mem_read* and target_mem_write* methods.
There are now only mem_read and mem_write, that must
handle all alignments.  These methods return void, errors must be
checked with target_check_error.
2015-03-15 14:31:57 -07:00
Gareth McMullin
2e785e56fa adiv5: Encode APnDP into register definition.
Clean up magic numbers in adiv5 calls.
Removed old adiv5_dp_write_ap and adiv5_dp_read_ap.
2015-03-14 18:03:04 -07:00
Gareth McMullin
6f5b1873d7 Use size_t for sizes in flash functions. Fix all sign compare warnings. 2015-03-14 15:18:22 -07:00
Gareth McMullin
f5c856af3b Fix pointer sign warnings and remove -Wno-pointer-sign. 2015-03-13 20:35:39 -07:00