From ec757f57f8aa7a6e868538df09a37d2489adaec4 Mon Sep 17 00:00:00 2001 From: Eggert Jung Date: Tue, 24 May 2022 19:17:52 +0200 Subject: [PATCH] clean up build config --- code/Makefile | 12 ++---------- code/compile_flags.txt | 7 +++++++ 2 files changed, 9 insertions(+), 10 deletions(-) create mode 100644 code/compile_flags.txt diff --git a/code/Makefile b/code/Makefile index a0de229..4296d7d 100644 --- a/code/Makefile +++ b/code/Makefile @@ -1,6 +1,6 @@ TARGET = main SRCS := $(shell find -name '*.c') -FILES = $(SRCS:%.c=%) #main uart avrIOhelper/io-helper #uart#hier alle c-Datein reinschreiben, trennung durch " " und ohne .c-Endung +FILES = $(SRCS:%.c=%) MCU = atmega328p PROGC = m328p CC = avr-gcc @@ -10,7 +10,7 @@ TOOL = atmelice_isp BUILDDIR = Builds -DEFINES = -I . -IInternet/MQTT -I Internet/MQTT/MQTTPacket/src -I Ethernet/W5500 -I Ethernet -DF_CPU=18432000UL -D_WIZCHIP_=W5100 +DEFINES = -DF_CPU=18432000UL CFLAGS =-mmcu=$(MCU) -O2 -Wall -Wpedantic $(DEFINES) -std=c99 -ffunction-sections -fdata-sections LDFLAGS =-mmcu=$(MCU) -Wl,--gc-sections @@ -45,11 +45,3 @@ size: $(BUILDDIR)/$(TARGET).elf clean: rm -rf $(BUILDDIR) - -#Fuse m1284p external Osz. Long startuptime -# avrdude -c usbasp-clone -p m1284p -U lfuse:w:0xff:m -U hfuse:w:0xd9:m -U efuse:w:0xff:m - -#Fuse m1284p internal Osz. Long startuptime -# avrdude -c usbasp-clone -p m1284p -U lfuse:w:0xe2:m -U hfuse:w:0xd9:m -U efuse:w:0xff:m - - diff --git a/code/compile_flags.txt b/code/compile_flags.txt new file mode 100644 index 0000000..59ea021 --- /dev/null +++ b/code/compile_flags.txt @@ -0,0 +1,7 @@ +-D +__AVR_ATmega328P__ +-D +F_CPU=18432000UL +-I +/usr/lib/avr/include +