Rafael Silva
4f01ffe56c
misc: change return type of scan routines to size_t
2022-08-06 18:02:30 -04:00
Rafael Silva
3a673225b7
hosted/stlink: make swd scan function more consisted with other probes
...
Signed-off-by: Rafael Silva <perigoso@riseup.net>
2022-08-06 18:02:30 -04:00
Rafael Silva
ce6477886f
target/adi: unify DPIDR TARGETID handling in adiv5_dp_init
...
this makes the assumption that DPs will be v1 or higher, for SWD-DP scans this is
guaranteed, but on JTAG-SCANS it may not be true, DPv0 does not have DPIDR
implemented and reads are UNPREDICTABLE
Signed-off-by: Rafael Silva <perigoso@riseup.net>
2022-08-06 18:02:30 -04:00
Rafael Silva
f435bd2136
target/adi: rework handling of TARGETID
...
add missing fetching of targetid in jlink probes
clarify how targetid is being read
handle idcode as debug_port_id
use targetid when available to identify device in probe routine
2022-07-31 12:09:07 +01:00
Rafael Silva
58025feec2
target/adi: rename missleading idcode variable
2022-07-31 11:16:36 +01:00
dragonmux
181e84cb0c
jtag_scan: Adjusted the parameter and result types for jtag_scan(), jtag_add_device(), and related functions
2022-07-30 18:00:08 -07:00
Rafael Silva
013b2dee60
target/adiv5: further cleanup
2022-07-25 18:28:57 +01:00
dragonmux
c33d02bc19
hosted/stlink: Improved the information output and its consistency
2022-06-26 16:51:58 -07:00
dragonmux
2765811bbb
hosted/stlink: Naming consistency for 'stlink' global object
2022-06-26 16:51:58 -07:00
dragonmux
66b2d0659a
hosted: type naming consistency
2022-06-26 16:51:58 -07:00
dragonmux
2eaa579965
platforms: NRST and TRST naming consistency
...
This aligns the nRST and nTRST pin naming with the bulk of the README's for the platforms along with the hardware
2022-06-26 16:51:58 -07:00
dragonmux
a8e12d716d
misc: Renamed platform_nrst_{get,set}_val to clarify naming and provide consistency
2022-06-26 16:51:58 -07:00
Uwe Bonnes
1009329882
stlinkv2: Treat STLINK_SWD_AP_FAULT after STLINK_ERROR_WAIT as STLINK_ERROR_WAIT
...
cortexm_initial_halt() repeats the DHCSR write with high values for TRNCNT in
CSW. This is needed to catch a STM32F7 mostly in WFI. While the repeated write
is running, STLINKV3 on a Nucleo-WL55 (V3J7M2B0S0) answers first with
STLINK_SWD_AP_WAIT and on more read if write command is still running with
STLINK_SWD_AP_FAULT. At some point when the last command is finished, normal
STLINK_ERROR_OK indicates finally successful read. Treat STLINK_SWD_AP_FAULT
after STLINK_ERROR_WAIT as STLINK_ERROR_WAIT in that case. STLINK_SWD_AP_FAULT
may still be issued on other invalid accesses and should still be treated as
error in the other possible cases. Fixes #1071 .
2022-06-26 12:08:23 -04:00
SId Price
b1a02d4f48
Correct filenames in the rest of the files using cl_utils.h
2022-06-26 12:04:21 -04:00
dragonmux
c4869a5473
hosted/stlinkv2: Cleaned up the new error messages as they weren't outputting nicely
2022-04-16 18:22:14 -04:00
dragonmux
ba8ed132a8
hosted/stlinkv2: Fix !found causing hosted to continue on anyway, and improved the error reporting from the device finder loop
2022-04-16 18:22:14 -04:00
dragonmux
4287f1ba0e
hosted/stlinkv2: Rewrote the serial number readering logic to not violate the USB spec and properly handle libusb errors
2022-04-16 18:22:14 -04:00
dragonmux
d1c9d94174
jtag_scan: Remove the now redundant IDCode parameter from the handlers
2022-03-14 21:37:44 -07:00
dragonmux
7d2afcff06
Revert "jtag: Make jtag_devs argument to jtag_handler."
...
This reverts commit 6308506276
.
2022-03-14 21:37:44 -07:00
Uwe Bonnes
39fbffd3d2
stlinkv2: Fix low access to AP registers.
2021-10-31 12:55:41 +01:00
Uwe Bonnes
c4b6b42dcf
stlinkv2: Read targetid on DPv2 devices.
2021-10-31 11:13:34 +01:00
Uwe Bonnes
f28f05952f
stlink: Add another STLINK-V3 ID.
2021-10-30 13:55:57 +02:00
Uwe Bonnes
6308506276
jtag: Make jtag_devs argument to jtag_handler.
2021-08-15 16:43:29 +02:00
Uwe Bonnes
f98b7274b4
hosted/stlinkv3: Detect STlinkV3 in bootloader mode.
2021-04-25 16:02:20 +02:00
Uwe Bonnes
fdc654cfb3
stlink: Implementation of frequency setting.
2020-12-12 18:33:09 +01:00
Uwe Bonnes
32db38ecf2
hosted/libusb: Move platform.c libusb related functions to own file.
2020-12-11 17:35:43 +01:00
Uwe Bonnes
e6823f39de
Hosted: Print version with "-h" and "-t" option.
2020-11-27 22:26:48 +01:00
Uwe Bonnes
26a23dd1cb
stlinkv2: Try harder to open an AP.
...
Problem seen on STM32L0 with probably long sleep periods.
2020-11-27 22:26:48 +01:00
Uwe Bonnes
3d92b82678
jtag: Use index and not device structure for jtag_dev_write_ir and jtag_dev_shift_dr
2020-10-16 20:03:03 +02:00
Uwe Bonnes
7ccf0d3e03
jtag_dev_t: Make dev, idcode and desc less generic.
...
No codechange intended.
2020-10-16 20:03:03 +02:00
Uwe Bonnes
dd74ec8e6f
stlinkv2: Detect fail mem_read on jtag too.
2020-08-05 16:20:52 +02:00
Uwe Bonnes
71e5b4d3cb
hosted/stlinkv2.c: Fix bug introduced with #703
2020-07-29 13:42:07 +02:00
Uwe Bonnes
72387164eb
hosted/stlinkv2.c: Handle AP_WAIT error when switching to SWD
2020-07-29 12:22:18 +02:00
Uwe Bonnes
a392480631
hosted/stlinkv2.c: Use V2 API to read coreid.
2020-07-29 12:22:18 +02:00
Aled Cuda
a673efc26b
Remove extra definitions of jtag structures in the STLink hosted setup to support "gcc (GCC) 10.1.0" on Archlinux
2020-07-12 23:14:19 +02:00
Uwe Bonnes
dc3fd2eb06
Classify debug messages
...
Firmware BMP with ENABLE_DEBUG=1 will print WARN and INFO as before.
PC-Hosted BMPwill alway print to stderr. Warn is printed unconditional,
INFO, GDB, TARGET, DONGLE and WIRE will print if their appropriate bit in
cl_debuglevel is set via the -v verbose command line argument.
INFO will go to stdout with -t or -l.
2020-06-05 14:59:30 +02:00
Uwe Bonnes
64f3dff8a8
PC-Hosted: Better debug output.
2020-06-05 14:59:30 +02:00
Uwe Bonnes
4ba6afed28
Add jlink pc-hosted platform.
2020-06-05 14:59:30 +02:00
Uwe Bonnes
13c3c934d2
Hosted: Add Stlink, remove old pc-stlinkv2 platform
2020-06-05 14:59:30 +02:00
Uwe Bonnes
52739def01
Copy relevant stlink files.
2020-06-05 14:59:30 +02:00