FreeCalypso > hg > leo2moko-debug
comparison chipsetsw/drivers/drv_core/drv_core.mak @ 0:509db1a7b7b8
initial import: leo2moko-r1
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Jun 2015 03:24:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:509db1a7b7b8 |
---|---|
1 # | |
2 # Makefile for basic drivers (ARM compiler) | |
3 # | |
4 # Copyright (c) Texas Instruments 2002 | |
5 # | |
6 # Author: Laurent Sollier | |
7 # Date : 17 May 2002 | |
8 | |
9 # Compilation flags | |
10 DRVC_DBG := $(NODBG) # Debug symbolic option | |
11 | |
12 DRIVERS_FLAGS := $(DRVC_DBG) -mn $(INL) $(16INST) -o $(ALGN) $(CFLAGSDRIVERS) | |
13 CFLAGS32 := $(DRVC_DBG) $(INL) -o $(ALGN) $(CFLAGSDRIVERS) | |
14 | |
15 WIN_DRIVERS_FLAGS := $($(TP)CFLAGS) $(CFLAGSDRIVERS) | |
16 WIN_CFLAGS32 := $($(TP)CFLAGS) $(CFLAGSDRIVERS) | |
17 | |
18 #For ABB | |
19 ABB_FLAGS := $(DRVC_DBG) $(16INST) -mn $(CFLAGSDRIVERS) | |
20 | |
21 ifeq ($(OP_L1_STANDALONE), 0) | |
22 ifeq ($(SRVC),0) | |
23 ABB_FLAGS += -dIDS=0 | |
24 else | |
25 ABB_FLAGS += -dIDS=1 | |
26 endif | |
27 endif | |
28 | |
29 # Libraries definition | |
30 DRIVER_FLASH := $(OUT_LIB_DIR)/drivers_flash.lib | |
31 DRIVER_INT_RAM := $(OUT_LIB_DIR)/drivers_int_ram.lib | |
32 NIQ32_INT_RAM := $(OUT_LIB_DIR)/niq32_int_ram.lib | |
33 LIB_ABB := $(OUT_LIB_DIR)/abb.lib | |
34 CFG_LIBS += $(DRIVER_FLASH) $(DRIVER_INT_RAM) $(NIQ32_INT_RAM) $(LIB_ABB) | |
35 | |
36 # Source definition | |
37 SRC_DRIVER_FLASH += $(DRIVERS_CORE_DIR)/dsp_dwnld/leadapi.c \ | |
38 $(DRIVERS_CORE_DIR)/inth/niq.c \ | |
39 $(DRIVERS_CORE_DIR)/uart/uart.c \ | |
40 $(DRIVERS_CORE_DIR)/inth/inth.c \ | |
41 $(DRIVERS_CORE_DIR)/timer/timer.c \ | |
42 $(DRIVERS_CORE_DIR)/timer/timer1.c \ | |
43 $(DRIVERS_CORE_DIR)/timer/timer2.c \ | |
44 $(DRIVERS_CORE_DIR)/timer/timer_sec.c \ | |
45 $(DRIVERS_CORE_DIR)/security/certificate.c | |
46 | |
47 ifeq ($(OP_L1_STANDALONE), 1) | |
48 SRC_DRIVER_FLASH += $(DRIVERS_CORE_DIR)/uart/serialswitch_core.c | |
49 endif | |
50 | |
51 SRC_ABB_CORE += $(DRIVERS_CORE_DIR)/spi/spi_drv.c \ | |
52 $(DRIVERS_CORE_DIR)/abb/abb.c \ | |
53 $(DRIVERS_CORE_DIR)/abb/abb_core_inth.c | |
54 | |
55 ifeq ($(CHIPSET),12) | |
56 SRC_DRIVER_FLASH += $(DRIVERS_CORE_DIR)/dma/sys_dma.c \ | |
57 $(DRIVERS_CORE_DIR)/dma/sys_dma_it.c \ | |
58 $(DRIVERS_CORE_DIR)/inth/sys_inth.c \ | |
59 $(DRIVERS_CORE_DIR)/inth/sys_inth32.c \ | |
60 $(DRIVERS_CORE_DIR)/memif/sys_memif.c | |
61 endif | |
62 | |
63 ifeq ($(CHIPSET),12) | |
64 SRC_ASM_DRIVER_INT_RAM += $(DRIVERS_CORE_DIR)/clkm/sys_wait_clkm.s | |
65 endif | |
66 | |
67 ifeq ($(findstring 1,$(TI_PROFILER) $(TI_NUC_MONITOR)),1) | |
68 SRC_NIQ32_INT_RAM += $(DRIVERS_CORE_DIR)/inth/niq32.c | |
69 else | |
70 SRC_DRIVER_FLASH += $(DRIVERS_CORE_DIR)/inth/niq32.c | |
71 endif | |
72 | |
73 ifeq ($(BOARD),34) | |
74 SRC_DRIVER_INT_RAM += $(DRIVERS_CORE_DIR)/clkm/clkm.c \ | |
75 $(DRIVERS_CORE_DIR)/armio/armio.c | |
76 else | |
77 ifeq ($(BOARD),35) | |
78 SRC_DRIVER_INT_RAM += $(DRIVERS_CORE_DIR)/clkm/clkm.c \ | |
79 $(DRIVERS_CORE_DIR)/armio/armio.c | |
80 else | |
81 SRC_DRIVER_FLASH += $(DRIVERS_CORE_DIR)/clkm/clkm.c \ | |
82 $(DRIVERS_CORE_DIR)/armio/armio.c | |
83 endif | |
84 endif | |
85 | |
86 # Objects definition | |
87 OBJ_DRIVER_FLASH := $(patsubst ../%.c,$(TEMPORARY_FILE_DIR)/%.obj,$(filter %.c,$(SRC_DRIVER_FLASH))) | |
88 CFG_OBJS += $(OBJ_DRIVER_FLASH) | |
89 CFG_DEPS += $(OBJ_DRIVER_FLASH:.obj=.d) | |
90 | |
91 OBJ_DRIVER_INT_RAM := $(patsubst ../%.c,$(TEMPORARY_FILE_DIR)/%.obj,$(filter %.c,$(SRC_DRIVER_INT_RAM))) | |
92 OBJ_ASM_DRIVER_INT_RAM := $(patsubst ../%.s,$(TEMPORARY_FILE_DIR)/%.obj,$(filter %.s,$(SRC_ASM_DRIVER_INT_RAM))) | |
93 CFG_OBJS += $(OBJ_DRIVER_INT_RAM) $(OBJ_ASM_DRIVER_INT_RAM) | |
94 CFG_DEPS += $(OBJ_DRIVER_INT_RAM:.obj=.d) | |
95 | |
96 OBJ_NIQ32_INT_RAM:= $(patsubst ../%.c,$(TEMPORARY_FILE_DIR)/%.obj,$(filter %.c,$(SRC_NIQ32_INT_RAM))) | |
97 CFG_OBJS += $(OBJ_NIQ_32_INT_RAM) | |
98 CFG_DEPS += $(OBJ_NIQ_32_INT_RAM:.obj=.d) | |
99 | |
100 OBJ_ABB_CORE:= $(patsubst ../%.c,$(TEMPORARY_FILE_DIR)/%.obj,$(filter %.c,$(SRC_ABB_CORE))) | |
101 CFG_OBJS += $(OBJ_ABB_CORE) | |
102 CFG_DEPS += $(OBJ_ABB_CORE:.obj=.d) | |
103 | |
104 #Sources that needs to be compiled into 32 bit state code | |
105 #They still must be added to the SRC_DRIVER_FLASH due to generation of libraries | |
106 SRC32 += $(DRIVERS_CORE_DIR)/inth/niq32.c $(DRIVERS_CORE_DIR)/inth/sys_inth32.c | |
107 OBJ32 := $(patsubst ../%.c,$(TEMPORARY_FILE_DIR)/%.obj,$(filter %.c,$(SRC32))) | |
108 | |
109 | |
110 ######## LIBRARIES ############# | |
111 $(DRIVER_FLASH) : $(OBJ_DRIVER_FLASH) $(OBJ_ABB_CORE) | |
112 $(MKDIR) $(dir $@) | |
113 $($(TP)LINKER) $($(TP)LFLAGS) $($(TP)LOUTOUT_FLAG)$@ $^ | |
114 | |
115 $(DRIVER_INT_RAM) : $(OBJ_DRIVER_INT_RAM) $(OBJ_ASM_DRIVER_INT_RAM) | |
116 $(MKDIR) $(dir $@) | |
117 $($(TP)LINKER) $($(TP)LFLAGS) $($(TP)LOUTOUT_FLAG)$@ $^ | |
118 | |
119 $(NIQ32_INT_RAM) : $(OBJ_NIQ32_INT_RAM) | |
120 $(MKDIR) $(dir $@) | |
121 $($(TP)LINKER) $($(TP)LFLAGS) $($(TP)LOUTOUT_FLAG)$@ $^ | |
122 | |
123 ######## OBJECTS ############# | |
124 $(filter-out $(OBJ32), $(OBJ_DRIVER_FLASH)) : $(TEMPORARY_FILE_DIR)/%.obj: ../%.c | |
125 $($(TP)COMPILER) $($(TP)DRIVERS_FLAGS) $($(TP)COUTPUT_FLAG)$(@D)/ $< | |
126 | |
127 $(filter-out $(OBJ32), $(OBJ_DRIVER_INT_RAM)) : $(TEMPORARY_FILE_DIR)/%.obj: ../%.c | |
128 $($(TP)COMPILER) $($(TP)DRIVERS_FLAGS) $($(TP)COUTPUT_FLAG)$(@D)/ $< | |
129 | |
130 $(OBJ32) : $(TEMPORARY_FILE_DIR)/%.obj: ../%.c | |
131 $($(TP)COMPILER) $($(TP)CFLAGS32) $($(TP)COUTPUT_FLAG)$(@D)/ $< | |
132 | |
133 $(OBJ_ABB_CORE) : $(TEMPORARY_FILE_DIR)/%.obj: ../%.c | |
134 $($(TP)COMPILER) $($(TP)ABB_FLAGS) $($(TP)COUTPUT_FLAG)$(@D)/ $< | |
135 | |
136 # WARNING : sys_wait_clkm.s is compiled thanks to default rule specified in top level makefile |