17d0ceef1SMatthias Ringwald# 27d0ceef1SMatthias Ringwald# Copyright (c) 2011 Atmel Corporation. All rights reserved. 37d0ceef1SMatthias Ringwald# 47d0ceef1SMatthias Ringwald# \asf_license_start 57d0ceef1SMatthias Ringwald# 67d0ceef1SMatthias Ringwald# \page License 77d0ceef1SMatthias Ringwald# 87d0ceef1SMatthias Ringwald# Redistribution and use in source and binary forms, with or without 97d0ceef1SMatthias Ringwald# modification, are permitted provided that the following conditions are met: 107d0ceef1SMatthias Ringwald# 117d0ceef1SMatthias Ringwald# 1. Redistributions of source code must retain the above copyright notice, 127d0ceef1SMatthias Ringwald# this list of conditions and the following disclaimer. 137d0ceef1SMatthias Ringwald# 147d0ceef1SMatthias Ringwald# 2. Redistributions in binary form must reproduce the above copyright notice, 157d0ceef1SMatthias Ringwald# this list of conditions and the following disclaimer in the documentation 167d0ceef1SMatthias Ringwald# and/or other materials provided with the distribution. 177d0ceef1SMatthias Ringwald# 187d0ceef1SMatthias Ringwald# 3. The name of Atmel may not be used to endorse or promote products derived 197d0ceef1SMatthias Ringwald# from this software without specific prior written permission. 207d0ceef1SMatthias Ringwald# 217d0ceef1SMatthias Ringwald# 4. This software may only be redistributed and used in connection with an 227d0ceef1SMatthias Ringwald# Atmel microcontroller product. 237d0ceef1SMatthias Ringwald# 247d0ceef1SMatthias Ringwald# THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 257d0ceef1SMatthias Ringwald# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 267d0ceef1SMatthias Ringwald# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 277d0ceef1SMatthias Ringwald# EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 287d0ceef1SMatthias Ringwald# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 297d0ceef1SMatthias Ringwald# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 307d0ceef1SMatthias Ringwald# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 317d0ceef1SMatthias Ringwald# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 327d0ceef1SMatthias Ringwald# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 337d0ceef1SMatthias Ringwald# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 347d0ceef1SMatthias Ringwald# POSSIBILITY OF SUCH DAMAGE. 357d0ceef1SMatthias Ringwald# 367d0ceef1SMatthias Ringwald# \asf_license_stop 377d0ceef1SMatthias Ringwald# 387d0ceef1SMatthias Ringwald 397d0ceef1SMatthias Ringwald# Path to top level ASF directory relative to this project directory. 407d0ceef1SMatthias RingwaldPRJ_PATH = ../../ASF 417d0ceef1SMatthias Ringwald 427d0ceef1SMatthias Ringwald# Target CPU architecture: cortex-m3, cortex-m4 437d0ceef1SMatthias RingwaldARCH = cortex-m7 447d0ceef1SMatthias Ringwald 457d0ceef1SMatthias Ringwald# Target part: none, sam3n4 or sam4l4aa 467d0ceef1SMatthias RingwaldPART = samv71q21 477d0ceef1SMatthias Ringwald 487d0ceef1SMatthias Ringwald# Application target name. Given with suffix .a for library and .elf for a 497d0ceef1SMatthias Ringwald# standalone application. 507d0ceef1SMatthias RingwaldTARGET_FLASH=le_counter_flash.elf 517d0ceef1SMatthias RingwaldTARGET_SRAM=le_counter_sram.elf 527d0ceef1SMatthias Ringwald 530f165ceaSMatthias Ringwald# template main file + firmware file 540f165ceaSMatthias RingwaldBTSTACK_ROOT_CONFIG = ../../../ 550f165ceaSMatthias RingwaldCSRCS+=${BTSTACK_ROOT_CONFIG}/example/le_counter.c 560af04ee4SMatthias Ringwald 577d0ceef1SMatthias Ringwald# List of C source files. 580af04ee4SMatthias RingwaldCSRCS+= \ 590af04ee4SMatthias Ringwald ../main.c \ 607d0ceef1SMatthias Ringwald common/services/clock/samv71/sysclk.c \ 617d0ceef1SMatthias Ringwald common/services/serial/usart_serial.c \ 627d0ceef1SMatthias Ringwald common/utils/interrupt/interrupt_sam_nvic.c \ 637d0ceef1SMatthias Ringwald common/utils/stdio/read.c \ 647d0ceef1SMatthias Ringwald common/utils/stdio/write.c \ 657d0ceef1SMatthias Ringwald sam/boards/samv71_xplained_ultra/init.c \ 667d0ceef1SMatthias Ringwald sam/drivers/matrix/matrix.c \ 677d0ceef1SMatthias Ringwald sam/drivers/mpu/mpu.c \ 687d0ceef1SMatthias Ringwald sam/drivers/pio/pio.c \ 697d0ceef1SMatthias Ringwald sam/drivers/pio/pio_handler.c \ 707d0ceef1SMatthias Ringwald sam/drivers/pmc/pmc.c \ 717d0ceef1SMatthias Ringwald sam/drivers/pmc/sleep.c \ 727d0ceef1SMatthias Ringwald sam/drivers/tc/tc.c \ 737d0ceef1SMatthias Ringwald sam/drivers/uart/uart.c \ 747d0ceef1SMatthias Ringwald sam/drivers/usart/usart.c \ 757d0ceef1SMatthias Ringwald sam/utils/cmsis/samv71/source/templates/gcc/startup_samv71.c \ 767d0ceef1SMatthias Ringwald sam/utils/cmsis/samv71/source/templates/system_samv71.c \ 777d0ceef1SMatthias Ringwald sam/utils/syscalls/gcc/syscalls.c \ 787d0ceef1SMatthias Ringwald 797d0ceef1SMatthias Ringwald# List of assembler source files. 807d0ceef1SMatthias RingwaldASSRCS = 817d0ceef1SMatthias Ringwald 827d0ceef1SMatthias Ringwald# List of include paths. 837d0ceef1SMatthias RingwaldINC_PATH = \ 847d0ceef1SMatthias Ringwald common/boards \ 857d0ceef1SMatthias Ringwald common/services/clock \ 867d0ceef1SMatthias Ringwald common/services/gpio \ 877d0ceef1SMatthias Ringwald common/services/ioport \ 887d0ceef1SMatthias Ringwald common/services/delay \ 897d0ceef1SMatthias Ringwald common/services/serial \ 907d0ceef1SMatthias Ringwald common/services/serial/sam_uart \ 917d0ceef1SMatthias Ringwald common/utils \ 927d0ceef1SMatthias Ringwald common/utils/stdio/stdio_serial \ 937d0ceef1SMatthias Ringwald sam/boards \ 947d0ceef1SMatthias Ringwald sam/boards/samv71_xplained_ultra \ 957d0ceef1SMatthias Ringwald sam/drivers/matrix \ 967d0ceef1SMatthias Ringwald sam/drivers/mpu \ 977d0ceef1SMatthias Ringwald sam/drivers/pio \ 987d0ceef1SMatthias Ringwald sam/drivers/pmc \ 997d0ceef1SMatthias Ringwald sam/drivers/tc \ 1007d0ceef1SMatthias Ringwald sam/drivers/uart \ 1017d0ceef1SMatthias Ringwald sam/drivers/usart \ 1027d0ceef1SMatthias Ringwald sam/drivers/xdmac \ 1037d0ceef1SMatthias Ringwald sam/utils \ 1047d0ceef1SMatthias Ringwald sam/utils/cmsis/samv71/include \ 1057d0ceef1SMatthias Ringwald sam/utils/cmsis/samv71/source/templates \ 1067d0ceef1SMatthias Ringwald sam/utils/fpu \ 1077d0ceef1SMatthias Ringwald sam/utils/header_files \ 1087d0ceef1SMatthias Ringwald sam/utils/preprocessor \ 1097d0ceef1SMatthias Ringwald thirdparty/CMSIS/Include \ 1107d0ceef1SMatthias Ringwald thirdparty/CMSIS/Lib/GCC \ 1117d0ceef1SMatthias Ringwald .. 1127d0ceef1SMatthias Ringwald 1130f165ceaSMatthias RingwaldINC_PATH += ${BTSTACK_ROOT_CONFIG}/src/ble 1140f165ceaSMatthias RingwaldINC_PATH += ${BTSTACK_ROOT_CONFIG}/src/ble/gatt-service 1150f165ceaSMatthias RingwaldINC_PATH += ${BTSTACK_ROOT_CONFIG}/src 1160f165ceaSMatthias RingwaldINC_PATH += ${BTSTACK_ROOT_CONFIG}/3rd-party/micro-ecc 1170f165ceaSMatthias RingwaldINC_PATH += ${BTSTACK_ROOT_CONFIG}/platform/embedded 1180f165ceaSMatthias RingwaldINC_PATH += ${BTSTACK_ROOT_CONFIG}/chipset/atwilc3000 1190f165ceaSMatthias RingwaldINC_PATH += ${BTSTACK_ROOT_CONFIG}/port/samv71-xplained-atwilc3000/example/template 1200af04ee4SMatthias Ringwald 1217d0ceef1SMatthias Ringwald 1220f165ceaSMatthias Ringwald# VPATH += ${BTSTACK_ROOT_CONFIG}/src 1230f165ceaSMatthias Ringwald# VPATH += ${BTSTACK_ROOT_CONFIG}/src/ble 1240f165ceaSMatthias Ringwald# VPATH += ${BTSTACK_ROOT_CONFIG}/src/ble/gatt-service 1250f165ceaSMatthias Ringwald# VPATH += ${BTSTACK_ROOT_CONFIG}/src/classic 1260f165ceaSMatthias Ringwald# VPATH += ${BTSTACK_ROOT_CONFIG}/platform/embedded 1270f165ceaSMatthias Ringwald# VPATH += ${BTSTACK_ROOT_CONFIG}/example 1280f165ceaSMatthias Ringwald# VPATH += ${BTSTACK_ROOT_CONFIG}/3rd-party/micro-ecc 1297d0ceef1SMatthias Ringwald 1307d0ceef1SMatthias RingwaldCSRCS += \ 1310f165ceaSMatthias Ringwald ${BTSTACK_ROOT_CONFIG}/chipset/atwilc3000/btstack_chipset_atwilc3000.c \ 1320f165ceaSMatthias Ringwald ${BTSTACK_ROOT_CONFIG}/platform/embedded/btstack_run_loop_embedded.c \ 1330f165ceaSMatthias Ringwald ${BTSTACK_ROOT_CONFIG}/platform/embedded/btstack_uart_block_embedded.c \ 13425d9a2cdSMatthias Ringwald ${BTSTACK_ROOT_CONFIG}/platform/embedded/hci_dump_embedded_stdout.c \ 1350f165ceaSMatthias Ringwald ${BTSTACK_ROOT_CONFIG}/src/ad_parser.c \ 1360f165ceaSMatthias Ringwald ${BTSTACK_ROOT_CONFIG}/src/ble/att_db.c \ 1370f165ceaSMatthias Ringwald ${BTSTACK_ROOT_CONFIG}/src/ble/att_dispatch.c \ 1380f165ceaSMatthias Ringwald ${BTSTACK_ROOT_CONFIG}/src/ble/att_server.c \ 139*02a896b6SMatthias Ringwald ${BTSTACK_ROOT_CONFIG}/src/ble/gatt-service/ancs_client.c \ 1400f165ceaSMatthias Ringwald ${BTSTACK_ROOT_CONFIG}/src/ble/gatt-service/battery_service_server.c \ 1410f165ceaSMatthias Ringwald ${BTSTACK_ROOT_CONFIG}/src/ble/gatt-service/device_information_service_server.c \ 142a66bb805SMatthias Ringwald ${BTSTACK_ROOT_CONFIG}/src/ble/gatt-service/hids_device.c \ 1430f165ceaSMatthias Ringwald ${BTSTACK_ROOT_CONFIG}/src/ble/gatt_client.c \ 1440f165ceaSMatthias Ringwald ${BTSTACK_ROOT_CONFIG}/src/ble/le_device_db_memory.c \ 1450f165ceaSMatthias Ringwald ${BTSTACK_ROOT_CONFIG}/src/ble/sm.c \ 146a66bb805SMatthias Ringwald ${BTSTACK_ROOT_CONFIG}/src/btstack_crypto.c \ 1470f165ceaSMatthias Ringwald ${BTSTACK_ROOT_CONFIG}/src/btstack_linked_list.c \ 1480f165ceaSMatthias Ringwald ${BTSTACK_ROOT_CONFIG}/src/btstack_memory.c \ 1490f165ceaSMatthias Ringwald ${BTSTACK_ROOT_CONFIG}/src/btstack_memory_pool.c \ 1500f165ceaSMatthias Ringwald ${BTSTACK_ROOT_CONFIG}/src/btstack_ring_buffer.c \ 1510f165ceaSMatthias Ringwald ${BTSTACK_ROOT_CONFIG}/src/btstack_run_loop.c \ 1520f165ceaSMatthias Ringwald ${BTSTACK_ROOT_CONFIG}/src/btstack_util.c \ 153e07b53a6SMatthias Ringwald ${BTSTACK_ROOT_CONFIG}/src/btstack_tlv.c \ 1540f165ceaSMatthias Ringwald ${BTSTACK_ROOT_CONFIG}/src/hci.c \ 1550f165ceaSMatthias Ringwald ${BTSTACK_ROOT_CONFIG}/src/hci_cmd.c \ 1560f165ceaSMatthias Ringwald ${BTSTACK_ROOT_CONFIG}/src/hci_dump.c \ 1570f165ceaSMatthias Ringwald ${BTSTACK_ROOT_CONFIG}/src/hci_transport_h4.c \ 1580f165ceaSMatthias Ringwald ${BTSTACK_ROOT_CONFIG}/src/l2cap.c \ 1590f165ceaSMatthias Ringwald ${BTSTACK_ROOT_CONFIG}/src/l2cap_signaling.c \ 1607d0ceef1SMatthias Ringwald 1617d0ceef1SMatthias Ringwald# Additional search paths for libraries. 1627d0ceef1SMatthias RingwaldLIB_PATH = \ 1637d0ceef1SMatthias Ringwald thirdparty/CMSIS/Lib/GCC 1647d0ceef1SMatthias Ringwald 1657d0ceef1SMatthias Ringwald# List of libraries to use during linking. 1667d0ceef1SMatthias RingwaldLIBS = \ 1677d0ceef1SMatthias Ringwald arm_cortexM7lfsp_math_softfp \ 1687d0ceef1SMatthias Ringwald m 1697d0ceef1SMatthias Ringwald 1707d0ceef1SMatthias Ringwald# Path relative to top level directory pointing to a linker script. 1717d0ceef1SMatthias RingwaldLINKER_SCRIPT_FLASH = sam/utils/linker_scripts/samv71/samv71q21/gcc/flash.ld 1727d0ceef1SMatthias RingwaldLINKER_SCRIPT_SRAM = sam/utils/linker_scripts/samv71/samv71q21/gcc/sram.ld 1737d0ceef1SMatthias Ringwald 1747d0ceef1SMatthias Ringwald# Path relative to top level directory pointing to a linker script. 1757d0ceef1SMatthias RingwaldDEBUG_SCRIPT_FLASH = sam/boards/samv71_xplained_ultra/debug_scripts/gcc/samv71_xplained_ultra_flash.gdb 1767d0ceef1SMatthias RingwaldDEBUG_SCRIPT_SRAM = sam/boards/samv71_xplained_ultra/debug_scripts/gcc/samv71_xplained_ultra_sram.gdb 1777d0ceef1SMatthias Ringwald 1787d0ceef1SMatthias Ringwald# Project type parameter: all, sram or flash 1797d0ceef1SMatthias RingwaldPROJECT_TYPE = flash 1807d0ceef1SMatthias Ringwald 1817d0ceef1SMatthias Ringwald# Additional options for debugging. By default the common Makefile.in will 1827d0ceef1SMatthias Ringwald# add -g3. 1837d0ceef1SMatthias RingwaldDBGFLAGS = 1847d0ceef1SMatthias Ringwald 1857d0ceef1SMatthias Ringwald# Application optimization used during compilation and linking: 1867d0ceef1SMatthias Ringwald# -O0, -O1, -O2, -O3 or -Os 1877d0ceef1SMatthias RingwaldOPTIMIZATION = -O1 1887d0ceef1SMatthias Ringwald 1897d0ceef1SMatthias Ringwald# Extra flags to use when archiving. 1907d0ceef1SMatthias RingwaldARFLAGS = 1917d0ceef1SMatthias Ringwald 1927d0ceef1SMatthias Ringwald# Extra flags to use when assembling. 1937d0ceef1SMatthias RingwaldASFLAGS = \ 1947d0ceef1SMatthias Ringwald -mfloat-abi=softfp \ 1957d0ceef1SMatthias Ringwald -mfpu=fpv5-sp-d16 1967d0ceef1SMatthias Ringwald 1977d0ceef1SMatthias Ringwald# Extra flags to use when compiling. 1987d0ceef1SMatthias RingwaldCFLAGS = \ 1997d0ceef1SMatthias Ringwald -mfloat-abi=softfp \ 2007d0ceef1SMatthias Ringwald -mfpu=fpv5-sp-d16 2017d0ceef1SMatthias Ringwald 2027d0ceef1SMatthias Ringwald# Extra flags to use when preprocessing. 2037d0ceef1SMatthias Ringwald# 2047d0ceef1SMatthias Ringwald# Preprocessor symbol definitions 2057d0ceef1SMatthias Ringwald# To add a definition use the format "-D name[=definition]". 2067d0ceef1SMatthias Ringwald# To cancel a definition use the format "-U name". 2077d0ceef1SMatthias Ringwald# 2087d0ceef1SMatthias Ringwald# The most relevant symbols to define for the preprocessor are: 2097d0ceef1SMatthias Ringwald# BOARD Target board in use, see boards/board.h for a list. 2107d0ceef1SMatthias Ringwald# EXT_BOARD Optional extension board in use, see boards/board.h for a list. 2117d0ceef1SMatthias RingwaldCPPFLAGS = \ 2127d0ceef1SMatthias Ringwald -D ARM_MATH_CM7=true \ 2137d0ceef1SMatthias Ringwald -D BOARD=SAMV71_XPLAINED_ULTRA \ 2147d0ceef1SMatthias Ringwald -D __SAMV71Q21__ \ 2157d0ceef1SMatthias Ringwald -D printf=iprintf \ 2167d0ceef1SMatthias Ringwald -D scanf=iscanf 2177d0ceef1SMatthias Ringwald 2187d0ceef1SMatthias Ringwald# Extra flags to use when linking 2197d0ceef1SMatthias RingwaldLDFLAGS = \ 2207d0ceef1SMatthias Ringwald 2217d0ceef1SMatthias Ringwald# Pre- and post-build commands 2227d0ceef1SMatthias RingwaldPREBUILD_CMD = 2237d0ceef1SMatthias RingwaldPOSTBUILD_CMD = 224