Skip to content

Instantly share code, notes, and snippets.

View kaipyroami's full-sized avatar
🦆

Kyle Crockett kaipyroami

🦆
View GitHub Profile
@kaipyroami
kaipyroami / read-stm32-firmware.md
Created June 28, 2025 23:07 — forked from vanbwodonk/read-stm32-firmware.md
Read stm32 firmware binary with openOCD

read-stm32-firmware

OpenOCD scripts for read STM32 firmware binary

Requirements

Linux

OpenOCD (Open On-Chip Debugger) is open-source software that interfaces with a hardware debugger's JTAG port. OpenOCD provides debugging and in-system programming for embedded target devices. OpenOCD provides the ability to flash NAND and NOR FLASH memory devices that are attached to the processor on the target system. Flash programming is supported for external CFI compatible flashes (Intel and AMD/Spansion command set) and several internal flashes (LPC2000, AT91SAM7, STR7x, STR9x, LM3 and STM32x).

OpenOCD was originally developed by Dominic Rath at the University of Applied Sciences Augsburg. The OpenOCD source code is now available through the GNU General Public License (GPL).

Keybase proof

I hereby claim:

  • I am kaipyroami on github.
  • I am kaipyroami (https://keybase.io/kaipyroami) on keybase.
  • I have a public key ASAIoob93z2FMH2d1beZKZ8ko4OTaNXyXC-3dFZv-HZE-wo

To claim this, I am signing this object:

@kaipyroami
kaipyroami / zipifnot.sh
Created October 22, 2020 02:55
If it is not zipped then zip it, test integrity and delete original.
#!/bin/sh
find . -type f \( -iname "*" ! -iname "*.zip" \) -execdir zip -m -T '{}.zip' '{}' \;
@kaipyroami
kaipyroami / docker-compose.yml
Created September 11, 2020 03:18
A simple docker compose file to run a Pharos container.
# Pharos - https://github.com/cmu-sei/pharos
version: '3.7'
services:
pharos:
container_name: pharos
image: seipharos/pharos
volumes:
- ./data:/pharos-data
restart: unless-stopped
@kaipyroami
kaipyroami / lookup2d.go
Last active September 9, 2019 15:58
This is a simple example of a 2 dimensional lookup table with linear interpolation in Go.
package main
import (
"fmt"
)
func main() {
var yi1, yi2, xi1, xi2 int // Lookup table indexes around point
var x, y float64 // x,y axis values at indexes
@kaipyroami
kaipyroami / lookup1d.go
Created September 9, 2019 02:47
This is a simple example of a 1 dimensional lookup table with linear interpolation in Go.
// This is a simple example of a 1 dimensional lookup table with linear interpolation.
package main
import (
"fmt"
)
type table struct {
axis []float64
values []float64
@kaipyroami
kaipyroami / channelRangeEx.go
Created September 4, 2019 21:53
An example of a channel being piped into a range loop in Go.
package main
import (
"fmt"
)
func main() {
c := make(chan int)
go func() {
@kaipyroami
kaipyroami / channelBufEx.go
Created September 4, 2019 18:36
Channel example using a buffer.
package main
import (
"fmt"
)
func main() {
c := make(chan int, 1) // Buffer
@kaipyroami
kaipyroami / channelFuncEx.go
Created September 4, 2019 18:34
Channel using function example.
package main
import (
"fmt"
)
func main() {
c := make(chan int)
@kaipyroami
kaipyroami / atomicEx.go
Created September 4, 2019 16:57
An example of an atomic counter in Go.
package main
import (
"fmt"
"sync"
"sync/atomic"
)
func main() {