mirror of
https://codeberg.org/eel4746_piano/avr_piano.git
synced 2024-11-21 16:50:30 -05:00
24 lines
512 B
Makefile
24 lines
512 B
Makefile
CC = avr-gcc
|
|
CFLAGS = -O2 -Wall -Wextra -Werror -mmcu=atmega328p
|
|
OBJCOPY = avr-objcopy
|
|
|
|
PORT ?= /dev/ttyACM0
|
|
|
|
all: notes lcd
|
|
|
|
notes:
|
|
${CC} ${CFLAGS} main.c
|
|
${OBJCOPY} -j .text -j .data -O ihex a.out main.hex
|
|
rm -f a.out
|
|
|
|
flash_notes: notes
|
|
avrdude -p atmega328p -c arduino -P ${PORT} -b 115200 -U flash:w:main.hex:i
|
|
|
|
lcd:
|
|
${CC} ${CFLAGS} main.c
|
|
${OBJCOPY} -j .text -j .data -O ihex a.out main.hex
|
|
rm -f a.out
|
|
|
|
flash_lcd: notes
|
|
avrdude -p atmega328p -c arduino -P ${PORT} -b 115200 -U flash:w:main.hex:i
|