From 0b793fdf21b8e44b6a5e8182b449a541a806187e Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Mon, 6 Nov 2017 12:33:32 +0100 Subject: [PATCH] wiced-h4: fix path to bluetooth firmwares --- port/wiced-h4/create_examples.py | 10 +--------- port/wiced-h4/wiced-h4.mk | 4 ++-- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/port/wiced-h4/create_examples.py b/port/wiced-h4/create_examples.py index 50c4d7dcb..367ef9105 100755 --- a/port/wiced-h4/create_examples.py +++ b/port/wiced-h4/create_examples.py @@ -22,7 +22,6 @@ $(NAME)_SOURCES := ../../../libraries/btstack/example/EXAMPLE.c $(NAME)_COMPONENTS += btstack/port/wiced-h4 $(NAME)_CFLAGS += ADDITIONAL_CFLAGS -BT_FIRMWARE_PATH := BLUETOOTH_FIRMWARE_PATH BT_FIRMWARE_FILE := BLUETOOTH_FIRMWARE_FILE ''' @@ -70,13 +69,6 @@ if wiced_version < "3.4.0": # NOTE: it would be more robust to check for files on disk -# drivers folder was moved into librarias with 4.0 -if wiced_version < "4.0": - bluetooth_firmware_path = 'drivers/bluetooth/firmware' -else: - bluetooth_firmware_path = 'libraries/drivers/bluetooth/firmware' -print("Bluetooth Firmware in %s" % bluetooth_firmware_path) - # bluetooth firmware image name changed in 5.2 if wiced_version < "5.2": bluetooth_firmware_file = 'bt_firmware_image.c' @@ -105,7 +97,7 @@ for file in os.listdir(examples_embedded): # create .mk file with open(apps_folder + example + ".mk", "wt") as fout: - fout.write(mk_template.replace("EXAMPLE", example).replace("TOOL", script_path).replace("ADDITIONAL_CFLAGS", additional_cflags).replace("DATE",time.strftime("%c")).replace('BLUETOOTH_FIRMWARE_PATH', bluetooth_firmware_path).replace('BLUETOOTH_FIRMWARE_FILE', bluetooth_firmware_file)) + fout.write(mk_template.replace("EXAMPLE", example).replace("TOOL", script_path).replace("ADDITIONAL_CFLAGS", additional_cflags).replace("DATE",time.strftime("%c")).replace('BLUETOOTH_FIRMWARE_FILE', bluetooth_firmware_file)) # create update_gatt.sh if .gatt file is present gatt_path = examples_embedded + example + ".gatt" diff --git a/port/wiced-h4/wiced-h4.mk b/port/wiced-h4/wiced-h4.mk index d216b41a2..b2daac60d 100644 --- a/port/wiced-h4/wiced-h4.mk +++ b/port/wiced-h4/wiced-h4.mk @@ -63,7 +63,7 @@ $(NAME)_SOURCES += \ ../../chipset/bcm/btstack_chipset_bcm.c \ ifeq ($(BT_CHIP_XTAL_FREQUENCY),) -$(NAME)_SOURCES += ../../../../$(BT_FIRMWARE_PATH)/$(BT_CHIP)$(BT_CHIP_REVISION)/$(BT_FIRMWARE_FILE) +$(NAME)_SOURCES += ../../../drivers/bluetooth/firmware/$(BT_CHIP)$(BT_CHIP_REVISION)/$(BT_FIRMWARE_FILE) else -$(NAME)_SOURCES += ../../../../$(BT_FIRMWARE_PATH)/$(BT_CHIP)$(BT_CHIP_REVISION)/$(BT_CHIP_XTAL_FREQUENCY)/$(BT_FIRMWARE_FILE) +$(NAME)_SOURCES += ../../../drivers/bluetooth/firmware/$(BT_CHIP)$(BT_CHIP_REVISION)/$(BT_CHIP_XTAL_FREQUENCY)/$(BT_FIRMWARE_FILE) endif