Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
62fd0a9efThis file is pinned to the selected release. Download the original to open it in your design tool.
MCU=attiny85
AVRDUDEMCU=t85
CPU_SPEED=-DF_CPU=8000000UL
CC=/usr/bin/avr-gcc
CFLAGS=-g -Os -Wall -w -mcall-prologues -mmcu=$(MCU) $(CPU_SPEED)
OBJ2HEX=/usr/bin/avr-objcopy
AVRDUDE=/usr/local/bin/avrdude
TARGET=MagSpoofPI
all :
$(CC) $(CFLAGS) $(TARGET).c -o $(TARGET)
$(OBJ2HEX) -R .eeprom -O ihex $(TARGET) $(TARGET).hex
rm -f $(TARGET)
install : all
sudo gpio -g mode 22 out
sudo gpio -g write 22 0
sudo $(AVRDUDE) -p $(AVRDUDEMCU) -P /dev/spidev0.0 -c linuxspi -b 10000 -U flash:w:$(TARGET).hex
sudo gpio -g write 22 1
noreset : all
sudo $(AVRDUDE) -p $(AVRDUDEMCU) -P /dev/spidev0.0 -c linuxspi -b 10000 -U flash:w:$(TARGET).hex
fuse :
sudo gpio -g mode 22 out
sudo gpio -g write 22 0
sudo $(AVRDUDE) -p $(AVRDUDEMCU) -P /dev/spidev0.0 -c linuxspi -b 10000 -U lfuse:w:0x62:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m
sudo gpio -g write 22 1
clean :
rm -f *.hex *.obj *.o