Commit Graph

37 Commits

Author SHA1 Message Date
marble
cfbf3b2d93 cdc_uart: add RTS and DTR pins picoprobe-cmsis-v1.0.2-rts-dtr 2023-04-03 16:15:17 +02:00
Jonathan Bell
156a33fa01 freeRTOS: shrink heap by half
A 128K reservation on a device with 256K of RAM is a bit demanding.
Shrink to fix a link error in a DebugRel build.
picoprobe-cmsis-v1.02
2023-02-27 14:06:22 +00:00
P33M
3bd58697e6 Merge pull request #69 from raspberrypi/enable_e15_fix
Default TUD_OPT_RP2040_USB_DEVICE_UFRAME_FIX=1
2023-02-22 15:52:36 +00:00
graham sanderson
599ee88582 Default TUD_OPT_RP2040_USB_DEVICE_UFRAME_FIX=1 2023-02-21 16:44:15 -06:00
Jonathan Bell
42d1ff28c8 Fix vendor interface semantics for tinyUSB >= 0.13
Explicit flushing of writes is now required.
2023-01-06 11:48:55 +00:00
P33M
fd445fd8c1 Merge pull request #13 from lurch/patch-1
Use latest upstream version of pico_sdk_import.cmake
2022-11-24 13:34:13 +00:00
Andrew Scheller
3e367acf66 Use latest upstream version of pico_sdk_import.cmake 2022-11-24 12:01:57 +00:00
Jonathan Bell
b1799bf45d usb: start using bcdDevice as a version number picoprobe-cmsis-v1.0.1 2022-11-11 16:08:52 +00:00
Jonathan Bell
e5fef459ef probe: check whether we need to actually load or remove probe SMs
Calling DAP_Connect multiple times without calls to DAP_Disconnect would
cause a panic.
2022-11-11 13:35:34 +00:00
P33M
13f18e2fde Merge pull request #31 from P33M/picodebug
Add a CMSIS compatible implementation for picoprobe
picoprobe-cmsis-v1.0
2022-11-09 13:30:08 +00:00
Jonathan Bell
f4fe468c85 Add CMSIS-DAP to the product string so OpenOCD udev rules are applied
Allows plugdev users to access picoprobe.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
2022-08-25 15:58:28 +01:00
Jonathan Bell
8737a06202 probe: resolve a bug in init/deinit handling
OpenOCD is fond of calling PORT_OFF and PORT_SWD_SETUP frequently, which
played havoc with caching both adapter khz and the DAP delay.

Revert to caching just the DAP delay and reset it when PORT_OFF is called.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
2022-08-18 16:01:40 +01:00
Jonathan Bell
e698ea5d5c Convert to threaded operation by default
Rather than polling each interface in turn, execute the interface
handling periodically.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
2022-08-18 16:01:40 +01:00
Jonathan Bell
687ba956f4 Add FreeRTOS (RP2040 port) to the build
Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
2022-08-18 16:01:40 +01:00
Jonathan Bell
47e2043564 probe: performance enhancements
- Run out of SRAM, it goes quite a lot faster
- Cache the DAP clock frequency
- Read RDATA and write WDATA all in one go, and merge the turnaround
  into the ACK phase. Reduces the number of missed PIO SM cycles during an
  SWD transfer

Also fix a compiler warning and demote the loglevel of some debug messages.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
2022-08-18 16:00:28 +01:00
Jonathan Bell
866f702af3 Add FreeRTOS as a submodule
Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
2022-08-18 16:00:28 +01:00
Jonathan Bell
372072a706 probe: default to CMSIS-DAP v2
Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
2022-08-18 16:00:28 +01:00
Jonathan Bell
9ef03bc3c8 CMSIS: revert to v5.7.0 for v2.0.0 of DAP firmware
Maintain compatibility with downstream openocd.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
2022-08-18 16:00:28 +01:00
Jonathan Bell
aabe217a68 probe: add missing data-phase recovery in ACK WAIT or FAULT states
Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
2022-08-18 16:00:28 +01:00
Jonathan Bell
ee4d575bf7 probe: allow for selection of CMSIS-DAP v1 and v2 protocols
CMSIS-DAP v1 is a pseudo-HID device which allows "driver-less" use on
Windows. DAP v2 is a vendor-specific bulk protocol, so there needs to be
a companion MS OS 2.0 descriptor for the debug interface with
DeviceInterfaceGUID set to the Keil GUID.

Allow for selection between these and the openocd protocol at compile time.

Parts of the v1 implementation are derived from the DapperMime project, so
add credit where due.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
2022-08-18 16:00:28 +01:00
Jonathan Bell
592b8da71a probe: add CMSIS-DAP PIO-driven implementation
CMSIS-DAP implementations explicitly use CPU bitbash to control SWD and
SWDIO, but we can do better. Transfers are handed off to PIO in phases,
which gets us deterministic clock timing as well as freeing the CPU up
for other tasks.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
2022-08-18 16:00:28 +01:00
Jonathan Bell
02b31998d5 probe: fix SWDIO line idle state and export low-level functions
Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
2022-08-18 16:00:28 +01:00
Jonathan Bell
908bfbd4fb Add CMSIS DAP files to the build (they do nothing yet)
Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
2022-08-18 16:00:28 +01:00
Jonathan Bell
97b99879e3 Add CMSIS as a submodule at 5.9.0
Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
2022-08-18 16:00:28 +01:00
Jonathan Bell
33ed0e78dc cdc_uart: performance improvements
This commit fixes a few deadlock scenarios and makes cdc_task more
amenable to being called in a threadable context. Full-duplex is now
reliable at fast and slow baudrates.

There is still an annoyance where if the CDC interface is deactivated
while the UART RX is still active, buffers queued to the endpoint
hardware aren't flushed. This is a tinyUSB interface bug.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
2022-08-18 16:00:28 +01:00
Liam Fraser
fcb1faba10 Create README.md
Add basic readme
2022-07-22 11:19:40 +01:00
Liam Fraser
3f8b2ce16f Add usb device enumeration fix 2022-07-22 10:35:01 +01:00
graham sanderson
164eaa5b80 add pico.h to fix build 2021-06-03 15:18:41 -05:00
newbrain
0ff8b5530b Hardware target reset support 2021-02-23 15:45:12 +00:00
Liam Fraser
218bd5f50a Add MIT license to all source files 2021-02-03 09:29:20 +00:00
Liam Fraser
67f5af124a Disable all debug output so any uart can be used 2021-02-03 09:25:45 +00:00
Liam Fraser
49a80059b8 Fix file permissions 2021-02-03 09:24:46 +00:00
Liam Fraser
4bcaaa915d Add missing #endif 2021-02-03 09:23:04 +00:00
Andrew Scheller
c29510f567 Move selection of UART interface and baudrate to picoprobe_config.h (#7)
Co-authored-by: Liam Fraser <liam@raspberrypi.com>
2021-02-03 09:22:09 +00:00
newbrain
0fe6a09d8b Unique serial numbers for picoprobe (#8)
Co-authored-by: newbrain <newbrain@tiscali.it>
Co-authored-by: Liam Fraser <liam@raspberrypi.com>
2021-02-03 09:19:04 +00:00
a-pushkin
8ab7ebcabe Leverage built in LED (#6)
* turn on LED on startup and blink for frequent activity
2021-02-03 09:14:55 +00:00
graham sanderson
f67a57d2ba Initial Release 2021-01-20 17:47:12 +00:00