mirror of
https://github.com/caperren/school_archives.git
synced 2025-11-09 13:41:13 +00:00
17 lines
382 B
Makefile
17 lines
382 B
Makefile
MCU=atmega128
|
|
CC=avr-gcc
|
|
OBJCOPY=avr-objcopy
|
|
CFLAGS=-std=c99 -Wall -g -Os -mmcu=${MCU} -DF_CPU=${F_CPU} -I.
|
|
TARGET=main
|
|
SRCS=Corwin_Perren_Lab2_challenge_sourcecode.c
|
|
|
|
all:
|
|
${CC} ${CFLAGS} -o ${TARGET}.bin ${SRCS}
|
|
${OBJCOPY} -j .text -j .data -O ihex ${TARGET}.bin ${TARGET}.hex
|
|
|
|
flash:
|
|
avrdude -p ${MCU} -c usbasp -U flash:w:${TARGET}.hex:i -F -P usb
|
|
|
|
clean:
|
|
rm -f *.bin *.hex
|