all : test.hex PART=attiny441 PROGPART=t441 #AVRP=~/cpptest/avr-toolchain/avr-toolchain/bin/avr- AVRP=avr- CFLAGS=-g -Wall -Os -mmcu=$(PART) -DF_CPU=14745600UL ASFLAGS:=$(CFLAGS) CC=avr-gcc #EXTREME_COMP:=-Wl,--relax -mcall-prologues test.hex : test.elf $(AVRP)objcopy -j .text -j .data -O ihex test.elf test.hex $(AVRP)size $^ test.bin : test.elf $(AVRP)objcopy -j .text -j .data -O binary test.elf test.bin test.elf : test.c lsm303c.c ws2812b_single.c $(AVRP)gcc -I -g $(CFLAGS) -mmcu=$(PART) -Wl,-Map,test.map -o $@ $^ -L/usr/lib/binutils/avr/2.18 $(AVRP)objdump -S $@ > test.lst #-Wl,--defsym=SendWS2812SingleBoot=0xfc0 portsetting : stty -F /dev/ttyUSB0 115200 -echo raw bootload : test.bin portsetting ../top/bootloader /dev/ttyUSB0 write test.bin readback : test.bin portsetting ../top/bootloader /dev/ttyUSB0 read test.bin 0 burn : test.hex sudo avrdude -c usbtiny -p $(PROGPART) -V -U flash:w:test.hex burnfuses : sudo avrdude -c usbtiny -p $(PROGPART) -U lfuse:w:0x62:m -U hfuse:w:0xd5:m -U efuse:w:0xfe:m #Use internal 8MHz oscillator, default to /8, start-up time enabled. #SPI Programming enabled, Save EEPROM on chip erase + 2.7V brown-out detection. #Self-program enabled. clean : rm -f *~ high.txt low.txt test.hex test.map test.elf *.o