Skip to content

Instantly share code, notes, and snippets.

@todbot
todbot / openocd-samd21.cfg
Last active January 5, 2025 14:11
Program a SAMD21 with OpenOCD and a JLINK
# Program a SAMD21 part with a bootloader using a JLINK / J-LINK
# 0a. Wire up your device with SWD & SWC pins to JLINK
# 0b. Also wire up Gnd and Power to Gnd & VTref on JLINK
# 0c. And separately supply power to device
# 0d. Iif you don't have openocd installed, then "brew install openocd"
#
# 1. Put this file in a directory
# 2. Get a samd21 bootloader file.bin and put it in this directory renamed as "bootloader.bin"
# 3. Unplug and replug in the JLINK (to reset it)
# 4. Then do "openocd -f ./openocd-sams21.cfg" and stand back
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@TechplexEngineer
TechplexEngineer / makefile
Last active April 1, 2017 21:10
Easily prepare gEDA PCB layouts for OSH Park.
TARGET = control
.phony: all clean gerber
all:
gsch2pcb --elements-dir "../pcb-elements" project
clean:
rm -f *.net *.cmd
rm -rf gerber