mirror of
git://projects.qi-hardware.com/ben-blinkenlights.git
synced 2024-08-23 11:47:08 +03:00
28 lines
531 B
Makefile
28 lines
531 B
Makefile
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
|