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
Paul Fertser
e0fc21a2a7
adiv5_swdp: allow to connect to a sleeping target by pulling SRST
...
This patch introduces a new command, "connect_srst [enable|disable]"
which allows to enable special mode in which SRST would be pulled low
before the SWD scan till attaching to a target.
Since on Cortex-Mx the SRST signal doesn't gate JTAG and SWD, it's
possible to connect to a target while holding reset, ask it to stop at
reset vector and only then deassert reset, thus allowing to attach to
the kind of firmware that goes immediately to sleep or disables
debugging by other means early on start.
Tested on an STM32VLDiscovery board with STM32F100 configured to go to
STOP mode and executing WFI in the very beginning of main().
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2013-05-14 12:32:44 +12:00
Uwe Bonnes
ce059cc8ed
LIBFTDI: Propagate the command line arguments to platform_init
2013-01-23 00:15:47 +01:00
Uwe Bonnes
749fb318e7
gdb_if: Use a doubled buffer scheme for reading data from USB
...
Needed, as the OTG driver erases the data read after eventually calling the callback
2013-01-21 11:02:44 +01:00
Uwe Bonnes
15d7077115
traceswo: Move (now-constant) traceswo.c to platforms/stm32
2013-01-21 11:02:44 +01:00
Uwe Bonnes
533608a2f4
Move usbuart to the stm32 directory
2013-01-21 11:02:43 +01:00
Gareth McMullin
2a46994b42
Fixed magic numbers for CSW access.
2013-01-11 10:02:34 -08:00
Gareth McMullin
2637f072a1
Probe function return bool, true if device identified.
...
Correctly identify LM3S3748.
2012-11-03 23:53:25 +13:00
Gareth McMullin
e1c1162a1a
Recognise LPC43xx dual core devices.
2012-11-03 21:33:28 +13:00
Gareth McMullin
0990c2224c
Allow target attachment to timeout and report failure.
...
This is needed for if the target device is held in reset.
2012-11-03 16:42:46 +13:00
Vegard Storheil Eriksen
faa43fdc92
Added support for STM32L1.
2012-10-25 21:44:26 +02:00
Gareth McMullin
234d54c5a5
Correct stepping over programmed breakpoints.
...
Fixes issue #2 .
2012-07-05 22:08:01 +12:00
Gareth McMullin
0433d3d12a
cortexm: Moved all static data to the heap.
2012-07-05 21:26:26 +12:00
Gareth McMullin
00c4dbfb11
ADIv5 AP and DP are now allocated on the heap and reference counted.
...
They are unref'd and free'd automatically when the target list is
destroyed.
2012-07-05 19:23:28 +12:00
Gareth McMullin
d64cec686a
Signal on halt is now returned by target_halt_wait().
...
Fault unwinding is now handled internally in target implementation.
GDB server doesn't need to know about it.
2012-06-30 20:29:08 +12:00
Gareth McMullin
53af978295
Allow user to specify JTAG IR lengths.
...
This allows the use of devices that shift out values other than 0x01
from IR.
2012-06-30 16:47:23 +12:00
Gareth McMullin
466bb66424
Made cur_target, last_target static in gdb_main.c.
...
Added target destroy notify mechanism.
2012-06-27 21:26:08 +12:00
Gareth McMullin
4581da2034
Added option byte programming commands for STM32F1.
2012-06-26 21:02:11 +12:00
Gareth McMullin
03fdd23e9c
Added mechanism for target driver to add new monitor commands.
2012-06-24 21:41:32 +12:00
Gareth McMullin
a16123997b
Added target.c for common target routines.
2012-06-24 19:08:49 +12:00
Gareth McMullin
c09cbe8719
First cut at an Atmel SAM3X driver.
2012-06-22 23:13:25 +12:00
Gareth McMullin
6089a66dce
Renamed target_flash_write_words to target_flash_write.
...
Buffer from GDB may not be aligned or integer number of words.
Corrected alignment in in STM32F1 driver.
2012-06-18 20:53:06 +12:00
Gareth McMullin
bc7e7d2112
Removed target header files containing a single prototype.
...
Target probe prototypes are all in target.h now.
2012-06-18 20:27:06 +12:00