mirror of
https://github.com/Derisis13/AT-VFD.git
synced 2025-12-06 19:32:49 +01:00
Fix: transition to make because CMake used the wrong linker
Credit to Łukasz Podkalicki for Makefile
This commit is contained in:
18
Makefile
Normal file
18
Makefile
Normal file
@@ -0,0 +1,18 @@
|
||||
# Credits to Łukasz Podkalicki: https://blog.podkalicki.com/how-to-compile-and-burn-the-code-to-avr-chip-on-linuxmacosxwindows/
|
||||
MCU=atmega88
|
||||
F_CPU=8000000UL
|
||||
CC=avr-gcc
|
||||
OBJCOPY=avr-objcopy
|
||||
CFLAGS=-std=c99 -Wall -g -O3 -mmcu=${MCU} -DF_CPU=${F_CPU} -I/usr/lib/avr/include/
|
||||
TARGET=main
|
||||
SRCS=main.c PT6302.c PT6302.h
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user