From 2d0fc1be4900a3fe399a1587e7e9333f00b46c21 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Sat, 13 May 2017 23:22:59 +0200 Subject: [PATCH] cc256x: support CC256xB Service Pack v1.6 and use in all CC256x ports --- chipset/cc256x/Makefile.inc | 39 +++++++++++++++---- port/posix-h4/Makefile | 2 +- port/posix-h5/Makefile | 2 +- port/stm32-f103rb-nucleo/Makefile | 2 +- port/stm32-f4discovery-cc256x/.gitignore | 3 +- .../create_examples.py | 2 +- port/windows-h4/Makefile | 2 +- 7 files changed, 39 insertions(+), 13 deletions(-) diff --git a/chipset/cc256x/Makefile.inc b/chipset/cc256x/Makefile.inc index 55526f046..d5d20e3cf 100644 --- a/chipset/cc256x/Makefile.inc +++ b/chipset/cc256x/Makefile.inc @@ -42,7 +42,7 @@ bluetooth_init_cc2564_2.14.bts: CC2564_BT_BLE_SP_BTS.zip @echo "Extracting $@" @unzip -q -j -o CC2564_BT_BLE_SP_BTS.zip CC2564_BT_BLE_SP_BTS/bluetooth_init_cc2564_2.14.bts -# Third generation CC256xB - AKA TIInit_6.6.16.bts +# Third generation CC256xB - AKA TIInit_6.7.16.bts # v1.2 - versioned files TI Git Repo bluetooth_init_cc2560B_1.2_BT_Spec_4.1.bts: @@ -71,13 +71,30 @@ cc256x_bt_sp_v1.5.zip: echo "Downloading $@" @curl -sS -O $(BLUEKITCHEN_URL)/cc256x_bt_sp_v1.5.zip -initscripts-TIInit_6.7.16_bt_spec_4.1.bts: cc256x_bt_sp_v1.5.zip +cc256x_bt_sp_v1.5/initscripts-TIInit_6.7.16_bt_spec_4.1.bts: cc256x_bt_sp_v1.5.zip @echo "Extracting $@" - @unzip -q -j -o cc256x_bt_sp_v1.5.zip CC256X_BT_SP/v1.5/initscripts-TIInit_6.7.16_bt_spec_4.1.bts + @mkdir -p cc256x_bt_sp_v1.5 + @unzip -q -j -o cc256x_bt_sp_v1.5.zip -d cc256x_bt_sp_v1.5 CC256X_BT_SP/v1.5/initscripts-TIInit_6.7.16_bt_spec_4.1.bts -initscripts-TIInit_6.7.16_ble_add-on.bts: cc256x_bt_sp_v1.5.zip +cc256x_bt_sp_v1.5/initscripts-TIInit_6.7.16_ble_add-on.bts: cc256x_bt_sp_v1.5.zip @echo "Extracting $@" - @unzip -q -j -o cc256x_bt_sp_v1.5.zip CC256X_BT_SP/v1.5/initscripts-TIInit_6.7.16_ble_add-on.bts + @mkdir -p cc256x_bt_sp_v1.5 + @unzip -q -j -o cc256x_bt_sp_v1.5.zip -d cc256x_bt_sp_v1.5 CC256X_BT_SP/v1.5/initscripts-TIInit_6.7.16_ble_add-on.bts + +# v1.6 - unversioned files from BlueKitchen website, original: http://www.ti.com/tool/cc256xb-bt-sp +cc256xb_bt_sp_v1.6.zip: + echo "Downloading $@" + @curl -sS -O $(BLUEKITCHEN_URL)/cc256xb_bt_sp_v1.6.zip + +cc256xb_bt_sp_v1.6/initscripts-TIInit_6.7.16_bt_spec_4.1.bts: cc256xb_bt_sp_v1.6.zip + @echo "Extracting $@" + @mkdir -p cc256xb_bt_sp_v1.6 + @unzip -q -j -o cc256xb_bt_sp_v1.6.zip -d cc256xb_bt_sp_v1.6 CC256XB_BT_SP/v1.6/initscripts-TIInit_6.7.16_bt_spec_4.1.bts + +cc256xb_bt_sp_v1.6/initscripts-TIInit_6.7.16_ble_add-on.bts: cc256xb_bt_sp_v1.6.zip + @echo "Extracting $@" + @mkdir -p cc256xb_bt_sp_v1.6 + @unzip -q -j -o cc256xb_bt_sp_v1.6.zip -d cc256xb_bt_sp_v1.6 CC256XB_BT_SP/v1.6/initscripts-TIInit_6.7.16_ble_add-on.bts # Fourth generation CC256xC - TIInit_6.12.26.bts @@ -142,11 +159,19 @@ bluetooth_init_cc2564B_1.4_BT_Spec_4.1.c: TIInit_6.7.16_bt_spec_4.1.bts TIInit_6 @echo "Creating $@" @$(CONVERSION_SCRIPT) $^ $@ -bluetooth_init_cc2560B_1.5_BT_Spec_4.1.c: initscripts-TIInit_6.7.16_bt_spec_4.1.bts +bluetooth_init_cc2560B_1.5_BT_Spec_4.1.c: cc256x_bt_sp_v1.5/initscripts-TIInit_6.7.16_bt_spec_4.1.bts @echo "Creating $@" @$(CONVERSION_SCRIPT) $^ $@ -bluetooth_init_cc2564B_1.5_BT_Spec_4.1.c: initscripts-TIInit_6.7.16_bt_spec_4.1.bts initscripts-TIInit_6.7.16_ble_add-on.bts +bluetooth_init_cc2564B_1.5_BT_Spec_4.1.c: cc256x_bt_sp_v1.5/initscripts-TIInit_6.7.16_bt_spec_4.1.bts cc256x_bt_sp_v1.5/initscripts-TIInit_6.7.16_ble_add-on.bts + @echo "Creating $@" + @$(CONVERSION_SCRIPT) $^ $@ + +bluetooth_init_cc2560B_1.6_BT_Spec_4.1.c: cc256xb_bt_sp_v1.6/initscripts-TIInit_6.7.16_bt_spec_4.1.bts + @echo "Creating $@" + @$(CONVERSION_SCRIPT) $^ $@ + +bluetooth_init_cc2564B_1.6_BT_Spec_4.1.c: cc256xb_bt_sp_v1.6/initscripts-TIInit_6.7.16_bt_spec_4.1.bts cc256xb_bt_sp_v1.6/initscripts-TIInit_6.7.16_ble_add-on.bts @echo "Creating $@" @$(CONVERSION_SCRIPT) $^ $@ diff --git a/port/posix-h4/Makefile b/port/posix-h4/Makefile index 50195c50f..305726809 100644 --- a/port/posix-h4/Makefile +++ b/port/posix-h4/Makefile @@ -2,7 +2,7 @@ BTSTACK_ROOT = ../.. CORE += \ - bluetooth_init_cc2564B_1.5_BT_Spec_4.1.c \ + bluetooth_init_cc2564B_1.6_BT_Spec_4.1.c \ btstack_chipset_bcm.c \ btstack_chipset_cc256x.c \ btstack_chipset_csr.c \ diff --git a/port/posix-h5/Makefile b/port/posix-h5/Makefile index a8722338f..d0c7889e8 100644 --- a/port/posix-h5/Makefile +++ b/port/posix-h5/Makefile @@ -2,7 +2,7 @@ BTSTACK_ROOT = ../.. CORE += \ - bluetooth_init_cc2564B_1.5_BT_Spec_4.1.c \ + bluetooth_init_cc2564B_1.6_BT_Spec_4.1.c \ btstack_chipset_cc256x.c \ btstack_chipset_csr.c \ btstack_chipset_em9301.c \ diff --git a/port/stm32-f103rb-nucleo/Makefile b/port/stm32-f103rb-nucleo/Makefile index 490c45f1d..8f50bc450 100644 --- a/port/stm32-f103rb-nucleo/Makefile +++ b/port/stm32-f103rb-nucleo/Makefile @@ -24,7 +24,7 @@ CORE = \ btstack_run_loop_embedded.c \ COMMON = \ - bluetooth_init_cc2564B_1.5_BT_Spec_4.1.c \ + bluetooth_init_cc2564B_1.6_BT_Spec_4.1.c \ btstack_chipset_cc256x.c \ btstack_link_key_db_memory.c \ rfcomm.c \ diff --git a/port/stm32-f4discovery-cc256x/.gitignore b/port/stm32-f4discovery-cc256x/.gitignore index f728bd9ce..ac4f0d13f 100644 --- a/port/stm32-f4discovery-cc256x/.gitignore +++ b/port/stm32-f4discovery-cc256x/.gitignore @@ -1,4 +1,5 @@ bluetooth_init_cc2564B_1.5_BT_Spec_4.1.c +bluetooth_init_cc2564B_1.6_BT_Spec_4.1.c initscripts-TIInit_6.7.16_b* example -cc256x_bt_sp_v1.5.zip +cc256x_bt_sp_v1.5.* diff --git a/port/stm32-f4discovery-cc256x/create_examples.py b/port/stm32-f4discovery-cc256x/create_examples.py index 37efcdeb4..cb22ba108 100755 --- a/port/stm32-f4discovery-cc256x/create_examples.py +++ b/port/stm32-f4discovery-cc256x/create_examples.py @@ -18,7 +18,7 @@ $PROJECT_LOC/btstack/tool/compile_gatt.py $PROJECT_LOC/example/EXAMPLE.gatt $PRO ## pick correct init script based on your hardware # - init script for CC2564B -cc256x_init_script = 'bluetooth_init_cc2564B_1.5_BT_Spec_4.1.c' +cc256x_init_script = 'bluetooth_init_cc2564B_1.6_BT_Spec_4.1.c' # - init script for CC2564C # cc256x_init_script = 'bluetooth_init_cc2564C_1.0.c' diff --git a/port/windows-h4/Makefile b/port/windows-h4/Makefile index 893a02c89..1f7abf2f5 100644 --- a/port/windows-h4/Makefile +++ b/port/windows-h4/Makefile @@ -9,7 +9,7 @@ COMMON += \ btstack_uart_block_windows.c \ le_device_db_fs.c \ btstack_link_key_db_fs.c \ - bluetooth_init_cc2564B_1.5_BT_Spec_4.1.c \ + bluetooth_init_cc2564B_1.6_BT_Spec_4.1.c \ btstack_chipset_cc256x.c \ btstack_chipset_csr.c \ btstack_chipset_em9301.c \