Skip to content

Instantly share code, notes, and snippets.

@ryankurte
ryankurte / hardfault.c
Last active October 8, 2017 16:00
Cortex M Hardfault Handler
// A HardFault handler to make life easier when debugging
// See http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0553a/Cihcfefj.html
// The smol version
void HardFault_Handler(void) {
SCB_Type* scb = SCB;
(void*)scb;
__asm("BKPT #0");
while(1);
}
@thequux
thequux / micro.py
Created September 1, 2014 23:21
KS10 microcode assembler
#!/usr/bin/python
# A microcode assembler
import os
import os.path
import re
import collections
import IPython.Shell