xref: /btstack/chipset/cc256x/Makefile.inc (revision f12924e0a61c0582b548a1e70cea1bd59ba21f1d)
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/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 http://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 http://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 http://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.6.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
74initscripts-TIInit_6.7.16_bt_spec_4.1.bts: cc256x_bt_sp_v1.5.zip
75	@echo "Extracting $@"
76	@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
77
78initscripts-TIInit_6.7.16_ble_add-on.bts: cc256x_bt_sp_v1.5.zip
79	@echo "Extracting $@"
80	@unzip -q -j -o cc256x_bt_sp_v1.5.zip CC256X_BT_SP/v1.5/initscripts-TIInit_6.7.16_ble_add-on.bts
81
82
83# Fourth generation CC256xC - TIInit_6.12.26.bts
84
85# v1.0 - unversioned files from BlueKitchen website, original: http://www.ti.com/tool/cc256xc-bt-sp
86cc256xc_bt_sp_v1.0.zip:
87	@echo "Downloading $@"
88	@curl -sS -O $(BLUEKITCHEN_URL)/cc256xc_bt_sp_v1.0.zip
89
90initscripts-TIInit_6.12.26.bts: cc256xc_bt_sp_v1.0.zip
91	@echo "Extracting $@"
92	@unzip -q -j -o cc256xc_bt_sp_v1.0.zip CC256XC_BT_SP/v1.0/initscripts-TIInit_6.12.26.bts
93
94initscripts-TIInit_6.12.26_ble_add-on.bts: cc256xc_bt_sp_v1.0.zip
95	@echo "Extracting $@"
96	@unzip -q -j -o cc256xc_bt_sp_v1.0.zip CC256XC_BT_SP/v1.0/initscripts-TIInit_6.12.26_ble_add-on.bts
97
98
99# Various scripts for WL chipsets
100
101TIInit_11.8.32.bts:
102	@echo "Downloading $@"
103	@curl -sS -O $(TI_GIT_REPO_URL)/TIInit_11.8.32.bts
104
105TIInit_12.10.28.bts:
106	@echo "Downloading $@"
107	@curl -sS -O $(TI_GIT_REPO_URL)/TIInit_12.10.28.bts
108
109TIInit_12.8.32.bts:
110	@echo "Downloading $@"
111	@curl -sS -O $(TI_GIT_REPO_URL)/TIInit_12.8.32.bts
112
113
114
115# convert to .c files based on main file and option add-on
116
117bluetooth_init_cc2560_2.44.c: bluetooth_init_cc2560_2.44.bts
118	@echo "Creating $@"
119	@$(CONVERSION_SCRIPT) $^ $@
120
121bluetooth_init_cc2560A_2.14.c: bluetooth_init_cc2560A_2.14.bts
122	@echo "Creating $@"
123	@$(CONVERSION_SCRIPT) $^ $@
124
125bluetooth_init_cc2564_2.14.c: bluetooth_init_cc2564_2.14.bts
126	@echo "Creating $@"
127	@$(CONVERSION_SCRIPT) $^ $@
128
129bluetooth_init_cc2560B_1.2_BT_Spec_4.1.c: bluetooth_init_cc2560B_1.2_BT_Spec_4.1.bts
130	@echo "Creating $@"
131	@$(CONVERSION_SCRIPT) $^ $@
132
133bluetooth_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
134	@echo "Creating $@"
135	@$(CONVERSION_SCRIPT) $^ $@
136
137bluetooth_init_cc2560B_1.4_BT_Spec_4.1.c: TIInit_6.7.16_bt_spec_4.1.bts
138	@echo "Creating $@"
139	@$(CONVERSION_SCRIPT) $^ $@
140
141bluetooth_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
142	@echo "Creating $@"
143	@$(CONVERSION_SCRIPT) $^ $@
144
145bluetooth_init_cc2560B_1.5_BT_Spec_4.1.c: initscripts-TIInit_6.7.16_bt_spec_4.1.bts
146	@echo "Creating $@"
147	@$(CONVERSION_SCRIPT) $^ $@
148
149bluetooth_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
150	@echo "Creating $@"
151	@$(CONVERSION_SCRIPT) $^ $@
152
153bluetooth_init_cc2560C_1.0.c: initscripts-TIInit_6.12.26.bts
154	@echo "Creating $@"
155	@$(CONVERSION_SCRIPT) $^ $@
156
157bluetooth_init_cc2564C_1.0.c: initscripts-TIInit_6.12.26.bts initscripts-TIInit_6.12.26_ble_add-on.bts
158	@echo "Creating $@"
159	@$(CONVERSION_SCRIPT) $^ $@
160
161TIInit_11.8.32.c: TIInit_11.8.32.bts
162	@echo "Creating $@"
163	@$(CONVERSION_SCRIPT) $^ $@
164
165TIInit_12.10.28.c: TIInit_12.10.28.bts
166	@echo "Creating $@"
167	@$(CONVERSION_SCRIPT) $^ $@
168
169TIInit_12.8.32.c: TIInit_12.8.32.bts
170	@echo "Creating $@"
171	@$(CONVERSION_SCRIPT) $^ $@
172
173all-scripts: \
174	bluetooth_init_cc2560_2.44.c \
175	bluetooth_init_cc2560A_2.14.c \
176	bluetooth_init_cc2564_2.14.bts \
177	bluetooth_init_cc2560B_1.4_BT_Spec_4.1.c \
178	bluetooth_init_cc2564B_1.4_BT_Spec_4.1.c \
179	bluetooth_init_cc2560B_1.5_BT_Spec_4.1.c \
180	bluetooth_init_cc2564B_1.5_BT_Spec_4.1.c \
181	bluetooth_init_cc2560C_1.0.c \
182	bluetooth_init_cc2564C_1.0.c \
183	TIInit_11.8.32.c \
184	TIInit_12.10.28.c \
185	TIInit_12.8.32.c \
186
187clean-scripts:
188	rm -fr cc256x*.zip CC256*.zip bluetooth_init_cc256*.c TIInit*.c *.bts BLE_init_cc256*.c
189
190
191