-
Notifications
You must be signed in to change notification settings - Fork 549
/
Makefile.k66
75 lines (65 loc) · 2.33 KB
/
Makefile.k66
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
73
74
75
#
# PX4 bootloader build rules for K66 targets.
# 5 seconds / 5000 ms default delay
PX4_BOOTLOADER_DELAY ?= 5000
ARCH=kinetis
#src/startup/crt0_gcc.S
KINETIS_ASRCS= targets/MK66F18/src/startup/gcc/startup_MK66F18.S \
KINETIS_CSRCS= targets/MK66F18/src/startup/system_MK66F18.c \
src/platform/devices/MK66F18/fsl_clock.c \
src/drivers/smc/smc.c \
src/drivers/gpio/fsl_gpio.c \
src/drivers/flash/fsl_flash.c \
src/usb/device/class/usb_device_cdc_acm.c \
src/usb/device/usb_device_khci.c \
src/usb/device/usb_device_dci.c \
src/usb/device/usb_device_ch9.c \
src/usb/device/class/usb_device_class.c \
src/usb/osa/usb_osa_bm.c \
src/startup/startup.c
KINETIS_INCS= src/platform/devices/MK66F18 \
targets/MK66F18/src \
src/autobaud \
src/usb/include \
src/usb/osa \
src/usb/device \
src/usb/device/class \
src/bm_usb \
src/include \
src/platform \
src/platform/devices \
src/platform/CMSIS/Include \
src \
src/drivers \
src/startup \
src/drivers/common \
ASRCS = $(addprefix $(LIBKINETIS)/, $(KINETIS_ASRCS))
CSRCS = $(addprefix $(LIBKINETIS)/, $(KINETIS_CSRCS))
INCS = $(addprefix -I $(LIBKINETIS)/, $(KINETIS_INCS))
SRCS = $(COMMON_SRCS) $(addprefix $(ARCH)/,$(ARCH_SRCS)) $(CSRCS) main_k66.c kinetis.c \
# Keep the build happy
LIB_WORK_AROUNDS= -DSTM32F4 \
-DTOWER=0 \
-DFREEDOM=0 \
-DCLOCK_SETUP=6\
FLAGS += $(LIB_WORK_AROUNDS) \
-g -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 \
-specs=nano.specs -specs=nosys.specs \
$(INCS) \
-DTARGET_HW_$(TARGET_HW) \
-DBL_CONFIG_USB_CDC=1 \
-DBL_CONFIG_HS_USB_HID=0 \
-DBL_CONFIG_HS_USB_MSC=0 \
-DBL_TARGET_FLASH \
-DDEBUG=0 \
-DNDEBUG=1 \
-DUSB_STACK_BM \
-DCPU_MK66FN2M0VMD18=1 \
-DCPU_IS_ARM_CORTEX_M4=1 \
-T$(LINKER_FILE) \
$(EXTRAFLAGS)
#
# General rules for making dependency and object files
# This is where the compiler is called
#
include rules.mk