Uwe Bonnes
a7efe7cc14
cl-utils: Display targets found.
...
+ other small changes in DEBUG output.
2020-03-10 17:34:30 +01:00
Uwe Bonnes
da5a0cd3f5
Infrastructure for command line interface to target
...
- Program, read and verify flash
- Test mode: Probe and attach to device and exit
2019-12-08 16:43:19 +01:00
Uwe Bonnes
ab396f9745
Allow %z specifier in windows builds. Supercedes #562 .
2019-12-08 16:43:19 +01:00
Uwe Bonnes
6d01c3c55b
stlinkv2: Propagate AP errors
...
Needed when reading some memory region of unknown size.
2019-12-08 16:43:19 +01:00
Uwe Bonnes
c6f43cf23f
Stlinkv2: Always call stlink_leave_state() first.
...
V2 devices after power on are in DFU mode. It is needed to leave DFU before
doing anything else.
2019-10-19 20:57:26 +02:00
Uwe Bonnes
12a2659671
pc-stlinkv2: StlinkV3 seems only to work with STM devices,
2019-09-29 16:48:42 +02:00
Uwe Bonnes
0599d2161c
pc-stlinkv2: Recognize another error and try to handle failing memread.
2019-09-29 16:48:31 +02:00
Uwe Bonnes
1d868bfffb
pc-stlinkv2: Detect stlink detach.
...
As libusb has no real async callback, we need to call libusb_handle_events()
in different places. While waiting for the gdb connection, we set the
socket to non-blocking and check additional for usb events in that loop. That
way, detach is also detected while waiting for connection. With debugger
attached, SET_IDLE_STATE ist missused for checking for usb events.
2019-09-01 12:19:14 +02:00
Uwe Bonnes
6f1cae9203
pc-stlinkv2: Wait for device attach.
2019-09-01 12:19:07 +02:00
Uwe Bonnes
d1ee827b4d
pc-stlinkv2: STLINK_SWD_DP_ERROR seem unrecoverable. Throw exception.
2019-08-31 11:20:17 +02:00
Uwe Bonnes
0d61106f90
pc-stlinkv2: Remove redundant read of CoreID.
2019-08-31 11:20:17 +02:00
Uwe Bonnes
a01109543e
pc-stlinkv2: Return failure if STLINK_DEBUG_APIV2_INIT_AP fails.
2019-08-31 11:20:17 +02:00
Uwe Bonnes
d994565f2e
pc-stlinkv2: Fix crash with serial given not matching connected devices.
2019-08-31 11:19:13 +02:00
Uwe Bonnes
5d59338de5
pc-stlinkv2: Try first to reset device if we read a strange version number.
2019-08-27 15:13:26 +02:00
Uwe Bonnes
44f471db53
pc-stlinkv2: READMEM_8BIT needs to read 2 bytes for 1 byte requested.
...
Fix as seen in openocd.
SYSROM_PIDR2 has only 3 bits for the JEP106 identity code field, bits [6:4].
2019-08-27 15:13:26 +02:00
Uwe Bonnes
6bf4fd3598
pc-stlinkv2: CPU register read and write must be done with the AP set.
...
FIXME: Writing CPU registers on M4 of STM32H745 seems not to work.
2019-08-27 15:13:15 +02:00
Uwe Bonnes
06078a8a98
stlinkv2.c: Ignore zero length memory transactions.
2019-07-28 16:28:18 +02:00
Uwe Bonnes
d92635b6a3
stlinkv2: Use stlink_usb_get_rw_status() where possible.
2019-07-28 16:27:52 +02:00
Uwe Bonnes
1b3acf3b8a
pc-stlinkv2: Print serial number of V20 devices readable.
2019-07-20 13:34:21 +02:00
Uwe Bonnes
067956266c
Adiv5: Remove weak attribute to ease windows compile.
2019-07-18 18:16:19 +02:00
Uwe Bonnes
b9249ca8a6
stlinkv2: Recognize V21_MSD, e.g. on STM32MP157C-DK2.
2019-07-17 17:38:21 +02:00
Uwe Bonnes
205fce20e5
stlinkv2: mem_[read|write] needs to honor AP.
2019-07-17 17:38:21 +02:00
Uwe Bonnes
82424b100b
stlinkv2: Require STLINK V3 Rev > 2 as revision 1 can not read TARGETID.
2019-07-17 17:38:21 +02:00
Uwe Bonnes
9b764534e6
stlinkv2: Recognize Stlink V3E
2019-07-17 17:38:21 +02:00
Uwe Bonnes
3388e48d92
stlinkv2: Do not loop endless when Read DP fails.
2019-07-17 17:38:21 +02:00
Uwe Bonnes
9ed26645d3
Add pc_stlinkv2 platform, running on host, talking to original StlinkV2/3.
...
Stlink firmware needs to be recent.
2019-07-17 17:38:01 +02:00