Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MCU=attiny85
- AVRDUDEMCU=t85
- CC=/usr/bin/avr-gcc
- CFLAGS=-g -Os -Wall -mcall-prologues -mmcu=$(MCU)
- OBJ2HEX=/usr/bin/avr-objcopy
- AVRDUDE=/usr/local/bin/avrdude
- TARGET=PiPowerController
- all :
- $(CC) $(CFLAGS) $(TARGET).c -o $(TARGET)
- $(OBJ2HEX) -R .eeprom -O ihex $(TARGET) $(TARGET).hex
- rm -f $(TARGET)
- install : all
- sudo $(AVRDUDE) -p $(AVRDUDEMCU) -P /dev/spidev0.0 -c linuxspi -b 10000 -U flash:w:$(TARGET).hex
- fuse :
- 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
- clean :
- rm -f *.hex *.obj *.o
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement