xref: /btstack/port/samv71-xplained-atwilc3000/example/template/config.mk (revision 0af04ee4d37be8d9457648a5a7a21f3a4ff171da)
1#
2# Copyright (c) 2011 Atmel Corporation. All rights reserved.
3#
4# \asf_license_start
5#
6# \page License
7#
8# Redistribution and use in source and binary forms, with or without
9# modification, are permitted provided that the following conditions are met:
10#
11# 1. Redistributions of source code must retain the above copyright notice,
12#    this list of conditions and the following disclaimer.
13#
14# 2. Redistributions in binary form must reproduce the above copyright notice,
15#    this list of conditions and the following disclaimer in the documentation
16#    and/or other materials provided with the distribution.
17#
18# 3. The name of Atmel may not be used to endorse or promote products derived
19#    from this software without specific prior written permission.
20#
21# 4. This software may only be redistributed and used in connection with an
22#    Atmel microcontroller product.
23#
24# THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
25# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
26# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
27# EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
28# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
32# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
33# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34# POSSIBILITY OF SUCH DAMAGE.
35#
36# \asf_license_stop
37#
38
39# Path to top level ASF directory relative to this project directory.
40PRJ_PATH = ../../ASF
41
42# Target CPU architecture: cortex-m3, cortex-m4
43ARCH = cortex-m7
44
45# Target part: none, sam3n4 or sam4l4aa
46PART = samv71q21
47
48# Application target name. Given with suffix .a for library and .elf for a
49# standalone application.
50TARGET_FLASH=le_counter_flash.elf
51TARGET_SRAM=le_counter_sram.elf
52
53# template main file
54CSRCS+=${BTSTACK_ROOT}/example/le_counter.c
55
56# List of C source files.
57CSRCS+= \
58       ../main.c 						                 \
59       common/services/clock/samv71/sysclk.c              \
60       common/services/serial/usart_serial.c              \
61       common/utils/interrupt/interrupt_sam_nvic.c        \
62       common/utils/stdio/read.c                          \
63       common/utils/stdio/write.c                         \
64       sam/boards/samv71_xplained_ultra/init.c            \
65       sam/drivers/matrix/matrix.c                        \
66       sam/drivers/mpu/mpu.c                              \
67       sam/drivers/pio/pio.c                              \
68       sam/drivers/pio/pio_handler.c                      \
69       sam/drivers/pmc/pmc.c                              \
70       sam/drivers/pmc/sleep.c                            \
71       sam/drivers/tc/tc.c                                \
72       sam/drivers/uart/uart.c                            \
73       sam/drivers/usart/usart.c                          \
74       sam/utils/cmsis/samv71/source/templates/gcc/startup_samv71.c \
75       sam/utils/cmsis/samv71/source/templates/system_samv71.c \
76       sam/utils/syscalls/gcc/syscalls.c                  \
77
78# List of assembler source files.
79ASSRCS =
80
81# List of include paths.
82INC_PATH = \
83       common/boards                                      \
84       common/services/clock                              \
85       common/services/gpio                               \
86       common/services/ioport                             \
87       common/services/delay                              \
88       common/services/serial                             \
89       common/services/serial/sam_uart                    \
90       common/utils                                       \
91       common/utils/stdio/stdio_serial                    \
92       sam/boards                                         \
93       sam/boards/samv71_xplained_ultra                   \
94       sam/drivers/matrix                                 \
95       sam/drivers/mpu                                    \
96       sam/drivers/pio                                    \
97       sam/drivers/pmc                                    \
98       sam/drivers/tc                                     \
99       sam/drivers/uart                                   \
100       sam/drivers/usart                                  \
101       sam/drivers/xdmac                                  \
102       sam/utils                                          \
103       sam/utils/cmsis/samv71/include                     \
104       sam/utils/cmsis/samv71/source/templates            \
105       sam/utils/fpu                                      \
106       sam/utils/header_files                             \
107       sam/utils/preprocessor                             \
108       thirdparty/CMSIS/Include                           \
109       thirdparty/CMSIS/Lib/GCC \
110       ..
111
112BTSTACK_ROOT = ../../../
113INC_PATH += ${BTSTACK_ROOT}/src/ble
114INC_PATH += ${BTSTACK_ROOT}/src/ble/gatt-service
115INC_PATH += ${BTSTACK_ROOT}/src/classic
116INC_PATH += ${BTSTACK_ROOT}/src
117INC_PATH += ${BTSTACK_ROOT}/3rd-party/micro-ecc
118INC_PATH += ${BTSTACK_ROOT}/platform/embedded
119INC_PATH += ${BTSTACK_ROOT}/chipset/atwilc3000
120INC_PATH += ${BTSTACK_ROOT}/port/samv71-xplained-atwilc3000/example/le_counter
121INC_PATH += ${BTSTACK_ROOT}/3rd-party/hxcmod-player
122INC_PATH += ${BTSTACK_ROOT}/3rd-party/hxcmod-player/mods
123INC_PATH += ${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/include
124INC_PATH += ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/include
125
126
127# VPATH += ${BTSTACK_ROOT}/src
128# VPATH += ${BTSTACK_ROOT}/src/ble
129# VPATH += ${BTSTACK_ROOT}/src/ble/gatt-service
130# VPATH += ${BTSTACK_ROOT}/src/classic
131# VPATH += ${BTSTACK_ROOT}/platform/embedded
132# VPATH += ${BTSTACK_ROOT}/example
133# VPATH += ${BTSTACK_ROOT}/3rd-party/micro-ecc
134
135CSRCS += \
136	${BTSTACK_ROOT}/3rd-party/hxcmod-player/hxcmod.c 						\
137	${BTSTACK_ROOT}/3rd-party/hxcmod-player/mods/nao-deceased_by_disease.c 	\
138	${BTSTACK_ROOT}/chipset/atwilc3000/btstack_chipset_atwilc3000.c \
139	${BTSTACK_ROOT}/chipset/atwilc3000/wilc3000_bt_firmware.c \
140	${BTSTACK_ROOT}/example/sco_demo_util.c \
141	${BTSTACK_ROOT}/platform/embedded/btstack_run_loop_embedded.c \
142	${BTSTACK_ROOT}/platform/embedded/btstack_uart_block_embedded.c \
143	${BTSTACK_ROOT}/src/ad_parser.c \
144	${BTSTACK_ROOT}/src/ble/ancs_client.c \
145	${BTSTACK_ROOT}/src/ble/att_db.c \
146	${BTSTACK_ROOT}/src/ble/att_dispatch.c \
147	${BTSTACK_ROOT}/src/ble/att_server.c \
148	${BTSTACK_ROOT}/src/ble/gatt-service/battery_service_server.c \
149	${BTSTACK_ROOT}/src/ble/gatt-service/device_information_service_server.c \
150	${BTSTACK_ROOT}/src/ble/gatt_client.c \
151	${BTSTACK_ROOT}/src/ble/le_device_db_memory.c \
152	${BTSTACK_ROOT}/src/ble/sm.c \
153	${BTSTACK_ROOT}/src/btstack_linked_list.c \
154	${BTSTACK_ROOT}/src/btstack_memory.c \
155	${BTSTACK_ROOT}/src/btstack_memory_pool.c \
156	${BTSTACK_ROOT}/src/btstack_ring_buffer.c \
157	${BTSTACK_ROOT}/src/btstack_run_loop.c \
158	${BTSTACK_ROOT}/src/btstack_util.c \
159	${BTSTACK_ROOT}/src/classic/a2dp_sink.c  		\
160	${BTSTACK_ROOT}/src/classic/a2dp_source.c 		\
161	${BTSTACK_ROOT}/src/classic/avdtp.c  			\
162	${BTSTACK_ROOT}/src/classic/avdtp_acceptor.c  	\
163	${BTSTACK_ROOT}/src/classic/avdtp_initiator.c 	\
164	${BTSTACK_ROOT}/src/classic/avdtp_sink.c  		\
165	${BTSTACK_ROOT}/src/classic/avdtp_source.c 		\
166	${BTSTACK_ROOT}/src/classic/avdtp_util.c  		\
167	${BTSTACK_ROOT}/src/classic/avrcp.c \
168	${BTSTACK_ROOT}/src/classic/avrcp_controller.c \
169	${BTSTACK_ROOT}/src/classic/avrcp_target.c \
170	${BTSTACK_ROOT}/src/classic/btstack_sbc_bludroid.c \
171	${BTSTACK_ROOT}/src/classic/btstack_sbc_plc.c \
172	${BTSTACK_ROOT}/src/classic/hfp.c \
173	${BTSTACK_ROOT}/src/classic/hfp_ag.c \
174	${BTSTACK_ROOT}/src/classic/hfp_hf.c \
175	${BTSTACK_ROOT}/src/classic/hfp_msbc.c \
176	${BTSTACK_ROOT}/src/classic/hfp_gsm_model.c \
177	${BTSTACK_ROOT}/src/classic/hsp_hs.c \
178	${BTSTACK_ROOT}/src/classic/hsp_ag.c \
179	${BTSTACK_ROOT}/src/classic/goep_client.c \
180	${BTSTACK_ROOT}/src/classic/obex_iterator.c \
181	${BTSTACK_ROOT}/src/classic/pbap_client.c \
182	${BTSTACK_ROOT}/src/classic/rfcomm.c                  \
183	${BTSTACK_ROOT}/src/classic/sdp_client.c              \
184	${BTSTACK_ROOT}/src/classic/sdp_client_rfcomm.c       \
185	${BTSTACK_ROOT}/src/classic/sdp_server.c              \
186	${BTSTACK_ROOT}/src/classic/sdp_util.c              \
187	${BTSTACK_ROOT}/src/classic/spp_server.c            \
188	${BTSTACK_ROOT}/src/hci.c \
189	${BTSTACK_ROOT}/src/hci_cmd.c \
190	${BTSTACK_ROOT}/src/hci_dump.c \
191	${BTSTACK_ROOT}/src/hci_transport_h4.c \
192	${BTSTACK_ROOT}/src/l2cap.c \
193	${BTSTACK_ROOT}/src/l2cap_signaling.c \
194    ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce/alloc.c \
195    ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce/bitalloc-sbc.c \
196    ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce/bitalloc.c \
197    ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce/bitstream-decode.c \
198    ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce/decoder-oina.c \
199    ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce/decoder-private.c \
200    ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce/decoder-sbc.c \
201    ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce/dequant.c \
202    ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce/framing-sbc.c \
203    ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce/framing.c \
204    ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce/oi_codec_version.c \
205    ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce/synthesis-8-generated.c \
206    ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce/synthesis-dct8.c \
207    ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce/synthesis-sbc.c \
208    ${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/srce/sbc_analysis.c           \
209    ${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/srce/sbc_dct.c                \
210    ${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/srce/sbc_dct_coeffs.c         \
211    ${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/srce/sbc_enc_bit_alloc_mono.c \
212    ${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/srce/sbc_enc_bit_alloc_ste.c  \
213    ${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/srce/sbc_enc_coeffs.c         \
214    ${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/srce/sbc_encoder.c            \
215    ${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/srce/sbc_packing.c            \
216
217# Additional search paths for libraries.
218LIB_PATH =  \
219       thirdparty/CMSIS/Lib/GCC
220
221# List of libraries to use during linking.
222LIBS =  \
223       arm_cortexM7lfsp_math_softfp                       \
224       m
225
226# Path relative to top level directory pointing to a linker script.
227LINKER_SCRIPT_FLASH = sam/utils/linker_scripts/samv71/samv71q21/gcc/flash.ld
228LINKER_SCRIPT_SRAM  = sam/utils/linker_scripts/samv71/samv71q21/gcc/sram.ld
229
230# Path relative to top level directory pointing to a linker script.
231DEBUG_SCRIPT_FLASH = sam/boards/samv71_xplained_ultra/debug_scripts/gcc/samv71_xplained_ultra_flash.gdb
232DEBUG_SCRIPT_SRAM  = sam/boards/samv71_xplained_ultra/debug_scripts/gcc/samv71_xplained_ultra_sram.gdb
233
234# Project type parameter: all, sram or flash
235PROJECT_TYPE        = flash
236
237# Additional options for debugging. By default the common Makefile.in will
238# add -g3.
239DBGFLAGS =
240
241# Application optimization used during compilation and linking:
242# -O0, -O1, -O2, -O3 or -Os
243OPTIMIZATION = -O1
244
245# Extra flags to use when archiving.
246ARFLAGS =
247
248# Extra flags to use when assembling.
249ASFLAGS =  \
250       -mfloat-abi=softfp                                 \
251       -mfpu=fpv5-sp-d16
252
253# Extra flags to use when compiling.
254CFLAGS =  \
255       -mfloat-abi=softfp                                 \
256       -mfpu=fpv5-sp-d16
257
258# Extra flags to use when preprocessing.
259#
260# Preprocessor symbol definitions
261#   To add a definition use the format "-D name[=definition]".
262#   To cancel a definition use the format "-U name".
263#
264# The most relevant symbols to define for the preprocessor are:
265#   BOARD      Target board in use, see boards/board.h for a list.
266#   EXT_BOARD  Optional extension board in use, see boards/board.h for a list.
267CPPFLAGS = \
268       -D ARM_MATH_CM7=true                               \
269       -D BOARD=SAMV71_XPLAINED_ULTRA                     \
270       -D __SAMV71Q21__                                   \
271       -D printf=iprintf                                  \
272       -D scanf=iscanf
273
274# Extra flags to use when linking
275LDFLAGS = \
276
277# Pre- and post-build commands
278PREBUILD_CMD =
279POSTBUILD_CMD =
280
281