71 Commits

Author SHA1 Message Date
Jason Kotzin
9ec6693e4d Merge commit '2a0d608b07487300a63908baa62e73a51a11e811' into sam-update 2022-08-10 20:14:55 -07:00
Jason Kotzin
cb1ef7d616 Merge commit '1330288271bea7b6224bac5bc8e1438305eec44a' into sam-update 2022-08-10 20:09:58 -07:00
Jason Kotzin
c1e34792f4 Merge commit '04d1c9805b80b50b4f1cd33b08503b73e80c0ed3' into sam-update 2022-08-10 20:06:04 -07:00
Jason Kotzin
78837173a4 Merge commit 'e6a9a1a3665e83e25d5d4077a33aa5b0110646b8' into sam-update
# Conflicts:
#	.gitignore
2022-08-10 19:48:21 -07:00
Jason Kotzin
9da2d298c3 Merge commit '1ca9f234f7527396da91bfc1f98cb05c305c6472' into sam-update 2022-08-10 19:30:49 -07:00
Jason Kotzin
336797363b Merge commit '98b4ec58bc566591943c9123dd4ca0c8dcfd521e' into sam-update
# Conflicts:
#	libopencm3
2022-08-10 19:08:25 -07:00
Jason Kotzin
c73329f7d4 Merge commit '59dc1b7eb4f3a0fda23d2c8624c3ecd26515fec8' into sam-update
# Conflicts:
#	src/platforms/common/cdcacm.c
2022-08-10 18:33:59 -07:00
Jason Kotzin
b87091a59b Merge commit 'dc8924a2bc0110287c1b289002efb52926daccb0' into sam-update
# Conflicts:
#	README.md
2022-08-10 18:24:25 -07:00
Jason Kotzin
50b9a4ceb6 Merge commit '77231e8972fa22cb233354ba5aed694dff4a9e24' into sam-update 2022-08-10 17:40:26 -07:00
Jason Kotzin
93cf62d944 Merge commit '8289862b55e2a0dc658c3c7e2f6ab9878d0527fa' into sam-update
# Conflicts:
#	README.md
#	src/platforms/common/cdcacm.c
2022-08-10 17:40:24 -07:00
Jason Kotzin
65c95fb413 Merge commit 'f5e305e237aba0ab8bf2f42e75505ef468f47d82' into sam-update
# Conflicts:
#	README.md
2022-08-10 17:36:47 -07:00
Jason Kotzin
9b145c8398 compatibility to upstream 2022-08-10 17:27:05 -07:00
Jason Kotzin
53c6821734 Merge commit '9969c984f3ca67f38677b061e2f91a1fb50cd310' into sam-update 2022-08-10 15:57:56 -07:00
Jason Kotzin
8a37449f8a Merge commit 'e34a27f72c9689850e97df74c499538d7f18518d' into sam-update
# Conflicts:
#	src/include/swdptap.h
#	src/platforms/common/swdptap.c
2022-08-10 15:57:29 -07:00
Jason Kotzin
fd6610bdae samd fix USB max packet size 2022-08-09 17:31:30 -07:00
Jason Kotzin
19e01abf70 Merge commit '16967b43288028dcdc2759bb2a25a53472571162' into sam-update 2022-08-09 17:25:16 -07:00
Jason Kotzin
a89b2ead47 Merge commit '541861e978ba88c80e7e2a0cbcd7ce55d574c97b' into sam-update
# Conflicts:
#	README.md
2022-08-09 17:23:48 -07:00
Jason Kotzin
41449370b4 Merge commit 'd63e870e82ecbd73af2d14e6794d2985cb9bd0ad' into sam-update 2022-08-09 17:13:06 -07:00
Jason Kotzin
fdce017311 Merge commit 'f89542c79f6edb0d64e7dfa483501718113f45b5' into sam-update 2022-08-02 09:28:24 -07:00
Jason Kotzin
81bb75bba6 Merge commit '443ced62d4e47d73da13746a836369d8421b4fe8' into sam-update
# Conflicts:
#	libopencm3
2022-08-02 01:23:28 -07:00
Jason Kotzin
16261813ca Merge commit 'e29f2b4fb95601291afced3af3731385be343988' into sam-update
# Conflicts:
#	.gitignore
#	src/include/swdptap.h
#	src/target/swdptap_generic.c
2022-08-01 21:45:01 -07:00
Jason Kotzin
a42fc8904d Merge commit 'e54a826745ae298a4eb555f3d76dfcdd571211b9' into sam-update
# Conflicts:
#	src/platforms/common/swdptap.c
2022-08-01 19:52:55 -07:00
Jason Kotzin
da701aff6d Merge commit '455e0a74d2a77f2ae1f0acf53b778e41b890523e' into sam-update 2022-08-01 18:56:50 -07:00
Jason Kotzin
2931169dd1 Merge commit '0c659f49cd03c7154bfb92c621df523aa8540f72' into sam-update 2022-08-01 18:52:34 -07:00
Jason Kotzin
44b5eed7ca Merge commit '261be9864c8ce77c857a996784ac65ed3203b03a' into sam-update 2022-08-01 18:31:34 -07:00
Uwe Bonnes
e4421799ba More header cleanup 2021-05-15 12:54:51 +02:00
Uwe Bonnes
1330288271 firmware: Unify serial number handling
Use one file in dfu and server
For STM32, provide 3 ways to handle
- BMP way (8 bytes)
- DFU way (12 Bytes)
- Full unique id (24 Bytes), as with STLINK(V3) Bootloader
2021-04-25 16:02:20 +02:00
Uwe Bonnes
04d1c9805b swd: Remove swd_proc and swdptap.h. 2021-04-21 21:50:04 +02:00
Martin
3b8502c2e5 add space in USB product string (be consistent with ../stm32/dfucore.c)
This changes the USB identification from
"Black Magic Probe(STLINK/V2) v..." to
"Black Magic Probe (STLINK/V2) v..."

