mirror of
git://projects.qi-hardware.com/ben-blinkenlights.git
synced 2024-11-17 03:30:40 +02:00
26 lines
499 B
Makefile
26 lines
499 B
Makefile
|
CFLAGS = -g -Wall -Wshadow -Werror \
|
||
|
-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
|
||
|
|
||
|
CHIP=atmega48
|
||
|
|
||
|
AVR_PREFIX = $(BIN_PATH) avr-
|
||
|
CC = $(AVR_PREFIX)gcc
|
||
|
OBJCOPY = $(AVR_PREFIX)objcopy
|
||
|
#OBJDUMP = $(AVR_PREFIX)objdump
|
||
|
|
||
|
.PHONY: all upload prog
|
||
|
|
||
|
all: uart.bin
|
||
|
|
||
|
%.elf: %.c
|
||
|
$(CC) -mmcu=$(CHIP) -Os -o $@ $<
|
||
|
|
||
|
%.bin: %.elf
|
||
|
$(OBJCOPY) -j .text -j .data -O binary $< $@
|
||
|
|
||
|
upload: uart.bin
|
||
|
scp uart.bin jlime:
|
||
|
|
||
|
prog:
|
||
|
ssh jlime avrdude -p atmega48 -c nanonote_uart -e -U flash:w:uart.bin:r
|