evinlight/Makefile

16 lines
825 B
Makefile

CFLAGS += -I /nix/store/8dm9wns7cjcjd3527s87lk4s8a1z6k93-avr-libc-2.0.0/avr/include
CFLAGS += -B /nix/store/8dm9wns7cjcjd3527s87lk4s8a1z6k93-avr-libc-2.0.0/avr/lib/avr25
CFLAGS += -L /nix/store/8dm9wns7cjcjd3527s87lk4s8a1z6k93-avr-libc-2.0.0/avr/lib/avr25
CFLAGS += -L /nix/store/8dm9wns7cjcjd3527s87lk4s8a1z6k93-avr-gcc-5.4.0/lib/gcc/avr/5.4.0/avr25
default:
# compile for attiny86 with warnings, optimizations, and 1 MHz clock frequency
avr-gcc $(CFLAGS) -Wall -Os -DF_CPU=8000000 -mmcu=attiny85 -o evinlight.o evinlight.c
avr-objcopy -j .text -j .data -O ihex evinlight.o evinlight.hex
avrdude -c buspirate -P /dev/ttyUSB0 -p t85 -U flash:w:evinlight.hex:i
stty -F /dev/ttyUSB0 115200 raw -echo -echoe -echok -echoctl -echoke
echo -e -n "m\n2\nW\n" > /dev/ttyUSB0
clean: /dev/null
rm -f evinlight.o evinlight.hex