xref: /btstack/chipset/cc256x/Makefile.inc (revision e9c5f44ee8add45f6cd4be8b6faa9e09a2804fcc)
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.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
100# Fourth generation CC256xC - TIInit_6.12.26.bts
101
102# v1.0 - unversioned files from BlueKitchen website, original: http://www.ti.com/tool/cc256xc-bt-sp
103cc256xc_bt_sp_v1.0.zip:
104	@echo "Downloading $@"
105	@curl -sS -O $(BLUEKITCHEN_URL)/cc256xc_bt_sp_v1.0.zip
106
107initscripts-TIInit_6.12.26_v1.0.bts: cc256xc_bt_sp_v1.0.zip
108	@echo "Extracting $@"
109	@unzip -q -p cc256xc_bt_sp_v1.0.zip CC256XC_BT_SP/v1.0/initscripts-TIInit_6.12.26.bts > $@
110
111initscripts-TIInit_6.12.26_ble_add-on_v1.0.bts: cc256xc_bt_sp_v1.0.zip
112	@echo "Extracting $@"
113	@unzip -q -p cc256xc_bt_sp_v1.0.zip CC256XC_BT_SP/v1.0/initscripts-TIInit_6.12.26_ble_add-on.bts > $@
114
115# v1.1 - unversioned files from BlueKitchen website, original: http://www.ti.com/tool/cc256xc-bt-sp
116cc256xc_bt_sp_v1.1.zip:
117	@echo "Downloading $@"
118	@curl -sS -O $(BLUEKITCHEN_URL)/cc256xc_bt_sp_v1.1.zip
119
120initscripts-TIInit_6.12.26_v1.1.bts: cc256xc_bt_sp_v1.1.zip
121	@echo "Extracting $@"
122	@unzip -q -p cc256xc_bt_sp_v1.1.zip CC256XC_BT_SP/v1.1/initscripts-TIInit_6.12.26.bts > $@
123
124initscripts-TIInit_6.12.26_ble_add-on_v1.1.bts: cc256xc_bt_sp_v1.1.zip
125	@echo "Extracting $@"
126	@unzip -q -p cc256xc_bt_sp_v1.1.zip CC256XC_BT_SP/v1.1/initscripts-TIInit_6.12.26_ble_add-on.bts > $@
127
128
129# Various scripts for WL chipsets
130
131# V4.2 from BlueKitchen website, original: http://www.ti.com/tool/wl18xx-bt-sp
132TIInit_11.8.32.bts:
133	@echo "Downloading $@"
134	@curl -sS -O $(BLUEKITCHEN_URL)/TIInit_11.8.32.bts
135
136TIInit_12.10.28.bts:
137	@echo "Downloading $@"
138	@curl -sS -O $(TI_GIT_REPO_URL)/TIInit_12.10.28.bts
139
140TIInit_12.8.32.bts:
141	@echo "Downloading $@"
142	@curl -sS -O $(TI_GIT_REPO_URL)/TIInit_12.8.32.bts
143
144
145
146# convert to .c files based on main file and option add-on
147
148bluetooth_init_cc2560_2.44.c: bluetooth_init_cc2560_2.44.bts
149	@echo "Creating $@"
150	@$(CONVERSION_SCRIPT) $^ $@
151
152bluetooth_init_cc2560A_2.14.c: bluetooth_init_cc2560A_2.14.bts
153	@echo "Creating $@"
154	@$(CONVERSION_SCRIPT) $^ $@
155
156bluetooth_init_cc2567_2.4.c: CC2567_BT_ANT_Service_Pack_2.4.bts
157	@echo "Creating $@"
158	@$(CONVERSION_SCRIPT) $^ $@
159
160bluetooth_init_cc2567_2.8.c: CC256x_BT_Service_Pack_2.8_ANT_1.16.bts
161	@echo "Creating $@"
162	@$(CONVERSION_SCRIPT) $^ $@
163
164bluetooth_init_cc2564_2.14.c: bluetooth_init_cc2564_2.14.bts
165	@echo "Creating $@"
166	@$(CONVERSION_SCRIPT) $^ $@
167
168bluetooth_init_cc2560B_1.2_BT_Spec_4.1.c: bluetooth_init_cc2560B_1.2_BT_Spec_4.1.bts
169	@echo "Creating $@"
170	@$(CONVERSION_SCRIPT) $^ $@
171
172bluetooth_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
173	@echo "Creating $@"
174	@$(CONVERSION_SCRIPT) $^ $@
175
176bluetooth_init_cc2560B_1.4_BT_Spec_4.1.c: TIInit_6.7.16_bt_spec_4.1.bts
177	@echo "Creating $@"
178	@$(CONVERSION_SCRIPT) $^ $@
179
180bluetooth_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
181	@echo "Creating $@"
182	@$(CONVERSION_SCRIPT) $^ $@
183
184bluetooth_init_cc2560B_1.5_BT_Spec_4.1.c: cc256x_bt_sp_v1.5/initscripts-TIInit_6.7.16_bt_spec_4.1.bts
185	@echo "Creating $@"
186	@$(CONVERSION_SCRIPT) $^ $@
187
188bluetooth_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
189	@echo "Creating $@"
190	@$(CONVERSION_SCRIPT) $^ $@
191
192bluetooth_init_cc2560B_1.6_BT_Spec_4.1.c: cc256xb_bt_sp_v1.6/initscripts-TIInit_6.7.16_bt_spec_4.1.bts
193	@echo "Creating $@"
194	@$(CONVERSION_SCRIPT) $^ $@
195
196bluetooth_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
197	@echo "Creating $@"
198	@$(CONVERSION_SCRIPT) $^ $@
199
200bluetooth_init_cc2560C_1.0.c: initscripts-TIInit_6.12.26_v1.0.bts
201	@echo "Creating $@"
202	@$(CONVERSION_SCRIPT) $^ $@
203
204bluetooth_init_cc2564C_1.0.c: initscripts-TIInit_6.12.26_v1.0.bts initscripts-TIInit_6.12.26_ble_add-on_v1.0.bts
205	@echo "Creating $@"
206	@$(CONVERSION_SCRIPT) $^ $@
207
208bluetooth_init_cc2560C_1.1.c: initscripts-TIInit_6.12.26_v1.1.bts
209	@echo "Creating $@"
210	@$(CONVERSION_SCRIPT) $^ $@
211
212bluetooth_init_cc2564C_1.1.c: initscripts-TIInit_6.12.26_v1.1.bts initscripts-TIInit_6.12.26_ble_add-on_v1.1.bts
213	@echo "Creating $@"
214	@$(CONVERSION_SCRIPT) $^ $@
215
216TIInit_11.8.32.c: TIInit_11.8.32.bts
217	@echo "Creating $@"
218	@$(CONVERSION_SCRIPT) $^ $@
219
220TIInit_12.10.28.c: TIInit_12.10.28.bts
221	@echo "Creating $@"
222	@$(CONVERSION_SCRIPT) $^ $@
223
224TIInit_12.8.32.c: TIInit_12.8.32.bts
225	@echo "Creating $@"
226	@$(CONVERSION_SCRIPT) $^ $@
227
228all-scripts: \
229	bluetooth_init_cc2560_2.44.c \
230	bluetooth_init_cc2560A_2.14.c \
231	bluetooth_init_cc2564_2.14.bts \
232	bluetooth_init_cc2560B_1.4_BT_Spec_4.1.c \
233	bluetooth_init_cc2564B_1.4_BT_Spec_4.1.c \
234	bluetooth_init_cc2560B_1.5_BT_Spec_4.1.c \
235	bluetooth_init_cc2564B_1.5_BT_Spec_4.1.c \
236	bluetooth_init_cc2560C_1.0.c \
237	bluetooth_init_cc2560C_1.1.c \
238	bluetooth_init_cc2564C_1.0.c \
239	bluetooth_init_cc2564C_1.1.c \
240	TIInit_11.8.32.c \
241	TIInit_12.10.28.c \
242	TIInit_12.8.32.c \
243
244clean-scripts:
245	rm -fr cc256x*.zip CC256*.zip bluetooth_init_cc256*.c TIInit*.c *.bts BLE_init_cc256*.c
246
247
248