Skip to content

Instantly share code, notes, and snippets.

a-gavin /
Last active March 18, 2023 23:15
ESP32-C3 and ESP32-C3 Notes
a-gavin / longan-nano.cfg
Last active March 15, 2023 06:58
OpenOCD Config Files (FTDI 232H & 2232H Probes, Longan Nano RISC-V board)
View longan-nano.cfg
# Where did I find this originally??? Someone's gist somewhere on GitHub
# Taken from
# Goes in scripts/target/
# Below should be in interface???
#adapter speed 1000
# Can only debug RISCV devices via JTAG
transport select jtag
a-gavin / Cargo.toml
Created January 30, 2023 05:45
probe-rs Simple RISC-V API Example
View Cargo.toml
name = "probe_rs_example"
version = "0.1.0"
edition = "2021"
anyhow = "1.0.34"
probe-rs = { version = "0.15.0", features = ["ftdi"] }
a-gavin /
Created December 13, 2022 19:43
How to Create udev Rule for USB tty Device Distilled


You don't have permissions to read from or write to a USB tty device. This can manifest in a variety of ways.

Solution: Write a udev rule for your tty device:

  1. Identify the tty device:

    Run ls /dev/. The device will show up as a /dev/ttyACMx or /dev/ttyUSBx where x is some positive whole number.

    If there are multiple ACM and/or USB devices, unplug and re-plug in the USB device. Then, search for the USB event in the kernel message buffer using the following command: sudo dmesg | grep "usb". This should print out enough information to where you can identify the desired USB tty.

a-gavin /
Last active March 15, 2023 07:23
Contrived RTIC Shared Resource Example
device = rp_pico::hal::pac,
dispatchers = [TIMER_IRQ_1]
mod app {
use rp_pico::XOSC_CRYSTAL_FREQ;
use rp_pico::hal::{
a-gavin /
Created September 1, 2022 19:58
BitMagic Logic Analyzer Pulseview Setup on Linux
a-gavin /
Created August 30, 2022 05:14
Raspberry Pi Picoprobe Debug Setup/Tips & Tricks

Raspberry Pi Picoprobe Debug Setup/Tips & Tricks

This document details useful information on how to use a Raspberry Pi Pico as a SWD probe for another Pico using the Picoprobe software. This information assumes you have followed all of the steps in Appendix A of the Getting Started with Raspberry Pi Pico Guide and that you are doing development on a Linux system.

Essential Setup

  1. Add the below files to your system to enable non-root access to the devices


    # Raspberry Pi Picoprobe

ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="0004", MODE="0666"

a-gavin /
Last active March 21, 2022 20:28
Adafruit nrf52840 Express TCPlp Implementation