Skip to content

Instantly share code, notes, and snippets.

@a-gavin
a-gavin / README.md
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

    /etc/udev/rules.d/99-openocd.rules:

    # Raspberry Pi Picoprobe
    

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

@a-gavin
a-gavin / main.rs
Last active March 15, 2023 07:23
Contrived RTIC Shared Resource Example
#![no_std]
#![no_main]
#[rtic::app(
device = rp_pico::hal::pac,
dispatchers = [TIMER_IRQ_1]
)]
mod app {
use rp_pico::XOSC_CRYSTAL_FREQ;
use rp_pico::hal::{
@a-gavin
a-gavin / Cargo.toml
Created January 30, 2023 05:45
probe-rs Simple RISC-V API Example
[package]
name = "probe_rs_example"
version = "0.1.0"
edition = "2021"
[dependencies]
anyhow = "1.0.34"
probe-rs = { version = "0.15.0", features = ["ftdi"] }
@a-gavin
a-gavin / longan-nano.cfg
Last active March 15, 2023 06:58
OpenOCD Config Files (FTDI 232H & 2232H Probes, Longan Nano RISC-V board)
# Where did I find this originally??? Someone's gist somewhere on GitHub
# Taken from https://raw.githubusercontent.com/riscv/riscv-openocd/a037b20f2e015859327ab37588792386c4fc942f/tcl/target/gd32vf103.cfg
#
# Goes in scripts/target/
# Below should be in interface???
#adapter speed 1000
# Can only debug RISCV devices via JTAG
transport select jtag
@a-gavin
a-gavin / NOTES.md
Last active March 18, 2023 23:15
ESP32-C3 and ESP32-C3 Notes

Overview

Initial dev environment setup for ESP32-C3 and ESP32-C6 programming, tailored towards Rust development. Some of this will also apply to the ESP32-C2 as well as the ESP32-H2 and ESP32-P4 when they are released.

  1. General Setup
  2. Setup USB JTAG
  3. Setup GPIO JTAG

General Setup

  • Install ESP tooling:
use neli::{
consts::{nl::NlmF, socket::NlFamily},
genl::{AttrTypeBuilder, Genlmsghdr, GenlmsghdrBuilder, NlattrBuilder, NoUserHeader},
neli_enum,
nl::NlPayload,
router::synchronous::NlRouter,
types::GenlBuffer,
utils::Groups,
};