Signed-off-by: Martin <Ho-Ro@users.noreply.github.com>
2021-01-29 14:47:28 +01:00
Martin
d4dc3b2717 The USB CDC is no modem and does not use the AT protocol
Signed-off-by: Martin <Ho-Ro@users.noreply.github.com>
2021-01-29 14:47:28 +01:00
Uwe Bonnes
1ca9f234f7 Infrastructure for setting maximum SWJ frequency.
Implement for BMP/firmware on STM32.
2020-12-12 18:33:09 +01:00
Uwe Bonnes
17dfec3572 dfu/cdcacm: Consolidate usage of ST vs BMP serial number. 2020-12-06 15:18:08 +01:00
Uwe Bonnes
07c3699225 version.h: Remove from platform.h files
- Consolidate ident string generation
- Recompile only needed files
2020-12-06 15:18:08 +01:00
David A. Aguirre Morales
a254bc6308 Fix icdi usb error https://github.com/blacksphere/blackmagic/issues/740 https://github.com/blacksphere/blackmagic/pull/748 2020-10-07 18:08:04 +02:00
Uwe Bonnes
9bba3165fb swdptap: Turnaround immediate after a reading with parity.
Thanks to JojoS.
Probably mostly cosmetic, but is keeps the device from driving SWDIO
until the next commands.
2020-10-02 10:51:14 +02:00
Uwe Bonnes
77231e8972 serial_no: Fix error with "mon trace" #732
launchpad-icdi: Allow to set a serial number with make
2020-09-20 13:23:52 +02:00
Uwe Bonnes
58281ec232 SWD Timing: Enhance SWD high time with low speed loss.
On F103 no high time < 80 ns and no low time < 100 ns was seen with a scope
2020-09-04 14:45:34 +02:00
Uwe Bonnes
52bfe538e3 cdcacm.c: Set bMaxPacketSize0 to 32 (#693, #697)
Smaller bMaxPacketSize0  resulted in delayed enumeration when BMP firmware
is started by the STLink bootloader.
2020-07-14 15:57:03 +02:00
Uwe Bonnes
9969c984f3 detour jtag primitives. 2020-06-05 14:59:30 +02:00
Uwe Bonnes
e34a27f72c Detour swd primitives. 2020-06-05 14:59:30 +02:00
Uwe Bonnes
4698a26bab common/swdptap: Slight speed increase and better setup time for write. 2020-06-05 14:59:30 +02:00
Stoyan Shopov
34a13723d8 Decrease the control USB pipe size on f103 blackmagic probes to 8 bytes
Rationale:
In USB device mode, the f103 chip provides 512 bytes
of memory for USB traffic. In the 'master' branch
of the blackmagic probe, the control endpoint pipe size
is set to 64 bytes, effectively consuming a quarter
(1 'in' endpoint, 1 'out' endpoint == 2 endpoints,
2 /* endpoints */ x 64 /* bytes per endpoint */ == 128 bytes
out of 512 /* bytes of precious usb packet memory */).
The USB standard, for full speed devices, does allow
a control endpoint size of 8 bytes.

I am not too aware of all the details of the USB standard,
but the USB standard seems to allow fragmented transactions
on the control USB pipe (endpoint 0), which libopencm3
apparently supports:
libopencm3/lib/usb/usb_control.c:usb_control_send_chunk()

I am using this change (from 64, to 8 bytes)
on a windows 10 machine, on an stlink hardware
('PROBE_HOST=stlink'). It works on my machine.

This change can potentially provide other USB endpoints
in the blackmagic firmware with more memory
2020-06-05 13:58:08 +02:00
Mark Rages
34c0d5a1c9 When timeout is 0, timeout_is_expired() should return immediately. 2020-06-05 12:33:24 +02:00
Koen De Vleeschauwer
541861e978 traceswo decoding 2020-05-16 15:04:35 +02:00
Vegard Storheil Eriksen
d63e870e82 cdcacm: Fix UART interface OUT endpoint MPS in descriptor.
3e3e450 reduced the buffer size for the UART interface OUT endpoint to
32B, but left wMaxPacketSize at 64B. This effectively configures the
hardware to receive packets up to 32B in size while telling the host it
can send larger packets. On reception of a larger packet, the usb core
treats it as an error, drops the packet and replies with a STALL
handshake.

This commit fixes the issue by updating the descriptor to match the
buffer configuration.

Fixes #538
2020-05-01 12:39:40 +02:00
Thiadmer Riemersma
1924aa4999 Make baudrate parameter of traceswo command mandatory for stlink/swlink, and superfluous on other platforms; change help message accordingly. 2019-11-19 20:20:13 +01:00
Brennan Ashton
443ced62d4 Target latest libopencm3
Required fixes:
 * use usbd_request_return_codes -- commit 54b117c5a5767df8dc114612dfd8e8cb88b72c6b
 * drop deprecated timer_reset() -- commit 034dbf20ff8c54dcbee5238390b37a0d35180f44
 * drop 48 & 120 MHz configs -- commit a9dde2832eb8039b9e0d21a50b9b991ddbfc4e2d
 * ld scripts: drop duplication of standard sections -- commit 9a05dcb6c0aef712052d337457838f6041ffd57a
2019-08-14 00:57:15 -07:00
Uwe Bonnes
e29f2b4fb9 jtag/swd: Rename defines/make variables to allow removal of weak attribute
jtagtap.c is libopencm3 generic. Move to common.
2019-07-18 20:54:10 +02:00
Jason Kotzin
d62d82bb2f M0 SWDIO 2x performance improvements 2018-07-10 16:18:05 -07:00
Jason Kotzin
f1ecd66283 Initial support for samd hardware and jeff ‘probe’ 2018-07-10 15:42:44 -07:00