Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote branch 'karlgithub/master' into mystm32l
Conflicts: build/Makefile gdbserver/gdb-server.c This merges in the bulk of bravikov's work on the command line and automatic sensible defaults for the gdb server
- Loading branch information
Showing
3 changed files
with
151 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
INSTALL | ||
======= | ||
|
||
1) Load the sg kernel module: | ||
|
||
$ modprobe sg | ||
|
||
2) On Ubuntu you need to install the package libsgutils2-dev: | ||
|
||
$ sudo apt-get install libsgutils2-dev | ||
|
||
3) Make: | ||
|
||
$ make -C build | ||
|
||
4) Install or reinstall | ||
|
||
$ sudo make install -C build | ||
|
||
5) Run: | ||
|
||
$ st-util port [/dev/sgX] | ||
or | ||
$ st-util [port] | ||
or | ||
$ st-util --help | ||
|
||
6) Have fun! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#ifndef STLINK_HW_H_INCLUDED | ||
# define STLINK_HW_H_INCLUDED | ||
|
||
// STLINK_DEBUG_RESETSYS, etc: | ||
#define STLINK_OK 0x80 | ||
#define STLINK_FALSE 0x81 | ||
#define STLINK_CORE_RUNNING 0x80 | ||
#define STLINK_CORE_HALTED 0x81 | ||
#define STLINK_CORE_STAT_UNKNOWN -1 | ||
|
||
#define STLINK_GET_VERSION 0xf1 | ||
#define STLINK_GET_CURRENT_MODE 0xf5 | ||
|
||
#define STLINK_DEBUG_COMMAND 0xF2 | ||
#define STLINK_DFU_COMMAND 0xF3 | ||
#define STLINK_DFU_EXIT 0x07 | ||
|
||
// STLINK_GET_CURRENT_MODE | ||
#define STLINK_DEV_DFU_MODE 0x00 | ||
#define STLINK_DEV_MASS_MODE 0x01 | ||
#define STLINK_DEV_DEBUG_MODE 0x02 | ||
#define STLINK_DEV_UNKNOWN_MODE -1 | ||
|
||
// jtag mode cmds | ||
#define STLINK_DEBUG_ENTER 0x20 | ||
#define STLINK_DEBUG_EXIT 0x21 | ||
#define STLINK_DEBUG_READCOREID 0x22 | ||
#define STLINK_DEBUG_GETSTATUS 0x01 | ||
#define STLINK_DEBUG_FORCEDEBUG 0x02 | ||
#define STLINK_DEBUG_RESETSYS 0x03 | ||
#define STLINK_DEBUG_READALLREGS 0x04 | ||
#define STLINK_DEBUG_READREG 0x05 | ||
#define STLINK_DEBUG_WRITEREG 0x06 | ||
#define STLINK_DEBUG_READMEM_32BIT 0x07 | ||
#define STLINK_DEBUG_WRITEMEM_32BIT 0x08 | ||
#define STLINK_DEBUG_RUNCORE 0x09 | ||
#define STLINK_DEBUG_STEPCORE 0x0a | ||
#define STLINK_DEBUG_SETFP 0x0b | ||
#define STLINK_DEBUG_WRITEMEM_8BIT 0x0d | ||
#define STLINK_DEBUG_CLEARFP 0x0e | ||
#define STLINK_DEBUG_WRITEDEBUGREG 0x0f | ||
#define STLINK_DEBUG_ENTER_SWD 0xa3 | ||
#define STLINK_DEBUG_ENTER_JTAG 0x00 | ||
|
||
#endif /* STLINK_HW_H_INCLUDED */ |