139 Commits

Author SHA1 Message Date
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
Gareth McMullin
1196b03d66 stm32l0: Fix pointer/integer casting warnings. 2015-03-11 20:47:51 -07:00
Gareth McMullin
3d28c1418c Cleaned up printf/scanf for C99 integer types. 2015-03-11 20:47:42 -07:00
Marc Singer
bf1cb71eb7 Revisions on Gareth's comments.
o Implemented byte writes to EEPROM now that the emulator has a
  byte-wide target write.
o Added comment describing the reason that mass erase doesn't work.
o Removed all unused code.
o Changed to Linux kernel indent style.
o Changed to Linux kernel function to parenthesis style.
o Stub generation doesn't use Perl, switched to sed.  Also, only
  including the instructions instead of the source and the instructions.
o Handling unaligned destination writes.
2015-03-08 16:25:22 -07:00
Marc Singer
e0a8ce5a88 STM32L0x target support.
Target support for stm32l0's and stm32l1's including option bytes and
data EEPROM.  This module will superceed the previous stm32l1 driver.

o Program flash write and erase.
o Options modification and interpretive status.
o Stubs for program flash writes and erases.  Stubs are modestly
  faster than non-stub version.   The stm32l0 will not execute stubs
  when the MCU has crashed.  A monitor option may be used to force
  non-stub flash writes.
o Stubs generated from C++ code and converted to arrays of half-words.
o Writes to data EEPROM supoprted when loading segments.
o EEPROM data monitor command to write words.
o Stubs supported on stm32l1.
2015-03-08 16:17:34 -07:00
Gareth McMullin
3e466f2d23 Factor out timing routines common to all STM32 targets. 2015-03-02 21:59:04 -08:00
Gareth McMullin
b07ffffcee Factor out common cdcacm.c from stm32 and tm4c.
Cleaned up interface to enter bootloader and read serial number.
2015-03-02 10:16:33 -08:00
Gareth McMullin
4d4813de87 Clean up includes everywhere.
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.
2015-03-01 22:16:04 -08:00
Gareth McMullin
476f83b69a Move common USB stuff out of platform header files. 2015-02-28 22:48:26 -08:00
Gareth McMullin
75001a4421 Factor Morse code functions out of platform code. 2015-02-28 22:05:10 -08:00
Richard Meadows
565795e168 Added support for SAMD10/11/21, and list of tested SAM D devices
This allows blackmagic to be used with the new Arduino Zero board via
the unpopulated SWD header on the east end of the board.
2015-01-18 22:35:59 +00:00
Richard Meadows
3726061773 Support for the NVMCTRL Security Bit (PROT=1) 2015-01-18 20:46:26 +00:00
Gareth McMullin
a3ab9b24d1 Avoid repetition of cortexm code in stmd20 driver. 2015-01-18 12:16:17 +13:00
Gareth McMullin
9c5ffd61f7 First cut at Freescale Kinetis support. 2015-01-06 22:26:00 +13:00
Vegard Storheil Eriksen
9434299613 Add support for halfword memory accesses. 2014-10-21 00:12:50 +02:00
Richard Eoin Meadows
945a2802d5 Atmel SAMD20 support 2014-09-03 21:17:41 +12:00
Mike
34d0f64529 Nordic nRF51 series support 2014-05-01 15:09:59 +01:00
Gareth McMullin
d8f737fc53 Disable ADIv5 timeout while target is running. 2013-06-19 21:05:53 +12:00
Gareth McMullin
8c877d6dfa Fix trailing whitespace everywhere. 2013-06-17 15:53:32 +12:00
Gareth McMullin
5020d1f05d Move semihosting support to cortexm.c.
Try to implement more syscalls.
2013-05-18 15:33:58 +12:00