Skip to content

Instantly share code, notes, and snippets.

@Snial
Snial / BootJacker.c
Last active May 18, 2022 05:08
BootJacker: The Amazing AVR Bootloader Hack!
#define SPIFbit 7
#define SPR (1<<0)
#define kSpmCsr 0x37
#define kSpmCsrMem (kSpmCsr+0x20)
#define IOAddrInsMask(aPort) (((aPort&0x30)<<5)|(aPort&7))
#define kBootloaderStart 0x7800
#define kMicroBootStart 0x7f80
#define kBootloaderEnd 0x8000