xref: /btstack/port/samv71-xplained-atwilc3000/example/template/config.mk (revision 6f952a23314b87836b8aa6723aff941841330aab)
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 + firmware file
54BTSTACK_ROOT_CONFIG = ../../../
55CSRCS+=${BTSTACK_ROOT_CONFIG}/example/le_counter.c
56CSRCS+=${BTSTACK_ROOT_CONFIG}/port/samv71-xplained-atwilc3000/example/template/wilc3000_bt_firmware.c
57
58# List of C source files.
59CSRCS+= \
60       ../main.c 						                 \
61       common/services/clock/samv71/sysclk.c              \
62       common/services/serial/usart_serial.c              \
63       common/utils/interrupt/interrupt_sam_nvic.c        \
64       common/utils/stdio/read.c                          \
65       common/utils/stdio/write.c                         \
66       sam/boards/samv71_xplained_ultra/init.c            \
67       sam/drivers/matrix/matrix.c                        \
68       sam/drivers/mpu/mpu.c                              \
69       sam/drivers/pio/pio.c                              \
70       sam/drivers/pio/pio_handler.c                      \
71       sam/drivers/pmc/pmc.c                              \
72       sam/drivers/pmc/sleep.c                            \
73       sam/drivers/tc/tc.c                                \
74       sam/drivers/uart/uart.c                            \
75       sam/drivers/usart/usart.c                          \
76       sam/utils/cmsis/samv71/source/templates/gcc/startup_samv71.c \
77       sam/utils/cmsis/samv71/source/templates/system_samv71.c \
78       sam/utils/syscalls/gcc/syscalls.c                  \
79
80# List of assembler source files.
81ASSRCS =
82
83# List of include paths.
84INC_PATH = \
85       common/boards                                      \
86       common/services/clock                              \
87       common/services/gpio                               \
88       common/services/ioport                             \
89       common/services/delay                              \
90       common/services/serial                             \
91       common/services/serial/sam_uart                    \
92       common/utils                                       \
93       common/utils/stdio/stdio_serial                    \
94       sam/boards                                         \
95       sam/boards/samv71_xplained_ultra                   \
96       sam/drivers/matrix                                 \
97       sam/drivers/mpu                                    \
98       sam/drivers/pio                                    \
99       sam/drivers/pmc                                    \
100       sam/drivers/tc                                     \
101       sam/drivers/uart                                   \
102       sam/drivers/usart                                  \
103       sam/drivers/xdmac                                  \
104       sam/utils                                          \
105       sam/utils/cmsis/samv71/include                     \
106       sam/utils/cmsis/samv71/source/templates            \
107       sam/utils/fpu                                      \
108       sam/utils/header_files                             \
109       sam/utils/preprocessor                             \
110       thirdparty/CMSIS/Include                           \
111       thirdparty/CMSIS/Lib/GCC  						  \
112	   ..
113
114INC_PATH += ${BTSTACK_ROOT_CONFIG}/src/ble
115INC_PATH += ${BTSTACK_ROOT_CONFIG}/src/ble/gatt-service
116INC_PATH += ${BTSTACK_ROOT_CONFIG}/src/classic
117INC_PATH += ${BTSTACK_ROOT_CONFIG}/src
118INC_PATH += ${BTSTACK_ROOT_CONFIG}/3rd-party/micro-ecc
119INC_PATH += ${BTSTACK_ROOT_CONFIG}/platform/embedded
120INC_PATH += ${BTSTACK_ROOT_CONFIG}/chipset/atwilc3000
121INC_PATH += ${BTSTACK_ROOT_CONFIG}/port/samv71-xplained-atwilc3000/example/template
122INC_PATH += ${BTSTACK_ROOT_CONFIG}/3rd-party/hxcmod-player
123INC_PATH += ${BTSTACK_ROOT_CONFIG}/3rd-party/hxcmod-player/mods
124INC_PATH += ${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/encoder/include
125INC_PATH += ${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/decoder/include
126
127
128# VPATH += ${BTSTACK_ROOT_CONFIG}/src
129# VPATH += ${BTSTACK_ROOT_CONFIG}/src/ble
130# VPATH += ${BTSTACK_ROOT_CONFIG}/src/ble/gatt-service
131# VPATH += ${BTSTACK_ROOT_CONFIG}/src/classic
132# VPATH += ${BTSTACK_ROOT_CONFIG}/platform/embedded
133# VPATH += ${BTSTACK_ROOT_CONFIG}/example
134# VPATH += ${BTSTACK_ROOT_CONFIG}/3rd-party/micro-ecc
135
136CSRCS += \
137	${BTSTACK_ROOT_CONFIG}/3rd-party/hxcmod-player/hxcmod.c 						\
138	${BTSTACK_ROOT_CONFIG}/3rd-party/hxcmod-player/mods/nao-deceased_by_disease.c 	\
139	${BTSTACK_ROOT_CONFIG}/chipset/atwilc3000/btstack_chipset_atwilc3000.c \
140	${BTSTACK_ROOT_CONFIG}/example/sco_demo_util.c \
141	${BTSTACK_ROOT_CONFIG}/platform/embedded/btstack_run_loop_embedded.c \
142	${BTSTACK_ROOT_CONFIG}/platform/embedded/btstack_uart_block_embedded.c \
143	${BTSTACK_ROOT_CONFIG}/src/ad_parser.c \
144	${BTSTACK_ROOT_CONFIG}/src/ble/ancs_client.c \
145	${BTSTACK_ROOT_CONFIG}/src/ble/att_db.c \
146	${BTSTACK_ROOT_CONFIG}/src/ble/att_dispatch.c \
147	${BTSTACK_ROOT_CONFIG}/src/ble/att_server.c \
148	${BTSTACK_ROOT_CONFIG}/src/ble/gatt-service/battery_service_server.c \
149	${BTSTACK_ROOT_CONFIG}/src/ble/gatt-service/device_information_service_server.c \
150	${BTSTACK_ROOT_CONFIG}/src/ble/gatt_client.c \
151	${BTSTACK_ROOT_CONFIG}/src/ble/le_device_db_memory.c \
152	${BTSTACK_ROOT_CONFIG}/src/ble/sm.c \
153	${BTSTACK_ROOT_CONFIG}/src/btstack_linked_list.c \
154	${BTSTACK_ROOT_CONFIG}/src/btstack_memory.c \
155	${BTSTACK_ROOT_CONFIG}/src/btstack_memory_pool.c \
156	${BTSTACK_ROOT_CONFIG}/src/btstack_ring_buffer.c \
157	${BTSTACK_ROOT_CONFIG}/src/btstack_run_loop.c \
158	${BTSTACK_ROOT_CONFIG}/src/btstack_util.c \
159	${BTSTACK_ROOT_CONFIG}/src/classic/a2dp_sink.c  		\
160	${BTSTACK_ROOT_CONFIG}/src/classic/a2dp_source.c 		\
161	${BTSTACK_ROOT_CONFIG}/src/classic/avdtp.c  			\
162	${BTSTACK_ROOT_CONFIG}/src/classic/avdtp_acceptor.c  	\
163	${BTSTACK_ROOT_CONFIG}/src/classic/avdtp_initiator.c 	\
164	${BTSTACK_ROOT_CONFIG}/src/classic/avdtp_sink.c  		\
165	${BTSTACK_ROOT_CONFIG}/src/classic/avdtp_source.c 		\
166	${BTSTACK_ROOT_CONFIG}/src/classic/avdtp_util.c  		\
167	${BTSTACK_ROOT_CONFIG}/src/classic/avrcp.c \
168	${BTSTACK_ROOT_CONFIG}/src/classic/avrcp_controller.c \
169	${BTSTACK_ROOT_CONFIG}/src/classic/avrcp_target.c \
170	${BTSTACK_ROOT_CONFIG}/src/classic/btstack_sbc_bludroid.c \
171	${BTSTACK_ROOT_CONFIG}/src/classic/btstack_sbc_plc.c \
172	${BTSTACK_ROOT_CONFIG}/src/classic/hfp.c \
173	${BTSTACK_ROOT_CONFIG}/src/classic/hfp_ag.c \
174	${BTSTACK_ROOT_CONFIG}/src/classic/hfp_hf.c \
175	${BTSTACK_ROOT_CONFIG}/src/classic/hfp_msbc.c \
176	${BTSTACK_ROOT_CONFIG}/src/classic/hfp_gsm_model.c \
177	${BTSTACK_ROOT_CONFIG}/src/classic/hsp_hs.c \
178	${BTSTACK_ROOT_CONFIG}/src/classic/hsp_ag.c \
179	${BTSTACK_ROOT_CONFIG}/src/classic/btstack_link_key_db_memory.c \
180	${BTSTACK_ROOT_CONFIG}/src/classic/goep_client.c \
181	${BTSTACK_ROOT_CONFIG}/src/classic/obex_iterator.c \
182	${BTSTACK_ROOT_CONFIG}/src/classic/pbap_client.c \
183	${BTSTACK_ROOT_CONFIG}/src/classic/rfcomm.c                  \
184	${BTSTACK_ROOT_CONFIG}/src/classic/sdp_client.c              \
185	${BTSTACK_ROOT_CONFIG}/src/classic/sdp_client_rfcomm.c       \
186	${BTSTACK_ROOT_CONFIG}/src/classic/sdp_server.c              \
187	${BTSTACK_ROOT_CONFIG}/src/classic/sdp_util.c              \
188	${BTSTACK_ROOT_CONFIG}/src/classic/spp_server.c            \
189	${BTSTACK_ROOT_CONFIG}/src/hci.c \
190	${BTSTACK_ROOT_CONFIG}/src/hci_cmd.c \
191	${BTSTACK_ROOT_CONFIG}/src/hci_dump.c \
192	${BTSTACK_ROOT_CONFIG}/src/hci_transport_h4.c \
193	${BTSTACK_ROOT_CONFIG}/src/l2cap.c \
194	${BTSTACK_ROOT_CONFIG}/src/l2cap_signaling.c \
195    ${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/decoder/srce/alloc.c \
196    ${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/decoder/srce/bitalloc-sbc.c \
197    ${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/decoder/srce/bitalloc.c \
198    ${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/decoder/srce/bitstream-decode.c \
199    ${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/decoder/srce/decoder-oina.c \
200    ${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/decoder/srce/decoder-private.c \
201    ${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/decoder/srce/decoder-sbc.c \
202    ${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/decoder/srce/dequant.c \
203    ${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/decoder/srce/framing-sbc.c \
204    ${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/decoder/srce/framing.c \
205    ${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/decoder/srce/oi_codec_version.c \
206    ${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/decoder/srce/synthesis-8-generated.c \
207    ${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/decoder/srce/synthesis-dct8.c \
208    ${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/decoder/srce/synthesis-sbc.c \
209    ${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/encoder/srce/sbc_analysis.c           \
210    ${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/encoder/srce/sbc_dct.c                \
211    ${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/encoder/srce/sbc_dct_coeffs.c         \
212    ${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/encoder/srce/sbc_enc_bit_alloc_mono.c \
213    ${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/encoder/srce/sbc_enc_bit_alloc_ste.c  \
214    ${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/encoder/srce/sbc_enc_coeffs.c         \
215    ${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/encoder/srce/sbc_encoder.c            \
216    ${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/encoder/srce/sbc_packing.c            \
217
218# Additional search paths for libraries.
219LIB_PATH =  \
220       thirdparty/CMSIS/Lib/GCC
221
222# List of libraries to use during linking.
223LIBS =  \
224       arm_cortexM7lfsp_math_softfp                       \
225       m
226
227# Path relative to top level directory pointing to a linker script.
228LINKER_SCRIPT_FLASH = sam/utils/linker_scripts/samv71/samv71q21/gcc/flash.ld
229LINKER_SCRIPT_SRAM  = sam/utils/linker_scripts/samv71/samv71q21/gcc/sram.ld
230
231# Path relative to top level directory pointing to a linker script.
232DEBUG_SCRIPT_FLASH = sam/boards/samv71_xplained_ultra/debug_scripts/gcc/samv71_xplained_ultra_flash.gdb
233DEBUG_SCRIPT_SRAM  = sam/boards/samv71_xplained_ultra/debug_scripts/gcc/samv71_xplained_ultra_sram.gdb
234
235# Project type parameter: all, sram or flash
236PROJECT_TYPE        = flash
237
238# Additional options for debugging. By default the common Makefile.in will
239# add -g3.
240DBGFLAGS =
241
242# Application optimization used during compilation and linking:
243# -O0, -O1, -O2, -O3 or -Os
244OPTIMIZATION = -O1
245
246# Extra flags to use when archiving.
247ARFLAGS =
248
249# Extra flags to use when assembling.
250ASFLAGS =  \
251       -mfloat-abi=softfp                                 \
252       -mfpu=fpv5-sp-d16
253
254# Extra flags to use when compiling.
255CFLAGS =  \
256       -mfloat-abi=softfp                                 \
257       -mfpu=fpv5-sp-d16
258
259# Extra flags to use when preprocessing.
260#
261# Preprocessor symbol definitions
262#   To add a definition use the format "-D name[=definition]".
263#   To cancel a definition use the format "-U name".
264#
265# The most relevant symbols to define for the preprocessor are:
266#   BOARD      Target board in use, see boards/board.h for a list.
267#   EXT_BOARD  Optional extension board in use, see boards/board.h for a list.
268CPPFLAGS = \
269       -D ARM_MATH_CM7=true                               \
270       -D BOARD=SAMV71_XPLAINED_ULTRA                     \
271       -D __SAMV71Q21__                                   \
272       -D printf=iprintf                                  \
273       -D scanf=iscanf
274
275# Extra flags to use when linking
276LDFLAGS = \
277
278# Pre- and post-build commands
279PREBUILD_CMD =
280POSTBUILD_CMD =
281