mirror of
https://codeberg.org/eel4746_piano/avr_piano.git
synced 2024-11-22 01:00:29 -05:00
12 lines
278 B
Makefile
12 lines
278 B
Makefile
|
CC = avr-gcc
|
||
|
CFLAGS = -O2 -Wall -Wextra -Werror -mmcu=atmega328p
|
||
|
OBJCOPY = avr-objcopy
|
||
|
|
||
|
all:
|
||
|
${CC} ${CFLAGS} main.c
|
||
|
${OBJCOPY} -j .text -j .data -O ihex a.out main.hex
|
||
|
rm -f a.out
|
||
|
|
||
|
flash: all
|
||
|
avrdude -p atmega328p -c arduino -P /dev/ttyACM0 -b 115200 -U flash:w:main.hex:i
|