Wykres commitów

71 Commity (40cf75db389ca7120f4bd34cd9c6afde2d0b40b3)

Autor SHA1 Wiadomość Data
Olivier Gay 5851dee3cd Fix build issues with MinGW
Remove st-term from the list of the targets for MinGW.
st-term uses termios and would require a rewrite to have
it compile on MinGW. Also remove cleanup signal handlers
in gdb-server for MinGW to compile.
2013-10-27 15:32:43 +01:00
htk e886396e0e Support for reading target voltage 2013-09-30 01:51:26 +02:00
Maxime Vincent 57700499f1 Fixed the DEBUG switch in gdb-server.c 2013-09-01 09:23:19 +02:00
Michael Pratt 596fb35916 Add option to not reset board on connect
'-n' in st-util will cause it to skip the reset step, and thus allow you
to begin debugging at whatever point the code may currently be at.

Adding this feature required changing the stlink_open functions to
accept a reset flag that tells them whether or not to reset after
connecting.  Skipping reset does not seem to have any adverse effects on
stlink usb devices.  Unfortunately, I have to stlink v1 devices to test.
2013-08-18 14:44:58 -04:00
Jack Peel 04c142c69b Add SIGTERM signal handler to also call cleanup
When stopping st-util under Eclipse as an external tool the st-util
	receives a SIGTERM signal, and would not return the device to
	usb mass storage mode.  This change now calls cleanup in the SIGTERM handler too!!
2013-04-05 17:55:19 -07:00
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
Dave Murphy d02326726a fix signedness warning 2012-05-13 22:54:26 +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
Daniel O'Connor 5e5d1fa747 Use pkg-config to find libusb CFLAGS and LDFLAGS. 2012-01-31 16:49:45 +10:30
Uwe Bonnes 9c41193a16 Use stlink_r|w_debug32 for single word access in the gdbserver too 2012-01-19 13:47:23 +01:00
Friedrich Beckmann 8e5b2b51bf Added the library to the list of dependencies as in flash 2012-01-03 23:58:01 +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
Karl Palsson b55b75c3b9 Remove final reference to old sg/usb compilation flags 2011-11-14 23:01:03 +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
Karl Palsson 6cc3375151 Merge branch 'master' of github.com:karlp/stlink 2011-11-11 22:59:44 +00:00
Karl Palsson e9a205ff98 Finish removing sg-utils dependencies.
The code deps were removed, but the flags stayed in some makefiles.
2011-11-11 15:38:09 +00: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 c98c487fa5 Merge branch 'master' of https://github.com/texane/stlink
Conflicts:
	Makefile
	doc/tutorial/tutorial.pdf
	example/blink/Makefile
	flash/main.c
	src/stlink-common.c
	src/stlink-usb.c

Mostly whitespace conflicts it seems.
2011-11-04 02:51:15 +00: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
Chris Samuelson 59a7e8b470 Place -lusb-1.0 as the last of the linker options 2011-10-22 21:23:53 -05:00