59 lines
1.5 KiB
Markdown
59 lines
1.5 KiB
Markdown
# PicoSDKandFreeRtos
|
|
|
|
Minimal Raspberry Pi Pico 2 (RP2350) project running FreeRTOS to show task and queue creation / handling, task signaling, plus a small
|
|
.NET tool to measure USB-CDC round-trip latency.
|
|
|
|
## Firmware
|
|
|
|
The firmware exposes a simple ping protocol over USB-CDC. The host sends:
|
|
|
|
```
|
|
<id>:ping\n
|
|
```
|
|
|
|
and the Pico replies:
|
|
|
|
```
|
|
<id>:PONG!\n
|
|
```
|
|
|
|
### Build & flash
|
|
|
|
Open the folder in VS Code with the **Raspberry Pi Pico** extension, then:
|
|
|
|
1. If not prompted directly: Command Palette -> **Raspberry Pi Pico: Import Pico Project**
|
|
2. Command Palette -> **Raspberry Pi Pico: Run Pico Project (USB)**
|
|
|
|
Required tooling (auto-installed by the extension):
|
|
|
|
- Pico SDK 2.2.0
|
|
- ARM GCC toolchain `14_2_Rel1`
|
|
- `picotool` 2.2.0-a4
|
|
- Ninja, CMake
|
|
|
|
## Tool: `response_tester.cs`
|
|
|
|
A .NET 10 file-based app that bursts ping commands over the serial port and prints per-command and average round-trip latency.
|
|
|
|
### Run
|
|
|
|
Requires .NET 10 SDK.
|
|
|
|
```bash
|
|
dotnet response_tester.cs
|
|
```
|
|
|
|
Adjust `portName` (default `COM30`) inside the file if needed.
|
|
|
|
## Troubleshooting
|
|
> Raspberry Pi Pico: Run Pico Project (USB) not working
|
|
- try **Raspberry Pi Pico: Compile Pico Project**
|
|
- hold `BOOTSEL` while connecting the Pico
|
|
- a new drive should be mountable
|
|
- move the *.uf2 file from ./build onto the new drive
|
|
|
|
> COM-Port
|
|
- On Windows the Pico typically appears as `COMx` (check Device Manager).
|
|
- On Linux it appears as `/dev/ttyACM0` (or `ACM1`, ...).
|
|
- On macOS it appears as `/dev/tty.usbmodem*` or `/dev/cu.usbmodem*`.
|
|
- Update `portName` in `response_tester.cs` accordingly. |