131 Commits

Author SHA1 Message Date
martamomotko
4eb7210dc6 autobaud: Fix baud_changed undefined reference (#190) 2026-01-07 10:45:02 +00:00
tanxiao
cc88575eee add version string to binary info 2025-11-24 14:36:57 +00:00
Andrew Scheller
d1cd91160d README tweaks 2025-11-24 14:35:38 +00:00
redfast00
e32201f160 Enable reset pin functionality by default on Pi Pico
This was disabled in commit 0761424
2025-11-24 14:32:30 +00:00
P33M
de253cae6a Update README.md
RTT is well-supported in openOCD.
2025-11-17 13:16:32 +00:00
martamomotko
caeb38ca04 README: Add AutoBaud instructions 2025-11-14 11:44:48 +00:00
martamomotko
73b65009df cdc_uart: start AutoBaud on magic baud and set detected baud rate 2025-11-14 11:36:57 +00:00
martamomotko
d8543b2143 main: add AutoBaud task handling 2025-11-14 11:36:57 +00:00
martamomotko
457e048dff FreeRTOS: configure SMP support for AutoBaud 2025-11-14 11:36:57 +00:00
martamomotko
2e61c95048 CMakeLists.txt: add AutoBaud sources and dependencies 2025-11-14 11:36:57 +00:00
martamomotko
6cdaac7ee4 Introduce AutoBaud mode to detect and set the UART baud rate from incoming data. 2025-11-14 11:24:40 +00:00
martamomotko
4ec1b76017 Update Pico 2 build instructions 2025-09-03 11:18:10 +01:00
Jonathan Bell
466432c5eb Debugprobe release v2.2.3 debugprobe-v2.2.3 2025-07-07 15:00:38 +01:00
Jonathan Bell
9f44aa79cb submodules: delete CMSIS_5 from the repository
See https://github.com/raspberrypi/pico-setup/issues/57

Clones of debugprobe or invocations of pico-setup.sh frequently
encounter errors relating to bandwidth budgets. These sporadic errors
are due to the large size of the CMSIS_5 repo clone exhausting the
bandwidth quotas on Github, so drop this in favour of a downstream copy
of the relevant CMSIS-DAP firmware files.

Users are advised to delete and regenerate the build directory.

Optionally, reclaim filesystem space by removing .git/modules/CMSIS_5
and all subdirectories.
2025-07-07 14:52:52 +01:00
Jonathan Bell
c8d5b552b6 CMakelists.txt: use downstream copies of CMSIS_5 files
This change will require re-running cmake in the build directory.
2025-07-07 14:52:52 +01:00
Jonathan Bell
d91503b68c Add downstream copies of CMSIS_5 files relevant to CMSIS-DAP firmware
From tag v2.0.0. Not used in the project yet.
2025-07-07 14:52:52 +01:00
Jonathan Bell
61eae8217c Remove spurious file 2025-05-14 14:50:22 +01:00
Jonathan Bell
aa17d6d982 probe: correct SWCLK calculations
Use the actual clk_sys frequency and Round divisors up, otherwise high
swclk speeds get significantly overclocked.
2025-05-14 14:16:56 +01:00
graham sanderson
a7b796d5e6 Revert "Fix variable pathname spacing"
This reverts commit 1abda4c329.
2025-05-14 13:15:45 +01:00
P33M
3a356ea346 Update README.md 2025-03-27 15:53:56 +00:00
Jonathan Bell
c70815a297 Debugprobe release v2.2.2
Point release to address high uart TX baud rate corruption, at the
expense of throughput.

Also skip over an attempt at UART/SDK optimisation that caused issues
for users.
2025-03-13 16:36:24 +00:00
Jonathan Bell
f601757084 Revert "cdc_uart: performance optimisations"
This reverts commit 83e28db1d3.
2025-03-13 11:11:27 +00:00
TankedThomas
1abda4c329 Fix variable pathname spacing
Signed-off-by: TankedThomas <TankedThomas@users.noreply.github.com>
2025-03-11 09:50:23 +00:00
Jonathan Bell
83e28db1d3 cdc_uart: performance optimisations
For RX, do burst reads without the SDK wrapper function which checks
the FIFO flags for each read.

For TX, avoid waiting for the FIFO to have space available, which
causes significant thread stalls. Use a slightly pessimistic estimate
of the number of bytes the TX FIFO should consume and only write up to
that number.

Also, there's no point tracking whether or not the scheduler parked the
thread in a call to xTaskDelayUntil - missing a scheduler tick can't be
recovered from.
2025-01-17 15:14:06 +00:00
Jonathan Bell
3d58384754 cdc_uart: work around suspected TinyUSB FIFO bug
UART TX corruption has been observed at high baud rates. It seems to be
related to thread preemption when a buffer is pushed to the CDC FIFO
while another task is reading/updating FIFO pointers.

If set to 1x wMaxPacket bytes, the FIFO push only occurs when it is
completely empty. This avoids the bug at the cost of some amount of
throughput, usually 1-2 USB packet times plus inter-packet delay.
2025-01-17 15:03:02 +00:00
Jonathan Bell
818ed79f4b Fixes for #160 and #159 2025-01-09 16:34:30 +00:00
Jonathan Bell
53875ec320 Debugprobe release v2.2.1
This release is a point release because unknown/stale submodule(s)
caused a regression with long UART TX strings that subsequently could
not be reproduced.

The build artifacts for this release were compiled on a Raspberry Pi 5
running Raspberry Pi OS (Debian 12) instead of Ubuntu 22.04 on amd64.
debugprobe-v2.2.1
2025-01-09 14:49:12 +00:00
Jonathan Bell
9226fac61a Debugprobe release v2.2.0 debugprobe-v2.2.0 2024-12-03 13:16:13 +00:00
Jonathan Bell
06c7792560 main: kludge for Pi 5 reboot crashes
The Pi 5 bootloader will leave devices it doesn't care about in the
Addressed state, so tud_mount_cb never gets called. Handoff from the
bootloader to Linux causes a suspend event followed by Reset.

Check if the interface association was configured on entry to Suspend or
Resume. Also, TinyUSB doesn't expose Bus Reset events for whatever
reason, so there's nothing that tears down the interface threads.
2024-12-03 11:48:25 +00:00
Jonathan Bell
1752f2a61b CMmakeLists.txt: add pico2 variant target naming 2024-11-29 10:02:49 +00:00
Jonathan Bell
e887004fdf Debugprobe release v2.1.0 debugprobe-v2.1.0 2024-11-27 15:48:41 +00:00
Jonathan Bell
df68d70400 Fix PORT_SWD/PORT_OFF mismatch - do GPIO setup in each 2024-11-27 15:48:41 +00:00
Jonathan Bell
0c84dd0dc1 FreeRTOS: use upstream port again, RP2350 support has landed
But the RP2350 kernel import is broken, use copy from pico-examples 2.1.0
2024-11-27 15:10:38 +00:00
Jonathan Bell
4238b780c2 main: handle RP2040's broken USB error handling
RP2040-E15 can also be triggered if a Debug Probe is connected to a
board with a floating ground. Typically this causes port ESD protection
to temporarily activate, meaning the Dp/Dm state gets corrupted. If this
happens in the middle of a handshake packet, the SIE can lock up.

The only way to detect this case is if SOF_RD stops advancing without a
corresponding suspend interrupt - so add a watchdog thread that forces a
disconnect if the hardware stops reporting frame counts.

This is disruptive, but immediate notification that the probe broke is
preferable to silently failing until the next character is sent by the host.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
2024-11-27 14:19:33 +00:00
Jonathan Bell
189e367332 main: add callbacks for discrete USB states
We can save more power by parking threads when suspended, and threads
should be deleted when disconnected.

Also fix an inefficiency in usb_thread wakeups when the device is yet to
be configured, but is addressed - slowing down control transfers.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
2024-11-27 14:19:33 +00:00
Jonathan Bell
d9c507f579 dap_edpt_driver: handle deinit properly
Zap pending buffers if the interface went away.
Also fix -Wformat warnings.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
2024-11-27 14:19:33 +00:00
Jonathan Bell
6d2f83e30c cdc_uart: be more careful about when the thread gets parked or resumed
tud_cdc_connected tests dtr, not rts - so we should do the same.

Don't unconditionally wake the uart thread when set_line_coding happens
- Windows frequently calls this after every linestate change, including
device close.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
2024-11-27 14:19:33 +00:00
Jonathan Bell
1182803822 probe: revert pins to Hi-Z when PORT_OFF is called
Alternative implementation of #146
Fixes #146
2024-11-27 14:10:51 +00:00
Andrew Burge
65b1e73589 Where enabled: Add calls to set the various xxx_LED status lines as GPIO outputs
Signed-off-by: Andrew Burge <andrew.burge@raspberrypi.com>
2024-11-27 11:03:04 +00:00
Jonathan Bell
152f85d2ec Specify MIT license as the project's default.
Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
2024-11-27 10:58:50 +00:00
Jonathan Bell
d85fd1f58d Remove unattributed contributions from the project
Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
2024-11-27 10:45:59 +00:00
Jonathan Bell
8f5d6fcc9f Clarify pico_sdk_import.cmake license
This file was copied from the pico-sdk, which is a BSD 3-Clause project.
2024-11-20 11:21:58 +00:00
Jonathan Bell
9aed4ca509 Add license and copyright to probe_oen.pio
This file is directly attributable to Raspberry Pi.
2024-11-20 11:12:09 +00:00
Jonathan Bell
e4585d551a probe: don't include pio headers directly 2024-11-07 15:13:03 +00:00
Jonathan Bell
46b9613d14 Update to support building for Pico 2
- Update CMSIS to 5.7.0
- Update FreeRTOS to downstream commit aa52f214d

Note: for an existing repository clone, you must run
git submodule update --init
and delete and regenerate your build/ directory.
2024-08-08 14:40:22 +01:00
Jonathan Bell
2bbe900d68 Debugprobe release 2.0.1 debugprobe-v2.0.1 2024-04-16 13:43:17 +01:00
tanxiao
7410b45e1d rename PROBE_IO_SWDIOEN to PROBE_IO_OEN 2024-03-26 19:12:28 +00:00
tanxiao
920f717e71 Add pin names to binary information 2024-03-26 19:12:28 +00:00
Taylor Alexander
34a4ba0e01 Fix incorrect LED ifdefs 2024-03-26 19:11:14 +00:00
Jonathan Bell
0476e9cae5 cdc_uart: add missing clear-break reset of TX LED 2024-03-19 14:49:41 +00:00