Wykres commitów

58 Commity (8df5b3be5edd177ecbbc355fff976b6afba20962)

Autor SHA1 Wiadomość Data
Fabien Le Mentec 8df5b3be5e [ update ] bind gdb server on INADDR_ANY, as requested by thomas@popp.ws 2013-04-01 15:36:52 -05:00
Michael Pratt 2216d28452 Add SIGINT handler for stlink cleanup
SIGINT causes st-util to immediately exit, without closing the open
stlink.  This leaves devices (at least the F4 Discovery) in a state
where they are unable to reset.  st-util could still connect and control
them, but a power cycle was required before they could reset on their
own.

A signal handler is added for SIGINT, which performs cleanup and closing
of the open stlink device, allowing it to function normally on
disconnect.
2013-03-06 16:34:32 -05:00
Michael Pratt 4d1ee4d97e Move persistence flag to st_state_t
It makes sense for it to be with all other state data.  This meant
passing the entire state struct into serve.
2013-03-06 14:23:17 -05:00
Michael Pratt 9bed540624 Add persistence support to gdb-server
When started with -m, or connected with 'target extended-remote', the
GDB server will not terminate upon disconnection from GDB, instead it
will begin listening for conenctions again.

Starting with extended-remote also has the advantage of allowing 'run'
to be used to reset the target and begin again.  Unfortunately, 'start'
is not working properly, as it does not send a reset packet (R), so it
complains when it tries to access memory before it is connected to the
target.
2013-03-06 12:52:12 -05:00
Michael Pratt 3569970998 Revert "[ merge ] patch from fischermi@t-online.de, GDB server endless loop"
This reverts commit 1c2828cc91.
2013-03-06 12:03:27 -05:00
Nicolas Schodet 44445dd7b0 Fix byte count when doing unaligned memory read, fix issue #127
- when start is adjusted, count should also be adjusted,
 - then, count is rounded to the next multiple of word size.
2013-02-12 19:38:46 +01:00
Fabien Le Mentec 1c2828cc91 [ merge ] patch from fischermi@t-online.de, GDB server endless loop 2012-12-27 07:00:46 -06:00
Fabien Le Mentec 08872f834d [ merge ] Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de> patches 2012-11-25 09:50:44 -06:00
Jeff Kent ff1a7aa50b workaround for asserting nRST, issue "monitor jtag_reset" from gdb 2012-09-19 12:22:28 -05:00
Michael Pratt 684d76afa0 Fix watchpoint support
Setting of watchpoints was nested inside of a case statement, so it
would only run for that case, even though it supports all cases.
2012-08-19 12:19:25 -04:00
Michael Pratt c6274f026b Write to extra (FP, etc) registers from GDB
The extra registers added in my previous commit can now be modified from
within GDB.  Since the ST-LINK does not support accessing these
registers, a workaround was used from reading an writing to them.

That is, the Debug Core Register Selector Register (DCRSR) can be written
with the register requested, and it will be read/written to/from the
Debug Core Register Data Register (DCRDR).  The standard ST-LINK memory
access functions are used to make these accesses.

A target descriptor XML file is sent to GDB from the server, which tells
GDB which registers exist on the target.

This is only supported for the STM32F4, and has only been tested on the
STM32F4DISCOVERY.  I tested st-util on an STM32L-DISCOVERY and my
changes did not seem to interfere with its operation.
2012-07-09 01:00:53 -04:00
Michael Pratt b1e65ea367 Extra registers integration with GDB
The support for extra registers has been added to GDB.  Now all core
registers can be read from GDB.  Write support has not yet been added.
2012-07-08 23:04:35 -04:00
Michael Sparmann 5b6eb51bd2 Fix "monitor reset" gdb command being misinterpreted as "monitor resume"
by checking for the full word, not just the first two chars.
2012-07-03 15:10:07 +02:00
Tectu 105b293a15 fixed option bytes amount 2012-05-25 17:05:44 +02:00
Dave Murphy 620a63c3ed Merge branch 'master' into mingw 2012-05-14 12:35:30 +01:00
Dave Murphy 947c1409e3 cast to avoid pointer warning 2012-05-13 22:55:41 +01:00
Michael Pratt b61a06a8b7 Fixed issue #66 - Fixed the F4 memory map to include CCM RAM. https://github.com/texane/stlink/issues/66 2012-05-11 14:11:12 -04:00
Dave Murphy 2559ab0c30 use WSAStartup on windows, replace bzero with memset 2012-04-29 18:48:26 +01:00
Dave Murphy 7ed5be2963 build with mingw 2012-04-29 14:43:46 +01:00
Fabien Le Mentec 18d6fe4893 Get st-util ack'ing the monitor request. Responds to
monitor reset     -- reset the core
    monitor resume    -- get the core running but don't stop gdb executing commands
    monitor halt      -- halt the core
