1# 2# Makefile to download and convert TI's CC256x Service Pack .bts files from 3# http://processors.wiki.ti.com/index.php/CC256x_Downloads 4# 5# Service Packs for CC256xB v1.5 and CC256xC v1.0 downloaded from BlueKitchen company website 6# https://e2e.ti.com/support/wireless_connectivity/bluetooth_cc256x/f/660/p/560523/2056007#2056007 7 8TI_GIT_REPO_URL = https://git.ti.com/cgit/ti-bt/service-packs/blobs/raw/a027ae390d8790e56e1c78136c78fe6537470e91 9BLUEKITCHEN_URL = https://bluekitchen-gmbh.com/files/ 10CONVERSION_SCRIPT=$(BTSTACK_ROOT)/chipset/cc256x/convert_bts_init_scripts.py 11 12 13# First generation CC2560 - AKA TIInit_6.2.31.bts 14 15# v2.44 - file part of .zip archive 16 17CC2560_BT_SP_BTS.zip: 18 @echo "Downloading $@" 19 @curl -sS -O https://processors.wiki.ti.com/images/d/da/CC2560_BT_SP_BTS.zip 20 21bluetooth_init_cc2560_2.44.bts: CC2560_BT_SP_BTS.zip 22 @echo "Extracting $@" 23 @unzip -q -j -o CC2560_BT_SP_BTS.zip CC2560_BT_SP_BTS/bluetooth_init_cc2560_2.44.bts 24 25# Second generation CC2560A and CC2564 - AKA TIInit_6.6.15.bts 26 27# v2.14 - files part of .zip archive 28 29CC2560A_BT_SP_BTS.zip: 30 @echo "Downloading $@" 31 @curl -sS -O https://processors.wiki.ti.com/images/e/e7/CC2560A_BT_SP_BTS.zip 32 33CC2564_BT_BLE_SP_BTS.zip: 34 @echo "Downloading $@" 35 @curl -sS -O https://processors.wiki.ti.com/images/1/1e/CC2564_BT_BLE_SP_BTS.zip 36 37bluetooth_init_cc2560A_2.14.bts: CC2560A_BT_SP_BTS.zip 38 @echo "Extracting $@" 39 @unzip -q -j -o CC2560A_BT_SP_BTS.zip CC2560A_BT_SP_BTS/bluetooth_init_cc2560A_2.14.bts 40 41bluetooth_init_cc2564_2.14.bts: CC2564_BT_BLE_SP_BTS.zip 42 @echo "Extracting $@" 43 @unzip -q -j -o CC2564_BT_BLE_SP_BTS.zip CC2564_BT_BLE_SP_BTS/bluetooth_init_cc2564_2.14.bts 44 45# Third generation CC256xB - AKA TIInit_6.7.16.bts 46 47# v1.2 - versioned files TI Git Repo 48bluetooth_init_cc2560B_1.2_BT_Spec_4.1.bts: 49 @echo "Downloading $@" 50 @curl -sS -O $(TI_GIT_REPO_URL)/bluetooth_init_cc2560B_1.2_BT_Spec_4.1.bts 51 52bluetooth_init_cc2564B_1.2_BT_Spec_4.1.bts: 53 @echo "Downloading $@" 54 @curl -sS -O $(TI_GIT_REPO_URL)/bluetooth_init_cc2564B_1.2_BT_Spec_4.1.bts 55 56BLE_init_cc2564B_1.2.bts: 57 @echo "Downloading $@" 58 @curl -sS -O $(TI_GIT_REPO_URL)/BLE_init_cc2564B_1.2.bts 59 60# v1.4 - versioned files TI Git Repo 61TIInit_6.7.16_bt_spec_4.1.bts: 62 @echo "Downloading $@" 63 @curl -sS -O https://git.ti.com/ti-bt/service-packs/blobs/raw/54f5c151dacc608b19ab2ce4c30e27a3983048b2/initscripts/TIInit_6.7.16_bt_spec_4.1.bts 64 65TIInit_6.7.16_ble_add-on.bts: 66 @echo "Downloading $@" 67 @curl -sS -O https://git.ti.com/ti-bt/service-packs/blobs/raw/89c8db14929f10d75627b132690432cd71f5f54f/initscripts/TIInit_6.7.16_ble_add-on.bts 68 69# v1.5 - unversioned files from BlueKitchen website, original: http://www.ti.com/tool/cc256xb-bt-sp 70cc256x_bt_sp_v1.5.zip: 71 echo "Downloading $@" 72 @curl -sS -O $(BLUEKITCHEN_URL)/cc256x_bt_sp_v1.5.zip 73 74cc256x_bt_sp_v1.5/initscripts-TIInit_6.7.16_bt_spec_4.1.bts: cc256x_bt_sp_v1.5.zip 75 @echo "Extracting $@" 76 @mkdir -p cc256x_bt_sp_v1.5 77 @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 78 79cc256x_bt_sp_v1.5/initscripts-TIInit_6.7.16_ble_add-on.bts: cc256x_bt_sp_v1.5.zip 80 @echo "Extracting $@" 81 @mkdir -p cc256x_bt_sp_v1.5 82 @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 83 84# v1.6 - unversioned files from BlueKitchen website, original: http://www.ti.com/tool/cc256xb-bt-sp 85cc256xb_bt_sp_v1.6.zip: 86 echo "Downloading $@" 87 @curl -sS -O $(BLUEKITCHEN_URL)/cc256xb_bt_sp_v1.6.zip 88 89cc256xb_bt_sp_v1.6/initscripts-TIInit_6.7.16_bt_spec_4.1.bts: cc256xb_bt_sp_v1.6.zip 90 @echo "Extracting $@" 91 @mkdir -p cc256xb_bt_sp_v1.6 92 @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 93 94cc256xb_bt_sp_v1.6/initscripts-TIInit_6.7.16_ble_add-on.bts: cc256xb_bt_sp_v1.6.zip 95 @echo "Extracting $@" 96 @mkdir -p cc256xb_bt_sp_v1.6 97 @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 98 99# v1.7 - not available, please use v1.8 or newer 100 101# v1.8 - unversioned files from BlueKitchen website, original: http://www.ti.com/tool/cc256xb-bt-sp 102cc256xb_bt_sp_v1.8.zip: 103 echo "Downloading $@" 104 @curl -sS -O $(BLUEKITCHEN_URL)/cc256xb_bt_sp_v1.8.zip 105 106cc256xb_bt_sp_v1.8/initscripts-TIInit_6.7.16_bt_spec_4.1.bts: cc256xb_bt_sp_v1.8.zip 107 @echo "Extracting $@" 108 @mkdir -p cc256xb_bt_sp_v1.8 109 @unzip -q -j -o cc256xb_bt_sp_v1.8.zip -d cc256xb_bt_sp_v1.8 CC256XB_BT_SP/v1.8/initscripts-TIInit_6.7.16_bt_spec_4.1.bts 110 111cc256xb_bt_sp_v1.8/initscripts-TIInit_6.7.16_ble_add-on.bts: cc256xb_bt_sp_v1.8.zip 112 @echo "Extracting $@" 113 @mkdir -p cc256xb_bt_sp_v1.8 114 @unzip -q -j -o cc256xb_bt_sp_v1.8.zip -d cc256xb_bt_sp_v1.8 CC256XB_BT_SP/v1.8/initscripts-TIInit_6.7.16_ble_add-on.bts 115 116cc256xb_bt_sp_v1.8/initscripts-TIInit_6.7.16_avpr_add-on.bts: cc256xb_bt_sp_v1.8.zip 117 @echo "Extracting $@" 118 @mkdir -p cc256xb_bt_sp_v1.8 119 @unzip -q -j -o cc256xb_bt_sp_v1.8.zip -d cc256xb_bt_sp_v1.8 CC256XB_BT_SP/v1.8/initscripts-TIInit_6.7.16_avpr_add-on.bts 120 121# Fourth generation CC256xC - TIInit_6.12.26.bts 122 123# v1.0 - unversioned files from BlueKitchen website, original: http://www.ti.com/tool/cc256xc-bt-sp 124cc256xc_bt_sp_v1.0.zip: 125 @echo "Downloading $@" 126 @curl -sS -O $(BLUEKITCHEN_URL)/cc256xc_bt_sp_v1.0.zip 127 128initscripts-TIInit_6.12.26_v1.0.bts: cc256xc_bt_sp_v1.0.zip 129 @echo "Extracting $@" 130 @unzip -q -p cc256xc_bt_sp_v1.0.zip CC256XC_BT_SP/v1.0/initscripts-TIInit_6.12.26.bts > $@ 131 132initscripts-TIInit_6.12.26_ble_add-on_v1.0.bts: cc256xc_bt_sp_v1.0.zip 133 @echo "Extracting $@" 134 @unzip -q -p cc256xc_bt_sp_v1.0.zip CC256XC_BT_SP/v1.0/initscripts-TIInit_6.12.26_ble_add-on.bts > $@ 135 136# v1.1 - unversioned files from BlueKitchen website, original: http://www.ti.com/tool/cc256xc-bt-sp 137cc256xc_bt_sp_v1.1.zip: 138 @echo "Downloading $@" 139 @curl -sS -O $(BLUEKITCHEN_URL)/cc256xc_bt_sp_v1.1.zip 140 141initscripts-TIInit_6.12.26_v1.1.bts: cc256xc_bt_sp_v1.1.zip 142 @echo "Extracting $@" 143 @unzip -q -p cc256xc_bt_sp_v1.1.zip CC256XC_BT_SP/v1.1/initscripts-TIInit_6.12.26.bts > $@ 144 145initscripts-TIInit_6.12.26_ble_add-on_v1.1.bts: cc256xc_bt_sp_v1.1.zip 146 @echo "Extracting $@" 147 @unzip -q -p cc256xc_bt_sp_v1.1.zip CC256XC_BT_SP/v1.1/initscripts-TIInit_6.12.26_ble_add-on.bts > $@ 148 149# v1.2 - unversioned files from BlueKitchen website, original: http://www.ti.com/tool/cc256xc-bt-sp 150cc256xc_bt_sp_v1.2.zip: 151 @echo "Downloading $@" 152 @curl -sS -O $(BLUEKITCHEN_URL)/cc256xc_bt_sp_v1.2.zip 153 154initscripts-TIInit_6.12.26_v1.2.bts: cc256xc_bt_sp_v1.2.zip 155 @echo "Extracting $@" 156 @unzip -q -p cc256xc_bt_sp_v1.2.zip CC256XC_BT_SP/v1.2/initscripts-TIInit_6.12.26.bts > $@ 157 158initscripts-TIInit_6.12.26_ble_add-on_v1.2.bts: cc256xc_bt_sp_v1.2.zip 159 @echo "Extracting $@" 160 @unzip -q -p cc256xc_bt_sp_v1.2.zip CC256XC_BT_SP/v1.2/initscripts-TIInit_6.12.26_ble_add-on.bts > $@ 161 162# v1.3 - unversioned files from BlueKitchen website, original: http://www.ti.com/tool/cc256xc-bt-sp 163cc256xc_bt_sp_v1.3.zip: 164 @echo "Downloading $@" 165 @curl -sS -O $(BLUEKITCHEN_URL)/cc256xc_bt_sp_v1.3.zip 166 167initscripts-TIInit_6.12.26_v1.3.bts: cc256xc_bt_sp_v1.3.zip 168 @echo "Extracting $@" 169 @unzip -q -p cc256xc_bt_sp_v1.3.zip CC256XC_BT_SP/v1.3/initscripts-TIInit_6.12.26.bts > $@ 170 171initscripts-TIInit_6.12.26_ble_add-on_v1.3.bts: cc256xc_bt_sp_v1.3.zip 172 @echo "Extracting $@" 173 @unzip -q -p cc256xc_bt_sp_v1.3.zip CC256XC_BT_SP/v1.3/initscripts-TIInit_6.12.26_ble_add-on.bts > $@ 174 175# v1.4 - unversioned files from BlueKitchen website, original: http://www.ti.com/tool/cc256xc-bt-sp 176cc256xc_bt_sp_v1.4.zip: 177 @echo "Downloading $@" 178 @curl -sS -O $(BLUEKITCHEN_URL)/cc256xc_bt_sp_v1.4.zip 179 180initscripts-TIInit_6.12.26_v1.4.bts: cc256xc_bt_sp_v1.4.zip 181 @echo "Extracting $@" 182 @unzip -q -p cc256xc_bt_sp_v1.4.zip CC256XC_BT_SP/v1.4/initscripts-TIInit_6.12.26.bts > $@ 183 184initscripts-TIInit_6.12.26_ble_add-on_v1.4.bts: cc256xc_bt_sp_v1.4.zip 185 @echo "Extracting $@" 186 @unzip -q -p cc256xc_bt_sp_v1.4.zip CC256XC_BT_SP/v1.4/initscripts-TIInit_6.12.26_ble_add-on.bts > $@ 187 188initscripts-TIInit_6.12.26_avpr_add-on_v1.4.bts: cc256xc_bt_sp_v1.4.zip 189 @echo "Extracting $@" 190 @unzip -q -p cc256xc_bt_sp_v1.4.zip CC256XC_BT_SP/v1.4/initscripts-TIInit_6.12.26_avpr_add-on.bts > $@ 191 192# Various scripts for WL chipsets 193 194# V4.2 from BlueKitchen website, original: http://www.ti.com/tool/wl18xx-bt-sp 195TIInit_11.8.32.bts: 196 @echo "Downloading $@" 197 @curl -sS -O $(BLUEKITCHEN_URL)/TIInit_11.8.32.bts 198 199TIInit_12.10.28.bts: 200 @echo "Downloading $@" 201 @curl -sS -O $(TI_GIT_REPO_URL)/TIInit_12.10.28.bts 202 203TIInit_12.8.32.bts: 204 @echo "Downloading $@" 205 @curl -sS -O $(TI_GIT_REPO_URL)/TIInit_12.8.32.bts 206 207 208 209# convert to .c files based on main file and option add-on 210 211bluetooth_init_cc2560_2.44.c: bluetooth_init_cc2560_2.44.bts 212 @echo "Creating $@" 213 @$(CONVERSION_SCRIPT) $^ $@ 214 215bluetooth_init_cc2560A_2.14.c: bluetooth_init_cc2560A_2.14.bts 216 @echo "Creating $@" 217 @$(CONVERSION_SCRIPT) $^ $@ 218 219bluetooth_init_cc2567_2.4.c: CC2567_BT_ANT_Service_Pack_2.4.bts 220 @echo "Creating $@" 221 @$(CONVERSION_SCRIPT) $^ $@ 222 223bluetooth_init_cc2567_2.8.c: CC256x_BT_Service_Pack_2.8_ANT_1.16.bts 224 @echo "Creating $@" 225 @$(CONVERSION_SCRIPT) $^ $@ 226 227bluetooth_init_cc2564_2.14.c: bluetooth_init_cc2564_2.14.bts 228 @echo "Creating $@" 229 @$(CONVERSION_SCRIPT) $^ $@ 230 231bluetooth_init_cc2560B_1.2_BT_Spec_4.1.c: bluetooth_init_cc2560B_1.2_BT_Spec_4.1.bts 232 @echo "Creating $@" 233 @$(CONVERSION_SCRIPT) $^ $@ 234 235bluetooth_init_cc2564B_1.2_BT_Spec_4.1.c: bluetooth_init_cc2564B_1.2_BT_Spec_4.1.bts BLE_init_cc2564B_1.2.bts 236 @echo "Creating $@" 237 @$(CONVERSION_SCRIPT) $^ $@ 238 239bluetooth_init_cc2560B_1.4_BT_Spec_4.1.c: TIInit_6.7.16_bt_spec_4.1.bts 240 @echo "Creating $@" 241 @$(CONVERSION_SCRIPT) $^ $@ 242 243bluetooth_init_cc2564B_1.4_BT_Spec_4.1.c: TIInit_6.7.16_bt_spec_4.1.bts TIInit_6.7.16_ble_add-on.bts 244 @echo "Creating $@" 245 @$(CONVERSION_SCRIPT) $^ $@ 246 247bluetooth_init_cc2560B_1.5_BT_Spec_4.1.c: cc256x_bt_sp_v1.5/initscripts-TIInit_6.7.16_bt_spec_4.1.bts 248 @echo "Creating $@" 249 @$(CONVERSION_SCRIPT) $^ $@ 250 251bluetooth_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 252 @echo "Creating $@" 253 @$(CONVERSION_SCRIPT) $^ $@ 254 255bluetooth_init_cc2560B_1.6_BT_Spec_4.1.c: cc256xb_bt_sp_v1.6/initscripts-TIInit_6.7.16_bt_spec_4.1.bts 256 @echo "Creating $@" 257 @$(CONVERSION_SCRIPT) $^ $@ 258 259bluetooth_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 260 @echo "Creating $@" 261 @$(CONVERSION_SCRIPT) $^ $@ 262 263bluetooth_init_cc2560B_1.8_BT_Spec_4.1.c: cc256xb_bt_sp_v1.8/initscripts-TIInit_6.7.16_bt_spec_4.1.bts 264 @echo "Creating $@" 265 @$(CONVERSION_SCRIPT) $^ $@ 266 267bluetooth_init_cc2560B_avpr_1.8_BT_Spec_4.1.c: cc256xb_bt_sp_v1.8/initscripts-TIInit_6.7.16_bt_spec_4.1.bts cc256xb_bt_sp_v1.8/initscripts-TIInit_6.7.16_avpr_add-on.bts 268 269 @echo "Creating $@" 270 @$(CONVERSION_SCRIPT) $^ $@ 271 272bluetooth_init_cc2564B_1.8_BT_Spec_4.1.c: cc256xb_bt_sp_v1.8/initscripts-TIInit_6.7.16_bt_spec_4.1.bts cc256xb_bt_sp_v1.8/initscripts-TIInit_6.7.16_ble_add-on.bts 273 @echo "Creating $@" 274 @$(CONVERSION_SCRIPT) $^ $@ 275 276bluetooth_init_cc2560C_1.0.c: initscripts-TIInit_6.12.26_v1.0.bts 277 @echo "Creating $@" 278 @$(CONVERSION_SCRIPT) $^ $@ 279 280bluetooth_init_cc2564C_1.0.c: initscripts-TIInit_6.12.26_v1.0.bts initscripts-TIInit_6.12.26_ble_add-on_v1.0.bts 281 @echo "Creating $@" 282 @$(CONVERSION_SCRIPT) $^ $@ 283 284bluetooth_init_cc2560C_1.1.c: initscripts-TIInit_6.12.26_v1.1.bts 285 @echo "Creating $@" 286 @$(CONVERSION_SCRIPT) $^ $@ 287 288bluetooth_init_cc2564C_1.1.c: initscripts-TIInit_6.12.26_v1.1.bts initscripts-TIInit_6.12.26_ble_add-on_v1.1.bts 289 @echo "Creating $@" 290 @$(CONVERSION_SCRIPT) $^ $@ 291 292bluetooth_init_cc2560C_1.2.c: initscripts-TIInit_6.12.26_v1.2.bts 293 @echo "Creating $@" 294 @$(CONVERSION_SCRIPT) $^ $@ 295 296bluetooth_init_cc2564C_1.2.c: initscripts-TIInit_6.12.26_v1.2.bts initscripts-TIInit_6.12.26_ble_add-on_v1.2.bts 297 @echo "Creating $@" 298 @$(CONVERSION_SCRIPT) $^ $@ 299 300bluetooth_init_cc2560C_1.3.c: initscripts-TIInit_6.12.26_v1.3.bts 301 @echo "Creating $@" 302 @$(CONVERSION_SCRIPT) $^ $@ 303 304bluetooth_init_cc2564C_1.3.c: initscripts-TIInit_6.12.26_v1.3.bts initscripts-TIInit_6.12.26_ble_add-on_v1.3.bts 305 @echo "Creating $@" 306 @$(CONVERSION_SCRIPT) $^ $@ 307 308bluetooth_init_cc2560C_1.4.c: initscripts-TIInit_6.12.26_v1.4.bts 309 @echo "Creating $@" 310 @$(CONVERSION_SCRIPT) $^ $@ 311 312bluetooth_init_cc2560C_avpr_1.4.c: initscripts-TIInit_6.12.26_v1.4.bts initscripts-TIInit_6.12.26_avpr_add-on_v1.4.bts 313 @echo "Creating $@" 314 @$(CONVERSION_SCRIPT) $^ $@ 315 316bluetooth_init_cc2564C_1.4.c: initscripts-TIInit_6.12.26_v1.4.bts initscripts-TIInit_6.12.26_ble_add-on_v1.4.bts 317 @echo "Creating $@" 318 @$(CONVERSION_SCRIPT) $^ $@ 319 320 321TIInit_11.8.32.c: TIInit_11.8.32.bts 322 @echo "Creating $@" 323 @$(CONVERSION_SCRIPT) $^ $@ 324 325TIInit_12.10.28.c: TIInit_12.10.28.bts 326 @echo "Creating $@" 327 @$(CONVERSION_SCRIPT) $^ $@ 328 329TIInit_12.8.32.c: TIInit_12.8.32.bts 330 @echo "Creating $@" 331 @$(CONVERSION_SCRIPT) $^ $@ 332 333all-scripts: \ 334 bluetooth_init_cc2560_2.44.c \ 335 bluetooth_init_cc2560A_2.14.c \ 336 bluetooth_init_cc2564_2.14.bts \ 337 bluetooth_init_cc2560B_1.8_BT_Spec_4.1.c \ 338 bluetooth_init_cc2564B_1.8_BT_Spec_4.1.c \ 339 bluetooth_init_cc2560C_1.4.c \ 340 bluetooth_init_cc2560C_avpr_1.4.c \ 341 bluetooth_init_cc2564C_1.4.c \ 342 TIInit_11.8.32.c \ 343 TIInit_12.10.28.c \ 344 TIInit_12.8.32.c \ 345 346clean-scripts: 347 rm -fr cc256x*.zip CC256*.zip bluetooth_init_cc256*.c TIInit*.c *.bts BLE_init_cc256*.c 348 349 350