forked from psgroove/psgroove
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile.conf
73 lines (62 loc) · 1.58 KB
/
Makefile.conf
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
## *** Select your board *** ##
## AT90USBKEY / AT90USBKEY2
#MCU = at90usb1287
#BOARD = USBKEY
#F_CLOCK = 8000000
## Olimex AVR-USB-162
#MCU = at90usb162
#BOARD = USBKEY # Not really, but no one cares about the LEDs anyway
#F_CLOCK = 8000000
## ATAVRXPLAIN
#MCU = at90usb1287
#BOARD = XPLAIN
#F_CLOCK = 8000000
## Teensy 1.0
#MCU = at90usb162
#BOARD = TEENSY
#F_CLOCK = 16000000
## Teensy++ 1.0
#MCU = at90usb646
#BOARD = TEENSY
#F_CLOCK = 16000000
## Teensy 2.0
#MCU = atmega32u4
#BOARD = TEENSY
#F_CLOCK = 16000000
# Teensy++ 2.0
MCU = at90usb1286
BOARD = TEENSY
F_CLOCK = 16000000
## *** Compile Options *** ##
F_CPU = $(F_CLOCK)
CDEFS = -DF_CPU=$(F_CPU)UL
CDEFS += -DF_CLOCK=$(F_CLOCK)UL
CDEFS += -DBOARD=BOARD_$(BOARD)
CDEFS += $(LUFA_OPTS)
CFLAGS = -g$(DEBUG)
CFLAGS += $(CDEFS)
CFLAGS += -Os
CFLAGS += --std=gnu99
CFLAGS += -funsigned-char
CFLAGS += -funsigned-bitfields
CFLAGS += -ffunction-sections
CFLAGS += -fno-inline-small-functions
CFLAGS += -fpack-struct
CFLAGS += -fshort-enums
CFLAGS += -fno-strict-aliasing
CFLAGS += -Wall
CFLAGS += -Wstrict-prototypes
#CFLAGS += -mshort-calls
#CFLAGS += -fno-unit-at-a-time
#CFLAGS += -Wundef
#CFLAGS += -Wunreachable-code
#CFLAGS += -Wsign-compare
CFLAGS += -Wa,-adhlns=$(<:%.c=$(OBJDIR)/%.lst)
CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
## *** LUFA Options *** ##
LUFA_OPTS = -D USB_DEVICE_ONLY
LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=8
LUFA_OPTS += -D USE_FLASH_DESCRIPTORS
LUFA_OPTS += -D MEMSPACE_FLASH=0
LUFA_OPTS += -D MEMSPACE_EEPROM=1
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"