2012-02-01 16:05:46 -06:00
Karl Palsson f38ff8f912 Unify chipid naming convention.
Flag more duplicate variables that need to be removed/combined
2012-02-01 20:55:10 +00:00
Uwe Bonnes 9c41193a16 Use stlink_r|w_debug32 for single word access in the gdbserver too 2012-01-19 13:47:23 +01:00
Uwe Bonnes 7eb080490c Move reset/load_param in the open functions, as requested by Karl 2011-12-18 23:35:20 +01:00
Uwe Bonnes 82c638ed83 For gdbserver, use the same initialization sequence like for flashing 2011-12-18 21:44:40 +01:00
Karl Palsson 83a5eb2ed3 Merge branch 'tmaster' into future
This branch should work for F1 and F4 devices.  It has currently been tested
with F1 value line, (a VL discovery board) programmed via gdb via both an
stlinkv1 and an stlinkv2.

F4 has _not_ yet been tested on this branch

Conflicts:
	.gitignore
	doc/tutorial/tutorial.pdf
	example/blink/main.c
	gdbserver/Makefile
	gdbserver/gdb-server.c
	src/stlink-common.c
	src/stlink-common.h
	src/stlink-usb.c
2011-11-15 00:57:09 +00:00
jnosky 768a70d321 Added code so gdbserver can fully support the STM32F4 variable page sizes
gdbserver can now upload up to 1MB projects to flash
2011-11-14 16:20:49 -05:00
Karl Palsson d019d3fc4f Turn down default logging level.
And remove dead/duplicate code that is included in the opening of the device
2011-11-14 04:11:10 +00:00
Karl Palsson 5a5d36fdc3 Move all the flash size mapping from gdb server into core.
All the device params like flash size and page size should all be in the core open routines, not
_only_ in the gdbserver.  (This should stop it from ending up duplicated in the core, and get rid of
some of the hacks that were turning up.  All of this is chip specific!)
2011-11-12 20:36:43 +00:00
Fabien Le Mentec 0ff09f90ce [merge] merge jnosky/master 2011-11-12 02:25:02 -06:00
Fabien Le Mentec 13c0da3bcc Merge branch 'jnosky/master' 2011-11-12 01:49:08 -06:00
jnosky d6ab5b0c3f Temp fix to work with F4 up to 64k of flash, changed chip detection
Can debug with up to 64k flash on the F4
2011-11-10 20:12:29 -05:00
Dmitry Bravikov 72104c9816 [fix] parsing command line and sg autodetection 2011-11-08 09:41:43 +06:00
Dmitry Bravikov c85c172c63 Parsing the arguments of command line 2011-11-06 23:26:12 +06:00
Karl Palsson fd5967fba6 Fix compilation error after removing devices. 2011-11-04 01:05:27 +00:00
Karl Palsson 0f376a74a5 Remove device names, we now just find it via USB ids.
In the future, we might actually want device names back again, if you have multiple stlink's
connected.  But that would be a new device name, not scanning for /dev/sgX looking for scsi
devices.
2011-11-03 23:40:27 +00:00
Karl Palsson e8bae670d2 Fix compilation for 32bit machines
%Ld works for size_t only on 64 bit, the correct conversion is %zd
2011-11-01 21:26:05 +00:00
jnosky 0fbdd62e61 Fixed flash utility for STM32F4
Can write entire 1MB of flash
2011-10-29 18:17:46 -04:00
Karl Palsson d7e37a684a Replace all logging
I needed some sanity...
2011-10-22 20:32:02 +00:00
Karl Palsson 42d2da531f flag out the only scsi specific code
Also flag out some places where code appears unused.
2011-10-22 19:09:31 +00:00
Karl Palsson 076f1086fa Remove all #ifdefs for sg-utils.
We're starting on integration from github.com/afaerber
So, instead of scanning all the usb devices, just open what we want.
2011-10-22 18:05:24 +00:00
Karl Palsson c37975c157 remove swallowing of ctrl-c
No idea why this was added, but it's not necessary for anything I've found.
2011-10-22 15:53:03 +00:00
Karl Palsson 2f7b70f1a8 Add option parsing and help
Supports setting the gdb listen port
Supports setting which version of stlink to use
Supports setting the device to use (in case autoprobing doesn't work)
2011-10-22 15:20:21 +00:00
Karl Palsson 9bc72d4519 Merge upstream texane/master 2011-10-22 02:11:04 +00:00
Ned Konz 105e266a05 Allowed CONFIG_USE_LIBSG=0 to suppress STLink/V1 compilation
This will let people with Macintosh OS/X computers compile and use stlink with STLink/V2 devices, as libsg3 is not available for that platform.
2011-10-20 19:21:43 -07:00
Fabien Le Mentec 27cbdfaa6e [fix] do not set socket timeout 2011-10-20 18:25:11 -05:00
Fabien Le Mentec 0571447546 [merge] patches from uwe 2011-10-20 16:43:21 -05:00
Fabien Le Mentec a34d563757 [merge] karl/uwe_usb branch 2011-10-18 16:35:24 -05:00
Fabien Le Mentec 4bb6ab6d9f [merge] karl/uwe_usb branch 2011-10-18 16:27:36 -05:00
Fabien Le Mentec f01fc0c4f1 [fix] GDB port fixed to 4242 until better command line parsing. leave DFU mode. 2011-10-14 16:08:44 -05:00
Fabien Le Mentec ea11de2d8b [fix] GDB listening port, temporary. needs better command line parsing. 2011-10-14 15:55:17 -05:00