From f2eb0907497ae6c49729a66e13ab73e9da185656 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Fri, 11 Sep 2020 15:15:24 +0200 Subject: [PATCH] cc256x: update CC256xC to v1.4 --- chipset/cc256x/Makefile.inc | 22 +++++++++++++++++++ port/max32630-fthr/example/template/Makefile | 2 +- port/max32630-fthr/scripts/create_examples.py | 2 +- port/posix-h4/Makefile | 2 +- port/posix-h4/README.md | 4 ++-- port/qt-h4/CMakeLists.txt | 2 +- port/qt-h4/README.md | 4 ++-- .../renesas-tb-s1ja-cc256x/create_examples.py | 2 +- port/stm32-f103rb-nucleo/Makefile | 2 +- port/stm32-f4discovery-cc256x/README.md | 2 +- port/windows-h4/Makefile | 2 +- 11 files changed, 34 insertions(+), 12 deletions(-) diff --git a/chipset/cc256x/Makefile.inc b/chipset/cc256x/Makefile.inc index 2c71815cf..7986454a5 100644 --- a/chipset/cc256x/Makefile.inc +++ b/chipset/cc256x/Makefile.inc @@ -168,6 +168,20 @@ initscripts-TIInit_6.12.26_ble_add-on_v1.3.bts: cc256xc_bt_sp_v1.3.zip @echo "Extracting $@" @unzip -q -p cc256xc_bt_sp_v1.3.zip CC256XC_BT_SP/v1.3/initscripts-TIInit_6.12.26_ble_add-on.bts > $@ +# v1.4 - unversioned files from BlueKitchen website, original: http://www.ti.com/tool/cc256xc-bt-sp +cc256xc_bt_sp_v1.4.zip: + @echo "Downloading $@" + @curl -sS -O $(BLUEKITCHEN_URL)/cc256xc_bt_sp_v1.4.zip + +initscripts-TIInit_6.12.26_v1.4.bts: cc256xc_bt_sp_v1.4.zip + @echo "Extracting $@" + @unzip -q -p cc256xc_bt_sp_v1.4.zip CC256XC_BT_SP/v1.4/initscripts-TIInit_6.12.26.bts > $@ + +initscripts-TIInit_6.12.26_ble_add-on_v1.4.bts: cc256xc_bt_sp_v1.4.zip + @echo "Extracting $@" + @unzip -q -p cc256xc_bt_sp_v1.4.zip CC256XC_BT_SP/v1.4/initscripts-TIInit_6.12.26_ble_add-on.bts > $@ + + # Various scripts for WL chipsets # V4.2 from BlueKitchen website, original: http://www.ti.com/tool/wl18xx-bt-sp @@ -279,6 +293,14 @@ bluetooth_init_cc2564C_1.3.c: initscripts-TIInit_6.12.26_v1.3.bts initscripts-TI @echo "Creating $@" @$(CONVERSION_SCRIPT) $^ $@ +bluetooth_init_cc2560C_1.4.c: initscripts-TIInit_6.12.26_v1.4.bts + @echo "Creating $@" + @$(CONVERSION_SCRIPT) $^ $@ + +bluetooth_init_cc2564C_1.4.c: initscripts-TIInit_6.12.26_v1.4.bts initscripts-TIInit_6.12.26_ble_add-on_v1.4.bts + @echo "Creating $@" + @$(CONVERSION_SCRIPT) $^ $@ + TIInit_11.8.32.c: TIInit_11.8.32.bts @echo "Creating $@" diff --git a/port/max32630-fthr/example/template/Makefile b/port/max32630-fthr/example/template/Makefile index c9abd8041..8cfb9995d 100644 --- a/port/max32630-fthr/example/template/Makefile +++ b/port/max32630-fthr/example/template/Makefile @@ -283,7 +283,7 @@ include $(PERIPH_DRIVER_DIR)/periphdriver.mk include $(CMSIS_ROOT)/Device/Maxim/$(TARGET_UC)/Source/$(COMPILER)/$(TARGET_LC).mk # fetch and convert init scripts -# use bluetooth_init_cc2564B_1.6_BT_Spec_4.1.c +# use bluetooth_init_cc2564B_1.8_BT_Spec_4.1.c include ${BTSTACK_ROOT}/chipset/cc256x/Makefile.inc rm-compiled-gatt-file: diff --git a/port/max32630-fthr/scripts/create_examples.py b/port/max32630-fthr/scripts/create_examples.py index 3e361fc0e..5b25c254f 100755 --- a/port/max32630-fthr/scripts/create_examples.py +++ b/port/max32630-fthr/scripts/create_examples.py @@ -34,7 +34,7 @@ btstack_root = script_path + '../../' ## pick correct init script based on your hardware # - init script for CC2564B -cc256x_init_script = 'bluetooth_init_cc2564B_1.6_BT_Spec_4.1.c' +cc256x_init_script = 'bluetooth_init_cc2564B_1.8_BT_Spec_4.1.c' subprocess.call("make -f ../Makefile -C src " + cc256x_init_script, shell=True) diff --git a/port/posix-h4/Makefile b/port/posix-h4/Makefile index 8624b80f1..f779f4321 100644 --- a/port/posix-h4/Makefile +++ b/port/posix-h4/Makefile @@ -21,7 +21,7 @@ CORE += \ wav_util.c \ 0000000_META_hci_patches_v7.c \ # bluetooth_init_cc2564_2.14.c \ - # bluetooth_init_cc2564C_1.3.c \ + # bluetooth_init_cc2564C_1.4.c \ # TI-WL183x requires TIInit_11.8.32.c diff --git a/port/posix-h4/README.md b/port/posix-h4/README.md index 683853913..f823bc563 100644 --- a/port/posix-h4/README.md +++ b/port/posix-h4/README.md @@ -7,8 +7,8 @@ Most Bluetooth Bluetooth Controllers connected via UART/H4 require some special The CC2564x needs the correct init script to start up. The Makfile already has entries for most silicon revisions: - CC2560: bluetooth_init_cc2564_2.14.c -- CC2564B: bluetooth_init_cc2564B_1.6_BT_Spec_4.1. -- CC2564C: bluetooth_init_cc2564C_1.3.c +- CC2564B: bluetooth_init_cc2564B_1.8_BT_Spec_4.1.c +- CC2564C: bluetooth_init_cc2564C_1.4.c Please pick the correct one. The main.c verifies that the correct script is loaded, but the init script is linked to the executable. diff --git a/port/qt-h4/CMakeLists.txt b/port/qt-h4/CMakeLists.txt index cd358b2bb..8dc64bbb3 100644 --- a/port/qt-h4/CMakeLists.txt +++ b/port/qt-h4/CMakeLists.txt @@ -65,7 +65,7 @@ set(SOURCES_POSIX set(SOURCES_CHIPSET ${BTSTACK_ROOT}/chipset/bcm/btstack_chipset_bcm.c ${BTSTACK_ROOT}/chipset/cc256x/btstack_chipset_cc256x.c - bluetooth_init_cc2564C_1.3.c + bluetooth_init_cc2564C_1.4.c ${BTSTACK_ROOT}/chipset/csr/btstack_chipset_csr.c ) diff --git a/port/qt-h4/README.md b/port/qt-h4/README.md index 40749c49b..7296c322b 100644 --- a/port/qt-h4/README.md +++ b/port/qt-h4/README.md @@ -13,8 +13,8 @@ Most Bluetooth Bluetooth Controllers connected via UART/H4 require some special The CC2564x needs the correct init script to start up. The Makfile already has entries for most silicon revisions: - CC2560: bluetooth_init_cc2564_2.14.c -- CC2564B: bluetooth_init_cc2564B_1.6_BT_Spec_4.1. -- CC2564C: bluetooth_init_cc2564C_1.3.c +- CC2564B: bluetooth_init_cc2564B_1.8_BT_Spec_4.1.c +- CC2564C: bluetooth_init_cc2564C_1.4.c Please pick the correct one. The main.c verifies that the correct script is loaded, but the init script is linked to the executable. diff --git a/port/renesas-tb-s1ja-cc256x/create_examples.py b/port/renesas-tb-s1ja-cc256x/create_examples.py index 530047011..d163be79b 100755 --- a/port/renesas-tb-s1ja-cc256x/create_examples.py +++ b/port/renesas-tb-s1ja-cc256x/create_examples.py @@ -12,7 +12,7 @@ import subprocess # init_script = 'bluetooth_init_cc2564B_1.8_BT_Spec_4.1.c' # use for CC2564C -init_script = 'bluetooth_init_cc2564C_1.3.c' +init_script = 'bluetooth_init_cc2564C_1.4.c' gatt_update_bat_template = '''python.exe BTSTACK_ROOT\\tool\\compile_gatt.py BTSTACK_ROOT\\example\\EXAMPLE.gatt PROJECT_SRC\\EXAMPLE.h ''' diff --git a/port/stm32-f103rb-nucleo/Makefile b/port/stm32-f103rb-nucleo/Makefile index 508fac4a6..ab9cfa548 100644 --- a/port/stm32-f103rb-nucleo/Makefile +++ b/port/stm32-f103rb-nucleo/Makefile @@ -25,7 +25,7 @@ CORE = \ COMMON = \ ad_parser.c \ - bluetooth_init_cc2564B_1.6_BT_Spec_4.1.c \ + bluetooth_init_cc2564B_1.8_BT_Spec_4.1.c \ btstack_chipset_cc256x.c \ btstack_link_key_db_memory.c \ rfcomm.c \ diff --git a/port/stm32-f4discovery-cc256x/README.md b/port/stm32-f4discovery-cc256x/README.md index 58412309d..edb837186 100644 --- a/port/stm32-f4discovery-cc256x/README.md +++ b/port/stm32-f4discovery-cc256x/README.md @@ -13,7 +13,7 @@ CC256x Bluetooth module: - [CC2564B Dual-mode Bluetooth® Controller Evaluation Module](https://store.ti.com/cc2564modnem.aspx) - [CC2564C Dual-mode Bluetooth® Controller Evaluation Module](https://store.ti.com/CC256XCQFN-EM-CC2564C-Dual-Mode-Bluetooth-Controller-Evaluation-Module-P51277.aspx) -The module with the older CC2564B is around USD 20, while the one with the new CC2564C costs around USD 60. The projects are configured for the CC2564B. When using the CC2564C, *bluetooth_init_cc2564C_1.3.c* should be used as cc256x_init_script. +The module with the older CC2564B is around USD 20, while the one with the new CC2564C costs around USD 60. The projects are configured for the CC2564B. When using the CC2564C, *bluetooth_init_cc2564C_1.4.c* should be used as cc256x_init_script. ## Software diff --git a/port/windows-h4/Makefile b/port/windows-h4/Makefile index 98479251a..55bfcc28f 100644 --- a/port/windows-h4/Makefile +++ b/port/windows-h4/Makefile @@ -9,7 +9,7 @@ COMMON += \ btstack_uart_block_windows.c \ le_device_db_tlv.c \ btstack_link_key_db_tlv.c \ - bluetooth_init_cc2564B_1.6_BT_Spec_4.1.c \ + bluetooth_init_cc2564B_1.8_BT_Spec_4.1.c \ btstack_chipset_cc256x.c \ btstack_chipset_csr.c \ btstack_chipset_em9301.c \