Commit Graph

1884 Commits

Author SHA1 Message Date
Uwe Bonnes f9d343af3e cmsis: AP reads are posted. Read from RDBUFF. 2021-10-31 12:55:41 +01:00
Uwe Bonnes d4ae308f9f cmsis: implement srst_set_val() 2021-10-31 12:55:41 +01:00
Uwe Bonnes 166eb3ee3e cmsis_dap: Always transfer 65 bytes with hid_read|write()
CMSIS-DAP Dragonprobe works on some devices. E.g. it does not work
on NUCLEO-F103
2021-10-31 12:55:41 +01:00
Uwe Bonnes b343ebe06f cmsis-dap/linux: Link against libhidapi-hidraw
libhidapi-libusb detaches a kernel module but does not reattach again.
This may wrack interaction with other programs using hidapi.
2021-10-31 12:55:41 +01:00
Uwe Bonnes d144f9d54b adiv5: CMSIS DAP transactions are slow but work in principle
Slowness results in strange STM32F767 DHCSR implementation to nearly never
halt in the given 2 second period when F767 is sleeping most of the time.
2021-10-31 12:55:41 +01:00
Uwe Bonnes 761e0230d4 cmsis-dap: Print messages when transfers fail.
Expect signal integrity errors when using jumper cables. Often probes switch
the SWJ GPIO with highest speed, resulting in possible reflections. Additional
ground wires may help. If there is isolation between probe and targets,
additional ground wires are a must or ground shift will wrack the transfer!
2021-10-31 12:55:41 +01:00
Uwe Bonnes 39fbffd3d2 stlinkv2: Fix low access to AP registers. 2021-10-31 12:55:41 +01:00
Uwe Bonnes c13778139f adiv5/hosted: Export the BMP_TYPE in DP. 2021-10-31 12:55:41 +01:00
Uwe Bonnes b7e7aa3f9a adiv5: Either use only LL functions in cortexm_initial_halt or no LL at all.
Platform implementation may disturb ADIV5_AP_DRW and so low_read DHCSR may
give values other from registers
2021-10-31 12:55:41 +01:00
Uwe Bonnes 485105221e dap: Always work on a copy of the buffer when calling dbg_dap_cmd() in a loop
A better solution would use seperate buffers for dbg_dap_cmd. But as WAIT is
already handled in DAP, cahnces are low that loop re-entry is needed.
2021-10-31 12:55:41 +01:00
Uwe Bonnes 397fbd5749 cmsis: Only cmsis internal use must differentiate between HID and Bulk access
Missing DAP_SWD_SEQUENCE may eventually need a distinction visible from
outside later.
2021-10-31 12:55:41 +01:00
Uwe Bonnes 7b1eb6e6e3 bmp_libusb: reset type on every device. 2021-10-31 12:53:47 +01:00
Uwe Bonnes 80064c18a9 bmp_libusb: Fix CMSIS-DAP related memory leak. 2021-10-31 11:13:34 +01:00
Uwe Bonnes 8845a22226 stm32l4: Use targetid when available.
Fixes STM32U5 from crashing.
2021-10-31 11:13:34 +01:00
Uwe Bonnes c4b6b42dcf stlinkv2: Read targetid on DPv2 devices. 2021-10-31 11:13:34 +01:00
Uwe Bonnes 5dafc0828c SWD: Remove excessive line resets. 2021-10-31 11:12:46 +01:00
Uwe Bonnes e7e1bfdb53 mpsse: Fix using 60 MHz clock on fast devices. 2021-10-30 13:55:57 +02:00
Uwe Bonnes 99a5fdb6f8 bmp_remote: Better error propagation.
Negative values from platform_buffer_read are errors too!
2021-10-30 13:55:57 +02:00
Uwe Bonnes f4117aa1b4 cdcacm: Use the USB strings. 2021-10-30 13:55:57 +02:00
Uwe Bonnes f28f05952f stlink: Add another STLINK-V3 ID. 2021-10-30 13:55:57 +02:00
SG 7307f086c6
Support for STM32WB55 (#942)
* add STM32WB55 support
2021-10-30 13:01:06 +02:00
Uwe Bonnes e1a928beb1 Fixes to compile with gcc11 #925
Target code changes are pure for formal correctness and not tested!
2021-10-10 15:59:57 +02:00
UweBonnes 28623e6b27
Merge pull request #939 from fabalthazar/hosted-return-val
Consistent return value and output of hosted blackmagic + HOSTED_BMP_ONLY=0 on Linux
2021-10-10 12:54:48 +02:00
fabalthazar e2d3161442 Removed -S message as debugger selection option since it is used for reading bytes 2021-10-09 21:38:48 +02:00
fabalthazar 59282b6f66 Fixed typography 2021-10-09 21:18:52 +02:00
fabalthazar 7274f55ff4 Fixed return value of hosted blackmagic in erase mode 2021-10-09 21:17:58 +02:00
fabalthazar 3f54fba986 HOSTED_BMP_ONLY=0 by default on Linux.
The user is warned about missing dependencies.
2021-10-09 21:14:52 +02:00
Vegard Storheil Eriksen 7ccbdd98c0 hosted/dap: Copy command buffer in wait/retry loop.
The same buffer is used for both command and response, causing part of
the command to be overwritten before it’s retried. Solve this by saving
and restoring a copy of the command before retrying.
2021-10-05 23:21:07 +02:00
Jeff Lutgen f69f29a660 f4discovery/blackpill: fix usbusart 2021-10-01 00:10:03 +02:00
Uwe Bonnes b076d5cea1 stm32f1: Check if unlock failed and propagate error. 2021-09-22 21:41:43 +02:00
Uwe Bonnes 554e34517e Better reporting when monitor command fails. 2021-09-22 21:41:43 +02:00
Uwe Bonnes 9e98cfa220 adiv5: Remove leftover debug output. 2021-09-22 21:41:43 +02:00
Thiadmer Riemersma 64f756d627 Test voltage on VREF before enabling target power (mon tpwr), to avoid potential power conflict. 2021-09-22 20:45:18 +02:00
Uwe Bonnes 356325f563 ftdi_bmp: Fix bit select. 2021-09-22 15:16:20 +02:00
Uwe Bonnes 79066c950f bmp_libusb: Remove duplicated libusb_init.
Thanks to Red Liu for noticing
2021-09-22 15:16:20 +02:00
Uwe Bonnes 9ebc44bcea Make more functions static. 2021-09-22 15:16:20 +02:00
Uwe Bonnes db1f13db25 remote: Packets may be larger than 256 bytes. 2021-09-22 15:16:20 +02:00
Uwe Bonnes 88cce08ce4 hosted: Fix "monitor version" 2021-09-22 15:16:20 +02:00
Uwe Bonnes da15cc3cb7 remote_jtagtap: Fix memory corruption in jtagtap_tdi_tdo_seq 2021-09-22 15:16:20 +02:00
Uwe Bonnes a93e57e112 ftdi: Fixed wrong direction report in DEBUG. 2021-09-22 15:16:20 +02:00
Uwe Bonnes 9de69bb3ab Adiv5/Initial halt: More fixes for dd28fa5743. #925
Stlink does not like low level access and aborts with STLINK_SWD_DP_ERROR.
Either our implementation still has faults or stlink can not handle

MINDP devices with BMP/Firmware also seemm not to like low level access,
either du to some hidden error in BMP or by design
2021-09-22 15:16:20 +02:00
Uwe Bonnes a9854e9b37 adiv5: Fix the MINDP case introduced with dd28fa5743 #925 2021-09-16 12:39:26 +02:00
Andy Makovec 01583560cd hosted: Update Readme.md to use HOSTED_BMP_ONLY 2021-09-16 11:02:31 +02:00
dpc f66caa0d29 add some more nxp s32k14x variants
the sdid bits correspond to s32k14x as well as s32k11x but i only have
access to the k14x variants so didn't bother w/ the k11x variants.
the memory/flash sizes also can come from the sdid bits, but the
splits still need to come from a lookup.
2021-09-13 23:01:05 +02:00
dpc 95288bcf75 fix a size format warning 2021-09-13 23:01:05 +02:00
Uwe Bonnes e58b7d623b crc32: Abort generic_crc32 with error from target_mem_read
Use larger chunks for hosted to speed up. Send pure NULL as line keep-alive.
2021-09-07 10:57:17 +02:00
Uwe Bonnes ff79108f66 cl_utils: Increase worksize for increased speed.
H743 reads 2 MB in ~23 vs 27 seconds
2021-09-07 10:57:17 +02:00
Uwe Bonnes a76a559656 pc/platform_delay: Wait ms and not us! 2021-09-07 10:57:17 +02:00
Uwe Bonnes dd28fa5743 adiv5: Tighten up loop to initial halt cortexm
Use TRNCNT when available.

Now the F767 with the NutOS 300 ms sleep example  with the one ms tick is
halted even in hosted after few ms.
2021-09-04 21:15:07 +02:00
Uwe Bonnes a297c8c8ad hosted/Makefile.inc: Use gcc to build hosted, if not advised otherwise 2021-09-04 21:15:07 +02:00