From a15efc861737d1da360dc5169bcf7780f5e7e649 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Mon, 4 Dec 2017 15:53:40 +0100 Subject: [PATCH] atwilc3000: use BLE-only firmware from ASF --- chipset/atwilc3000/Makefile.inc | 4 ++++ port/posix-h4-atwilc3000/Makefile | 1 - port/posix-h4-atwilc3000/main.c | 5 +++-- port/samv71-xplained-atwilc3000/example/template/Makefile | 2 +- port/samv71-xplained-atwilc3000/example/template/config.mk | 2 +- port/samv71-xplained-atwilc3000/main.c | 4 ++-- 6 files changed, 11 insertions(+), 7 deletions(-) diff --git a/chipset/atwilc3000/Makefile.inc b/chipset/atwilc3000/Makefile.inc index 7f614e9f8..16f8e1631 100644 --- a/chipset/atwilc3000/Makefile.inc +++ b/chipset/atwilc3000/Makefile.inc @@ -4,6 +4,10 @@ CONVERSION_SCRIPT=$(BTSTACK_ROOT)/chipset/atwilc3000/convert_firmware_bin.py +wilc3000_ble_firmware.h: + @echo "Downloading $@" + @curl https://bluekitchen-gmbh.com/files/ble_firmware_3000.h > wilc3000_ble_firmware.h + wilc3000_bt_firmware.c: wilc3000_bt_firmware.bin @$(CONVERSION_SCRIPT) wilc3000_bt_firmware.bin diff --git a/port/posix-h4-atwilc3000/Makefile b/port/posix-h4-atwilc3000/Makefile index affd215b9..657713f7d 100644 --- a/port/posix-h4-atwilc3000/Makefile +++ b/port/posix-h4-atwilc3000/Makefile @@ -3,7 +3,6 @@ BTSTACK_ROOT = ../.. CORE += \ btstack_chipset_atwilc3000.c \ - wilc3000_bt_firmware.c \ btstack_link_key_db_fs.c \ btstack_run_loop_posix.c \ btstack_uart_block_posix.c \ diff --git a/port/posix-h4-atwilc3000/main.c b/port/posix-h4-atwilc3000/main.c index dc07a9adf..a126a60a6 100644 --- a/port/posix-h4-atwilc3000/main.c +++ b/port/posix-h4-atwilc3000/main.c @@ -62,7 +62,8 @@ #include "btstack_stdin.h" #include "btstack_chipset_atwilc3000.h" -#include "wilc3000_bt_firmware.h" +// #include "wilc3000_bt_firmware.h" +#include "wilc3000_ble_firmware.h" static int main_argc; static const char ** main_argv; @@ -169,7 +170,7 @@ int main(int argc, const char * argv[]){ printf("Phase 1: Download firmware\n"); // phase #2 start main app - btstack_chipset_atwilc3000_download_firmware(uart_driver, transport_config.baudrate_init, transport_config.flowcontrol, atwilc3000_fw_data, atwilc3000_fw_size, &phase2); + btstack_chipset_atwilc3000_download_firmware(uart_driver, transport_config.baudrate_init, transport_config.flowcontrol, (const uint8_t *) firmware_ble, sizeof(firmware_ble), &phase2); // go btstack_run_loop_execute(); diff --git a/port/samv71-xplained-atwilc3000/example/template/Makefile b/port/samv71-xplained-atwilc3000/example/template/Makefile index 3133bc694..a89a7ad5e 100644 --- a/port/samv71-xplained-atwilc3000/example/template/Makefile +++ b/port/samv71-xplained-atwilc3000/example/template/Makefile @@ -49,7 +49,7 @@ BTSTACK_ROOT=../../../.. # enforce .gatt compilation if needed -all: le_counter.h wilc3000_bt_firmware.c +all: le_counter.h wilc3000_ble_firmware.h le_counter.h: ${BTSTACK_ROOT}/example/le_counter.gatt python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@ diff --git a/port/samv71-xplained-atwilc3000/example/template/config.mk b/port/samv71-xplained-atwilc3000/example/template/config.mk index 27460a07c..a235303b5 100644 --- a/port/samv71-xplained-atwilc3000/example/template/config.mk +++ b/port/samv71-xplained-atwilc3000/example/template/config.mk @@ -53,7 +53,7 @@ TARGET_SRAM=le_counter_sram.elf # template main file + firmware file BTSTACK_ROOT_CONFIG = ../../../ CSRCS+=${BTSTACK_ROOT_CONFIG}/example/le_counter.c -CSRCS+=${BTSTACK_ROOT_CONFIG}/port/samv71-xplained-atwilc3000/example/template/wilc3000_bt_firmware.c +# sCSRCS+=${BTSTACK_ROOT_CONFIG}/port/samv71-xplained-atwilc3000/example/template/wilc3000_bt_firmware.c # List of C source files. CSRCS+= \ diff --git a/port/samv71-xplained-atwilc3000/main.c b/port/samv71-xplained-atwilc3000/main.c index 68fcd859d..a49da29fc 100644 --- a/port/samv71-xplained-atwilc3000/main.c +++ b/port/samv71-xplained-atwilc3000/main.c @@ -16,7 +16,7 @@ #include "hal_tick.h" #include "hci.h" #include "hci_dump.h" -#include "wilc3000_bt_firmware.h" +#include "wilc3000_ble_firmware.h" // #define USE_XDMAC_FOR_USART #define XDMA_CH_UART_TX 0 @@ -582,7 +582,7 @@ int main(void) printf("Phase 1: Download firmware\n"); // phase #2 start main app - btstack_chipset_atwilc3000_download_firmware(uart_driver, transport_config.baudrate_init, transport_config.flowcontrol, atwilc3000_fw_data, atwilc3000_fw_size, &phase2); + btstack_chipset_atwilc3000_download_firmware(uart_driver, transport_config.baudrate_init, transport_config.flowcontrol, (const uint8_t *) firmware_ble, sizeof(firmware_ble), &phase2); // go btstack_run_loop_execute();