mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-14 01:27:41 +00:00
samv71-xplained-atwilc3000: support firmware download as part of build
This commit is contained in:
parent
025f455589
commit
0f165cea0c
@ -46,13 +46,13 @@
|
||||
# \asf_license_stop
|
||||
#
|
||||
|
||||
BTSTACK_ROOT_MAKEFILE=../../../..
|
||||
BTSTACK_ROOT=../../../..
|
||||
|
||||
# enforce .gatt compilation if needed
|
||||
all: le_counter.h
|
||||
all: le_counter.h wilc3000_bt_firmware.c
|
||||
|
||||
le_counter.h: ${BTSTACK_ROOT_MAKEFILE}/example/le_counter.gatt
|
||||
python ${BTSTACK_ROOT_MAKEFILE}/tool/compile_gatt.py $< $@
|
||||
le_counter.h: ${BTSTACK_ROOT}/example/le_counter.gatt
|
||||
python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@
|
||||
|
||||
flash: $(TARGET_FLASH)
|
||||
openocd -f interface/cmsis-dap.cfg -f board/atmel_samv71_xplained_ultra.cfg -f upload.cfg
|
||||
@ -62,3 +62,5 @@ flash: $(TARGET_FLASH)
|
||||
MAKEFILE_PATH = ../../ASF/sam/utils/make/Makefile.sam.in
|
||||
include $(MAKEFILE_PATH)
|
||||
|
||||
# firmware
|
||||
include ${BTSTACK_ROOT}/chipset/atwilc3000/Makefile.inc
|
||||
|
@ -50,8 +50,10 @@ PART = samv71q21
|
||||
TARGET_FLASH=le_counter_flash.elf
|
||||
TARGET_SRAM=le_counter_sram.elf
|
||||
|
||||
# template main file
|
||||
CSRCS+=${BTSTACK_ROOT}/example/le_counter.c
|
||||
# template main file + firmware file
|
||||
BTSTACK_ROOT_CONFIG = ../../../
|
||||
CSRCS+=${BTSTACK_ROOT_CONFIG}/example/le_counter.c
|
||||
CSRCS+=${BTSTACK_ROOT_CONFIG}/port/samv71-xplained-atwilc3000/example/template/wilc3000_bt_firmware.c \
|
||||
|
||||
# List of C source files.
|
||||
CSRCS+= \
|
||||
@ -76,7 +78,7 @@ CSRCS+= \
|
||||
sam/utils/syscalls/gcc/syscalls.c \
|
||||
|
||||
# List of assembler source files.
|
||||
ASSRCS =
|
||||
ASSRCS =
|
||||
|
||||
# List of include paths.
|
||||
INC_PATH = \
|
||||
@ -106,123 +108,121 @@ INC_PATH = \
|
||||
sam/utils/header_files \
|
||||
sam/utils/preprocessor \
|
||||
thirdparty/CMSIS/Include \
|
||||
thirdparty/CMSIS/Lib/GCC \
|
||||
..
|
||||
thirdparty/CMSIS/Lib/GCC \
|
||||
..
|
||||
|
||||
BTSTACK_ROOT = ../../../
|
||||
INC_PATH += ${BTSTACK_ROOT}/src/ble
|
||||
INC_PATH += ${BTSTACK_ROOT}/src/ble/gatt-service
|
||||
INC_PATH += ${BTSTACK_ROOT}/src/classic
|
||||
INC_PATH += ${BTSTACK_ROOT}/src
|
||||
INC_PATH += ${BTSTACK_ROOT}/3rd-party/micro-ecc
|
||||
INC_PATH += ${BTSTACK_ROOT}/platform/embedded
|
||||
INC_PATH += ${BTSTACK_ROOT}/chipset/atwilc3000
|
||||
INC_PATH += ${BTSTACK_ROOT}/port/samv71-xplained-atwilc3000/example/le_counter
|
||||
INC_PATH += ${BTSTACK_ROOT}/3rd-party/hxcmod-player
|
||||
INC_PATH += ${BTSTACK_ROOT}/3rd-party/hxcmod-player/mods
|
||||
INC_PATH += ${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/include
|
||||
INC_PATH += ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/include
|
||||
INC_PATH += ${BTSTACK_ROOT_CONFIG}/src/ble
|
||||
INC_PATH += ${BTSTACK_ROOT_CONFIG}/src/ble/gatt-service
|
||||
INC_PATH += ${BTSTACK_ROOT_CONFIG}/src/classic
|
||||
INC_PATH += ${BTSTACK_ROOT_CONFIG}/src
|
||||
INC_PATH += ${BTSTACK_ROOT_CONFIG}/3rd-party/micro-ecc
|
||||
INC_PATH += ${BTSTACK_ROOT_CONFIG}/platform/embedded
|
||||
INC_PATH += ${BTSTACK_ROOT_CONFIG}/chipset/atwilc3000
|
||||
INC_PATH += ${BTSTACK_ROOT_CONFIG}/port/samv71-xplained-atwilc3000/example/template
|
||||
INC_PATH += ${BTSTACK_ROOT_CONFIG}/3rd-party/hxcmod-player
|
||||
INC_PATH += ${BTSTACK_ROOT_CONFIG}/3rd-party/hxcmod-player/mods
|
||||
INC_PATH += ${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/encoder/include
|
||||
INC_PATH += ${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/decoder/include
|
||||
|
||||
|
||||
# VPATH += ${BTSTACK_ROOT}/src
|
||||
# VPATH += ${BTSTACK_ROOT}/src/ble
|
||||
# VPATH += ${BTSTACK_ROOT}/src/ble/gatt-service
|
||||
# VPATH += ${BTSTACK_ROOT}/src/classic
|
||||
# VPATH += ${BTSTACK_ROOT}/platform/embedded
|
||||
# VPATH += ${BTSTACK_ROOT}/example
|
||||
# VPATH += ${BTSTACK_ROOT}/3rd-party/micro-ecc
|
||||
# VPATH += ${BTSTACK_ROOT_CONFIG}/src
|
||||
# VPATH += ${BTSTACK_ROOT_CONFIG}/src/ble
|
||||
# VPATH += ${BTSTACK_ROOT_CONFIG}/src/ble/gatt-service
|
||||
# VPATH += ${BTSTACK_ROOT_CONFIG}/src/classic
|
||||
# VPATH += ${BTSTACK_ROOT_CONFIG}/platform/embedded
|
||||
# VPATH += ${BTSTACK_ROOT_CONFIG}/example
|
||||
# VPATH += ${BTSTACK_ROOT_CONFIG}/3rd-party/micro-ecc
|
||||
|
||||
CSRCS += \
|
||||
${BTSTACK_ROOT}/3rd-party/hxcmod-player/hxcmod.c \
|
||||
${BTSTACK_ROOT}/3rd-party/hxcmod-player/mods/nao-deceased_by_disease.c \
|
||||
${BTSTACK_ROOT}/chipset/atwilc3000/btstack_chipset_atwilc3000.c \
|
||||
${BTSTACK_ROOT}/chipset/atwilc3000/wilc3000_bt_firmware.c \
|
||||
${BTSTACK_ROOT}/example/sco_demo_util.c \
|
||||
${BTSTACK_ROOT}/platform/embedded/btstack_run_loop_embedded.c \
|
||||
${BTSTACK_ROOT}/platform/embedded/btstack_uart_block_embedded.c \
|
||||
${BTSTACK_ROOT}/src/ad_parser.c \
|
||||
${BTSTACK_ROOT}/src/ble/ancs_client.c \
|
||||
${BTSTACK_ROOT}/src/ble/att_db.c \
|
||||
${BTSTACK_ROOT}/src/ble/att_dispatch.c \
|
||||
${BTSTACK_ROOT}/src/ble/att_server.c \
|
||||
${BTSTACK_ROOT}/src/ble/gatt-service/battery_service_server.c \
|
||||
${BTSTACK_ROOT}/src/ble/gatt-service/device_information_service_server.c \
|
||||
${BTSTACK_ROOT}/src/ble/gatt_client.c \
|
||||
${BTSTACK_ROOT}/src/ble/le_device_db_memory.c \
|
||||
${BTSTACK_ROOT}/src/ble/sm.c \
|
||||
${BTSTACK_ROOT}/src/btstack_linked_list.c \
|
||||
${BTSTACK_ROOT}/src/btstack_memory.c \
|
||||
${BTSTACK_ROOT}/src/btstack_memory_pool.c \
|
||||
${BTSTACK_ROOT}/src/btstack_ring_buffer.c \
|
||||
${BTSTACK_ROOT}/src/btstack_run_loop.c \
|
||||
${BTSTACK_ROOT}/src/btstack_util.c \
|
||||
${BTSTACK_ROOT}/src/classic/a2dp_sink.c \
|
||||
${BTSTACK_ROOT}/src/classic/a2dp_source.c \
|
||||
${BTSTACK_ROOT}/src/classic/avdtp.c \
|
||||
${BTSTACK_ROOT}/src/classic/avdtp_acceptor.c \
|
||||
${BTSTACK_ROOT}/src/classic/avdtp_initiator.c \
|
||||
${BTSTACK_ROOT}/src/classic/avdtp_sink.c \
|
||||
${BTSTACK_ROOT}/src/classic/avdtp_source.c \
|
||||
${BTSTACK_ROOT}/src/classic/avdtp_util.c \
|
||||
${BTSTACK_ROOT}/src/classic/avrcp.c \
|
||||
${BTSTACK_ROOT}/src/classic/avrcp_controller.c \
|
||||
${BTSTACK_ROOT}/src/classic/avrcp_target.c \
|
||||
${BTSTACK_ROOT}/src/classic/btstack_sbc_bludroid.c \
|
||||
${BTSTACK_ROOT}/src/classic/btstack_sbc_plc.c \
|
||||
${BTSTACK_ROOT}/src/classic/hfp.c \
|
||||
${BTSTACK_ROOT}/src/classic/hfp_ag.c \
|
||||
${BTSTACK_ROOT}/src/classic/hfp_hf.c \
|
||||
${BTSTACK_ROOT}/src/classic/hfp_msbc.c \
|
||||
${BTSTACK_ROOT}/src/classic/hfp_gsm_model.c \
|
||||
${BTSTACK_ROOT}/src/classic/hsp_hs.c \
|
||||
${BTSTACK_ROOT}/src/classic/hsp_ag.c \
|
||||
${BTSTACK_ROOT}/src/classic/btstack_link_key_db_memory.c \
|
||||
${BTSTACK_ROOT}/src/classic/goep_client.c \
|
||||
${BTSTACK_ROOT}/src/classic/obex_iterator.c \
|
||||
${BTSTACK_ROOT}/src/classic/pbap_client.c \
|
||||
${BTSTACK_ROOT}/src/classic/rfcomm.c \
|
||||
${BTSTACK_ROOT}/src/classic/sdp_client.c \
|
||||
${BTSTACK_ROOT}/src/classic/sdp_client_rfcomm.c \
|
||||
${BTSTACK_ROOT}/src/classic/sdp_server.c \
|
||||
${BTSTACK_ROOT}/src/classic/sdp_util.c \
|
||||
${BTSTACK_ROOT}/src/classic/spp_server.c \
|
||||
${BTSTACK_ROOT}/src/hci.c \
|
||||
${BTSTACK_ROOT}/src/hci_cmd.c \
|
||||
${BTSTACK_ROOT}/src/hci_dump.c \
|
||||
${BTSTACK_ROOT}/src/hci_transport_h4.c \
|
||||
${BTSTACK_ROOT}/src/l2cap.c \
|
||||
${BTSTACK_ROOT}/src/l2cap_signaling.c \
|
||||
${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce/alloc.c \
|
||||
${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce/bitalloc-sbc.c \
|
||||
${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce/bitalloc.c \
|
||||
${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce/bitstream-decode.c \
|
||||
${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce/decoder-oina.c \
|
||||
${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce/decoder-private.c \
|
||||
${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce/decoder-sbc.c \
|
||||
${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce/dequant.c \
|
||||
${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce/framing-sbc.c \
|
||||
${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce/framing.c \
|
||||
${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce/oi_codec_version.c \
|
||||
${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce/synthesis-8-generated.c \
|
||||
${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce/synthesis-dct8.c \
|
||||
${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce/synthesis-sbc.c \
|
||||
${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/srce/sbc_analysis.c \
|
||||
${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/srce/sbc_dct.c \
|
||||
${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/srce/sbc_dct_coeffs.c \
|
||||
${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/srce/sbc_enc_bit_alloc_mono.c \
|
||||
${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/srce/sbc_enc_bit_alloc_ste.c \
|
||||
${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/srce/sbc_enc_coeffs.c \
|
||||
${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/srce/sbc_encoder.c \
|
||||
${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/srce/sbc_packing.c \
|
||||
${BTSTACK_ROOT_CONFIG}/3rd-party/hxcmod-player/hxcmod.c \
|
||||
${BTSTACK_ROOT_CONFIG}/3rd-party/hxcmod-player/mods/nao-deceased_by_disease.c \
|
||||
${BTSTACK_ROOT_CONFIG}/chipset/atwilc3000/btstack_chipset_atwilc3000.c \
|
||||
${BTSTACK_ROOT_CONFIG}/example/sco_demo_util.c \
|
||||
${BTSTACK_ROOT_CONFIG}/platform/embedded/btstack_run_loop_embedded.c \
|
||||
${BTSTACK_ROOT_CONFIG}/platform/embedded/btstack_uart_block_embedded.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/ad_parser.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/ble/ancs_client.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/ble/att_db.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/ble/att_dispatch.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/ble/att_server.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/ble/gatt-service/battery_service_server.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/ble/gatt-service/device_information_service_server.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/ble/gatt_client.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/ble/le_device_db_memory.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/ble/sm.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/btstack_linked_list.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/btstack_memory.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/btstack_memory_pool.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/btstack_ring_buffer.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/btstack_run_loop.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/btstack_util.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/classic/a2dp_sink.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/classic/a2dp_source.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/classic/avdtp.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/classic/avdtp_acceptor.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/classic/avdtp_initiator.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/classic/avdtp_sink.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/classic/avdtp_source.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/classic/avdtp_util.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/classic/avrcp.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/classic/avrcp_controller.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/classic/avrcp_target.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/classic/btstack_sbc_bludroid.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/classic/btstack_sbc_plc.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/classic/hfp.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/classic/hfp_ag.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/classic/hfp_hf.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/classic/hfp_msbc.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/classic/hfp_gsm_model.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/classic/hsp_hs.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/classic/hsp_ag.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/classic/btstack_link_key_db_memory.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/classic/goep_client.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/classic/obex_iterator.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/classic/pbap_client.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/classic/rfcomm.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/classic/sdp_client.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/classic/sdp_client_rfcomm.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/classic/sdp_server.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/classic/sdp_util.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/classic/spp_server.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/hci.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/hci_cmd.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/hci_dump.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/hci_transport_h4.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/l2cap.c \
|
||||
${BTSTACK_ROOT_CONFIG}/src/l2cap_signaling.c \
|
||||
${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/decoder/srce/alloc.c \
|
||||
${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/decoder/srce/bitalloc-sbc.c \
|
||||
${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/decoder/srce/bitalloc.c \
|
||||
${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/decoder/srce/bitstream-decode.c \
|
||||
${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/decoder/srce/decoder-oina.c \
|
||||
${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/decoder/srce/decoder-private.c \
|
||||
${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/decoder/srce/decoder-sbc.c \
|
||||
${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/decoder/srce/dequant.c \
|
||||
${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/decoder/srce/framing-sbc.c \
|
||||
${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/decoder/srce/framing.c \
|
||||
${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/decoder/srce/oi_codec_version.c \
|
||||
${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/decoder/srce/synthesis-8-generated.c \
|
||||
${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/decoder/srce/synthesis-dct8.c \
|
||||
${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/decoder/srce/synthesis-sbc.c \
|
||||
${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/encoder/srce/sbc_analysis.c \
|
||||
${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/encoder/srce/sbc_dct.c \
|
||||
${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/encoder/srce/sbc_dct_coeffs.c \
|
||||
${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/encoder/srce/sbc_enc_bit_alloc_mono.c \
|
||||
${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/encoder/srce/sbc_enc_bit_alloc_ste.c \
|
||||
${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/encoder/srce/sbc_enc_coeffs.c \
|
||||
${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/encoder/srce/sbc_encoder.c \
|
||||
${BTSTACK_ROOT_CONFIG}/3rd-party/bluedroid/encoder/srce/sbc_packing.c \
|
||||
|
||||
# Additional search paths for libraries.
|
||||
LIB_PATH = \
|
||||
thirdparty/CMSIS/Lib/GCC
|
||||
thirdparty/CMSIS/Lib/GCC
|
||||
|
||||
# List of libraries to use during linking.
|
||||
LIBS = \
|
||||
arm_cortexM7lfsp_math_softfp \
|
||||
m
|
||||
m
|
||||
|
||||
# Path relative to top level directory pointing to a linker script.
|
||||
LINKER_SCRIPT_FLASH = sam/utils/linker_scripts/samv71/samv71q21/gcc/flash.ld
|
||||
@ -237,24 +237,24 @@ PROJECT_TYPE = flash
|
||||
|
||||
# Additional options for debugging. By default the common Makefile.in will
|
||||
# add -g3.
|
||||
DBGFLAGS =
|
||||
DBGFLAGS =
|
||||
|
||||
# Application optimization used during compilation and linking:
|
||||
# -O0, -O1, -O2, -O3 or -Os
|
||||
OPTIMIZATION = -O1
|
||||
|
||||
# Extra flags to use when archiving.
|
||||
ARFLAGS =
|
||||
ARFLAGS =
|
||||
|
||||
# Extra flags to use when assembling.
|
||||
ASFLAGS = \
|
||||
-mfloat-abi=softfp \
|
||||
-mfpu=fpv5-sp-d16
|
||||
-mfpu=fpv5-sp-d16
|
||||
|
||||
# Extra flags to use when compiling.
|
||||
CFLAGS = \
|
||||
-mfloat-abi=softfp \
|
||||
-mfpu=fpv5-sp-d16
|
||||
-mfpu=fpv5-sp-d16
|
||||
|
||||
# Extra flags to use when preprocessing.
|
||||
#
|
||||
@ -276,6 +276,5 @@ CPPFLAGS = \
|
||||
LDFLAGS = \
|
||||
|
||||
# Pre- and post-build commands
|
||||
PREBUILD_CMD =
|
||||
POSTBUILD_CMD =
|
||||
|
||||
PREBUILD_CMD =
|
||||
POSTBUILD_CMD =
|
||||
|
@ -1,76 +0,0 @@
|
||||
|
||||
// le_counter.h generated from ../../../../example/le_counter.gatt for BTstack
|
||||
|
||||
// binary representation
|
||||
// attribute size in bytes (16), flags(16), handle (16), uuid (16/128), value(...)
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
const uint8_t profile_data[] =
|
||||
{
|
||||
// 0x0001 PRIMARY_SERVICE-GAP_SERVICE
|
||||
0x0a, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x28, 0x00, 0x18,
|
||||
// 0x0002 CHARACTERISTIC-GAP_DEVICE_NAME-READ
|
||||
0x0d, 0x00, 0x02, 0x00, 0x02, 0x00, 0x03, 0x28, 0x02, 0x03, 0x00, 0x00, 0x2a,
|
||||
// 0x0003 VALUE-GAP_DEVICE_NAME-READ-'LE Counter'
|
||||
0x12, 0x00, 0x02, 0x00, 0x03, 0x00, 0x00, 0x2a, 0x4c, 0x45, 0x20, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72,
|
||||
// add Battery Service
|
||||
// #import <battery_service.gatt> -- BEGIN
|
||||
// Specification Type org.bluetooth.service.battery_service
|
||||
// https://www.bluetooth.com/api/gatt/xmlfile?xmlFileName=org.bluetooth.service.battery_service.xml
|
||||
// Battery Service 180F
|
||||
|
||||
// 0x0004 PRIMARY_SERVICE-ORG_BLUETOOTH_SERVICE_BATTERY_SERVICE
|
||||
0x0a, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x28, 0x0f, 0x18,
|
||||
// 0x0005 CHARACTERISTIC-ORG_BLUETOOTH_CHARACTERISTIC_BATTERY_LEVEL-DYNAMIC | READ | NOTIFY
|
||||
0x0d, 0x00, 0x02, 0x00, 0x05, 0x00, 0x03, 0x28, 0x12, 0x06, 0x00, 0x19, 0x2a,
|
||||
// 0x0006 VALUE-ORG_BLUETOOTH_CHARACTERISTIC_BATTERY_LEVEL-DYNAMIC | READ | NOTIFY-''
|
||||
0x08, 0x00, 0x12, 0x01, 0x06, 0x00, 0x19, 0x2a,
|
||||
// 0x0007 CLIENT_CHARACTERISTIC_CONFIGURATION
|
||||
0x0a, 0x00, 0x0a, 0x01, 0x07, 0x00, 0x02, 0x29, 0x00, 0x00,
|
||||
// #import <battery_service.gatt> -- END
|
||||
|
||||
// 0x0008 PRIMARY_SERVICE-GATT_SERVICE
|
||||
0x0a, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x28, 0x01, 0x18,
|
||||
// 0x0009 CHARACTERISTIC-GATT_SERVICE_CHANGED-READ
|
||||
0x0d, 0x00, 0x02, 0x00, 0x09, 0x00, 0x03, 0x28, 0x02, 0x0a, 0x00, 0x05, 0x2a,
|
||||
// 0x000a VALUE-GATT_SERVICE_CHANGED-READ-''
|
||||
0x08, 0x00, 0x02, 0x00, 0x0a, 0x00, 0x05, 0x2a,
|
||||
// Counter Service
|
||||
|
||||
// 0x000b PRIMARY_SERVICE-0000FF10-0000-1000-8000-00805F9B34FB
|
||||
0x18, 0x00, 0x02, 0x00, 0x0b, 0x00, 0x00, 0x28, 0xfb, 0x34, 0x9b, 0x5f, 0x80, 0x00, 0x00, 0x80, 0x00, 0x10, 0x00, 0x00, 0x10, 0xff, 0x00, 0x00,
|
||||
// Counter Characteristic, with read and notify
|
||||
// 0x000c CHARACTERISTIC-0000FF11-0000-1000-8000-00805F9B34FB-READ | NOTIFY | DYNAMIC
|
||||
0x1b, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x03, 0x28, 0x12, 0x0d, 0x00, 0xfb, 0x34, 0x9b, 0x5f, 0x80, 0x00, 0x00, 0x80, 0x00, 0x10, 0x00, 0x00, 0x11, 0xff, 0x00, 0x00,
|
||||
// 0x000d VALUE-0000FF11-0000-1000-8000-00805F9B34FB-READ | NOTIFY | DYNAMIC-''
|
||||
0x16, 0x00, 0x12, 0x03, 0x0d, 0x00, 0xfb, 0x34, 0x9b, 0x5f, 0x80, 0x00, 0x00, 0x80, 0x00, 0x10, 0x00, 0x00, 0x11, 0xff, 0x00, 0x00,
|
||||
// 0x000e CLIENT_CHARACTERISTIC_CONFIGURATION
|
||||
0x0a, 0x00, 0x0a, 0x01, 0x0e, 0x00, 0x02, 0x29, 0x00, 0x00,
|
||||
|
||||
// END
|
||||
0x00, 0x00,
|
||||
}; // total size 122 bytes
|
||||
|
||||
|
||||
//
|
||||
// list service handle ranges
|
||||
//
|
||||
#define ATT_SERVICE_GAP_SERVICE_START_HANDLE 0x0001
|
||||
#define ATT_SERVICE_GAP_SERVICE_END_HANDLE 0x0003
|
||||
#define ATT_SERVICE_ORG_BLUETOOTH_SERVICE_BATTERY_SERVICE_START_HANDLE 0x0004
|
||||
#define ATT_SERVICE_ORG_BLUETOOTH_SERVICE_BATTERY_SERVICE_END_HANDLE 0x0007
|
||||
#define ATT_SERVICE_GATT_SERVICE_START_HANDLE 0x0008
|
||||
#define ATT_SERVICE_GATT_SERVICE_END_HANDLE 0x000a
|
||||
#define ATT_SERVICE_0000FF10_0000_1000_8000_00805F9B34FB_START_HANDLE 0x000b
|
||||
#define ATT_SERVICE_0000FF10_0000_1000_8000_00805F9B34FB_END_HANDLE 0x000e
|
||||
|
||||
//
|
||||
// list mapping between characteristics and handles
|
||||
//
|
||||
#define ATT_CHARACTERISTIC_GAP_DEVICE_NAME_01_VALUE_HANDLE 0x0003
|
||||
#define ATT_CHARACTERISTIC_ORG_BLUETOOTH_CHARACTERISTIC_BATTERY_LEVEL_01_VALUE_HANDLE 0x0006
|
||||
#define ATT_CHARACTERISTIC_ORG_BLUETOOTH_CHARACTERISTIC_BATTERY_LEVEL_01_CLIENT_CONFIGURATION_HANDLE 0x0007
|
||||
#define ATT_CHARACTERISTIC_GATT_SERVICE_CHANGED_01_VALUE_HANDLE 0x000a
|
||||
#define ATT_CHARACTERISTIC_0000FF11_0000_1000_8000_00805F9B34FB_01_VALUE_HANDLE 0x000d
|
||||
#define ATT_CHARACTERISTIC_0000FF11_0000_1000_8000_00805F9B34FB_01_CLIENT_CONFIGURATION_HANDLE 0x000e
|
@ -88,14 +88,14 @@ for file in example_files:
|
||||
with open(project_folder + 'Makefile', 'wt') as fout:
|
||||
with open(template_path + 'Makefile', 'rt') as fin:
|
||||
for line in fin:
|
||||
if 'le_counter.h: ${BTSTACK_ROOT_MAKEFILE}/example/le_counter.gatt' in line:
|
||||
fout.write('%s.h: ${BTSTACK_ROOT_MAKEFILE}/example/%s.gatt\n' % (example,example))
|
||||
if 'le_counter.h: ${BTSTACK_ROOT}/example/le_counter.gatt' in line:
|
||||
fout.write('%s.h: ${BTSTACK_ROOT}/example/%s.gatt\n' % (example,example))
|
||||
continue
|
||||
if 'all: le_counter.h' in line:
|
||||
if 'all: le_counter.h wilc3000_bt_firmware.c' in line:
|
||||
if len(gatt_h):
|
||||
fout.write("all: %s.h\n" % example)
|
||||
fout.write("all: %s.h wilc3000_bt_firmware.c\n" % example)
|
||||
else:
|
||||
fout.write("all:\n")
|
||||
fout.write("all: wilc3000_bt_firmware.c\n")
|
||||
continue
|
||||
fout.write(line)
|
||||
|
||||
@ -103,17 +103,20 @@ for file in example_files:
|
||||
with open(project_folder + 'config.mk', 'wt') as fout:
|
||||
with open(template_path + 'config.mk', 'rt') as fin:
|
||||
for line in fin:
|
||||
if 'CSRCS+=${BTSTACK_ROOT}/example/le_counter.c' in line:
|
||||
fout.write('CSRCS+=${BTSTACK_ROOT}/example/%s.c\n' % example)
|
||||
continue
|
||||
if 'TARGET_FLASH=le_counter_flash.elf' in line:
|
||||
fout.write('TARGET_FLASH=%s_flash.elf\n' % example)
|
||||
continue
|
||||
if 'TARGET_SRAM=le_counter_sram.elf' in line:
|
||||
fout.write('TARGET_SRAM=%s_sram.elf\n' % example)
|
||||
continue
|
||||
if 'INC_PATH += ${BTSTACK_ROOT}/port/samv71-xplained-atwilc3000/example/le_counter' in line:
|
||||
fout.write('INC_PATH += ${BTSTACK_ROOT}/port/samv71-xplained-atwilc3000/example/%s\n' % example)
|
||||
if 'CSRCS+=${BTSTACK_ROOT_CONFIG}/example/le_counter.c' in line:
|
||||
fout.write('CSRCS+=${BTSTACK_ROOT_CONFIG}/example/%s.c\n' % example)
|
||||
continue
|
||||
if 'CSRSC+=${BTSTACK_ROOT_CONFIG}/port/samv71-xplained-atwilc3000/example/template/wilc3000_bt_firmware.c' in line:
|
||||
fout.write('\t${BTSTACK_ROOT_CONFIG}/port/samv71-xplained-atwilc3000/example/%s/wilc3000_bt_firmware.c \\\n' % example)
|
||||
continue
|
||||
if 'INC_PATH += ${BTSTACK_ROOT_CONFIG}/port/samv71-xplained-atwilc3000/example/template' in line:
|
||||
fout.write('INC_PATH += ${BTSTACK_ROOT_CONFIG}/port/samv71-xplained-atwilc3000/example/%s\n' % example)
|
||||
continue
|
||||
fout.write(line)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user