Skip to content

Instantly share code, notes, and snippets.

@k0d
k0d / openocd.txt
Last active December 29, 2020 05:50
samd21 with openecd
```brew install openocd```
make a file called openocd.cfg in a folder containing...
# Atmel-ICE JTAG/SWD in-circuit debugger.
interface cmsis-dap
# Chip info
set CHIPNAME at91samd21g18
source [find target/at91samdXX.cfg]
@k0d
k0d / plink-uart.c
Created July 15, 2020 18:01
plink-uart.c
@k0d
k0d / foo.patch
Created June 17, 2020 18:24
foo.patch
diff --git a/foo b/foo
index 678abfc97..ae7ad5315 100644
--- a/foo
+++ b/foo
@@ -3831,7 +3831,7 @@ Linker script and memory map
0x0000000008000000 g_pfnVectors
0x00000000080001c8 . = ALIGN (0x4)
-.text 0x0000000008020000 0x53180
+.text 0x0000000008020000 0x53190
@k0d
k0d / usb-probe.txt
Created June 2, 2020 17:22
usb-probe
Full Speed device @ 32 (0x14500000): ............................................. Miscellaneous/Common Class device: "TinyUSB Device"
Port Information: 0x001a
Not Captive
Attached to Root Hub
External Device
Connected
Enabled
Number Of Endpoints (includes EP0):
Total Endpoints for Configuration 1 (unconfigured): 9
Device Descriptor
@k0d
k0d / font.txt
Created May 18, 2020 16:42
font
0000:AAAA00018000000180004A51EA505A51C99E0001800000018000000180005555
0001:AAAA00018000000180003993C252325F8A527193800000018000000180005555
0002:AAAA00018000000180003BA5C124311989247125800000018000000180005555
0003:AAAA00018000000180007BA5C1247919C1247925800000018000000180005555
0004:AAAA000180000001800079BFC2487A49C2487989800000018000000180005555
0005:AAAA00018000000180007A4DC2527B53C2D67A4F800000018000000180005555
0006:AAAA000180000001800031A5CA287A31CA2849A5800000018000000180005555
0007:AAAA000180000001800073D1CA1073D1CA1073DF800000018000000180005555
0008:AAAA00018000000180001E3991401E3191081E71800000018000000180005555
0009:AAAA000180000001800022F9A2203E21A2202221800000018000000180005555
@k0d
k0d / Dockerfile
Created May 15, 2020 23:32
example docker image
FROM alpine:3.11
RUN apk add gcc-arm-none-eabi gettext
RUN pip install requests sh click setuptools awscli
@k0d
k0d / mpr121-threshold.py
Last active May 15, 2020 09:44
mpr121-threshold
# Simple test of the MPR121 capacitive touch sensor library.
# Will print out a message when any of the 12 capacitive touch inputs of the
# board are touched. Open the serial REPL after running to see the output.
# Author: Tony DiCola
import time
import board
import busio
# Import MPR121 module.
import adafruit_mpr121
(gdb) help all
Command class: aliases
ni -- Step one instruction
rc -- Continue program being debugged but run it in reverse
rni -- Step backward one instruction
rsi -- Step backward exactly one instruction
si -- Step one instruction exactly
stepping -- Specify single-stepping behavior at a tracepoint
@k0d
k0d / foo.dts
Created March 25, 2020 16:37
dts macros
gpioc: gpio@40020800 {
compatible = "st,stm32-gpio";
gpio-controller;
#gpio-cells = < 0x2 >;
reg = < 0x40020800 0x400 >;
clocks = < &rcc 0x0 0x4 >;
label = "GPIOC";
phandle = < 0x9 >;
};