1
0
mirror of git://projects.qi-hardware.com/ben-blinkenlights.git synced 2024-12-28 20:31:08 +02:00
ben-blinkenlights/nxuart/fw/Makefile

28 lines
531 B
Makefile
Raw Normal View History

CFLAGS = -g -Wall -Wshadow -Werror \
-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
NAME=nxuart
CHIP=atmega48
AVR_PREFIX = $(BIN_PATH) avr-
CC = $(AVR_PREFIX)gcc
OBJCOPY = $(AVR_PREFIX)objcopy
#OBJDUMP = $(AVR_PREFIX)objdump
.PHONY: all upload prog
all: $(NAME).bin
%.elf: %.c
$(CC) -mmcu=$(CHIP) -Os -o $@ $<
%.bin: %.elf
$(OBJCOPY) -j .text -j .data -O binary $< $@
upload: $(NAME).bin
scp $(NAME).bin jlime:
prog:
ssh jlime avrdude -p atmega48 -c nanonote_$(NAME) \
-e -U flash:w:$(NAME).bin:r