Skip to content
AVR NFC bootloader for MFRC522, based on optiboot (not "opti" anymore :D)
C Makefile Shell C++
Branch: master
Clone or download
Latest commit f9727cc Jan 8, 2020
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Makefile initial commit Nov 18, 2018
Makefile.1284 initial commit Nov 18, 2018
Makefile.2560
Makefile.MCUdude Update Makefile.MCUdude Nov 18, 2018
Makefile.atmel
Makefile.custom
Makefile.extras initial commit Nov 18, 2018
Makefile.isp initial commit Nov 18, 2018
Makefile.tiny
README.TXT
README.md
avrio.h
baudcheck.c
baudcheck.tmp.sh
boot_opt.h initial commit Nov 18, 2018
info.sh
make-ccversions
makeall.arduino.sh initial commit Nov 18, 2018
makeall.mcudude.sh
makeall.tiny.sh
makeoptions
mfrc522.h initial commit Nov 18, 2018
omake initial commit Nov 18, 2018
omake.bat initial commit Nov 18, 2018
optiboot.c
pin_defs.h
pinout.h.dist
secret.h.dist
softspi.h
stk500.h initial commit Nov 18, 2018

README.md

MFRC522 Bootloader for AVR

Based on optiboot, works with CV520 and MFRC522. Check optiboot.c#722 for actual differences between normal UART bootloader and this MFRC522 NFC bootloader.

Why?

Because sometimes you don't have physical access to the device's debug connectors but you still want to be able to reprogram it.

Demo

See: https://www.youtube.com/watch?v=Uo2WDgB-wPI

Commands I was using:

Build with:

make atmega164p SOFT_UART=1 UART=0 AVR_FREQ=8000000L BAUD_RATE=115200 LED_START_FLASHES=3 LED=A1 LED_DATA_FLASH=1

Erase device flash:

avrdude -v -patmega164p -cusbasp -e -B10

Program optiboot and fuses:

avrdude -v -patmega164p -cusbasp "-Uflash:w:optiboot_atmega164p_UART0_115200_8000000L.hex:i" -U lfuse:w:0xE2:m -U hfuse:w:0xD8:m -U lock:w:0xCC:m -B10

Android app to interact with bootloader

See: https://github.com/icedevml/avr-nfc-bootloader-app

Notes

Tested with ATmega-164PA, should work with any other microprocessor which is supported by optiboot, but you need to adjust Makefile.MCUdude manually for your microprocessor.

Please remember that values in secret.h.dist and pinout.h.dist are exemplary and you need to adjust them to match your setup.

You can’t perform that action at this time.