-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.makefile
executable file
·48 lines (36 loc) · 1.18 KB
/
config.makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Target Device Settings
# ---------------------------
# The AVR Device (AVR-GCC/AVRDUDE) you compile for
T_DEVICE = atmega328p
# Target Clock (F_CPU) in Hz
T_FCPU = 20000000
# Fuse Settings
T_FUSE_L = 0xFF
T_FUSE_H = 0xFF
T_FUSE_E = 0xFF
# Compiler/Linker Settings
# ---------------------------
# General Options - remove unused functions (garbage collection)
CC_FLAGS += -fpack-struct
CC_FLAGS += -fshort-enums
CC_FLAGS += -ffunction-sections
CC_FLAGS += -fdata-sections
CC_FLAGS += -funsigned-char
CC_FLAGS += -funsigned-bitfields
# General Options
LD_FLAGS += -Wl,--gc-sections
LD_FLAGS += -mrelax
#avr-gcc -Wall -O2 -fpack-struct -fshort-enums -ffunction-sections -fdata-sections
#-std=gnu99 -funsigned-char -funsigned-bitfields -mmcu=atmega328p -DF_CPU=20000000UL
# -MMD -MP -MF"StarlightController.d" -MT"StarlightController.d" -c -o "StarlightController.o" "../StarlightController.c"
# Libraries e.g. m, printf, ...
LD_LIBS = m
# Optimization Level [0, 1, 2, 3, s]
CC_OPTIMIZATION = 2
# C Standard Level
CC_STANDARD = gnu99
# Get List of ALL Sourcefiles on Source Path
SOURCES = $(wildcard *.c)
# Programmer Settings (AVRDUDE)
# ---------------------------
PRG_TYPE = avrispmkII