Merge branch 'develop'

This commit is contained in:
Matthias Ringwald 2016-05-02 23:04:58 +02:00
commit 8ebb0850cb
62 changed files with 2495 additions and 1113 deletions

View File

@ -77,14 +77,14 @@ Status | Platform
## Supported Chipsets
Chipsets | Status
-------------- | ------
TI CC256x, WL183x | complete incl. eHCIll support and SCO-over-HCI (chipset/cc256x)
CSR 8x10, 8x11 | H4 only (chipset-csr), SCO-over-HCI missing (chipset/csr)
TI CC256x, WL183x | H4 incl. eHCIll support and SCO-over-HCI (chipset/cc256x)
CSR 8x10, 8x11 | H4 + H5 supported, SCO-over-HCI missing (chipset/csr)
STM STLC2500D | working, no support for custom deep sleep management (chipset/stlc2500d)
TC35661 | working, BLE patches missing (chipset/tc3566x)
EM 9301 (LE-only) | working, used on Arduino Shield (chipset/em9301)
CSR USB Dongles | complete, incl. SCO-over-HCI
Broadcom USB Dongles | complete, SCO-over-HCI not missing
Broadcom BCM43438 | complete. UART baudrate limited to 3 mbps, SCO-over-HCI not missing
Broadcom USB Dongles | complete, SCO-over-HCI missing
Broadcom BCM43438 | complete. UART baudrate limited to 3 mbps, SCO-over-HCI missing
## Source Tree Overview
Path | Description

View File

@ -84,7 +84,6 @@ extern const uint32_t cc256x_init_script_size;
// init script
static uint32_t init_script_offset = 0;
static int16_t init_power_in_dB = 13; // 13 dBm
static int init_ehcill_enabled = 0;
// support for SCO over HCI
#ifdef ENABLE_SCO_OVER_HCI
@ -193,11 +192,11 @@ static void update_set_class2_single_power(uint8_t * hci_cmd_buffer){
// eHCILL activate from http://e2e.ti.com/support/low_power_rf/f/660/p/134855/484776.aspx
static void update_sleep_mode_configurations(uint8_t * hci_cmd_buffer){
if (init_ehcill_enabled) {
hci_cmd_buffer[4] = 1;
} else {
hci_cmd_buffer[4] = 0;
}
#ifdef ENABLE_EHCILL
hci_cmd_buffer[4] = 1;
#else
hci_cmd_buffer[4] = 0;
#endif
}
static void update_init_script_command(uint8_t *hci_cmd_buffer){
@ -275,14 +274,6 @@ static btstack_chipset_result_t chipset_next_command(uint8_t * hci_cmd_buffer){
// MARK: public API
void btstack_chipset_cc256x_enable_ehcill(int on){
init_ehcill_enabled = on;
}
int btstack_chipset_cc256x_ehcill_enabled(void){
return init_ehcill_enabled;
}
void btstack_chipset_cc256x_set_power(int16_t power_in_dB){
init_power_in_dB = power_in_dB;
}

View File

@ -50,8 +50,6 @@ extern "C" {
#include <stdint.h>
#include "btstack_chipset.h"
void btstack_chipset_cc256x_enable_ehcill(int on);
int btstack_chipset_cc256x_ehcill_enabled(void);
void btstack_chipset_cc256x_set_power(int16_t power_in_dB);
const btstack_chipset_t * btstack_chipset_cc256x_instance(void);

View File

@ -71,6 +71,12 @@ static const uint8_t init_script[] = {
0x01, 0x00, 0xFC, 0x13, 0xc2, 0x02, 0x00, 0x09, 0x00, 0x01, 0x00, 0x03, 0x70, 0x00, 0x00, 0xc9, 0x22, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
#endif
// Enable RTS/CTS for BCSP (0806 -> 080e)
0x01, 0x00, 0xFC, 0x13, 0xc2, 0x02, 0x00, 0x09, 0x00, 0x01, 0x00, 0x03, 0x70, 0x00, 0x00, 0xbf, 0x01, 0x01, 0x00, 0x00, 0x00, 0x0e, 0x08,
// Enable RTS/CTS for H5 (1806 -> 180e, even parity still on)
0x01, 0x00, 0xFC, 0x13, 0xc2, 0x02, 0x00, 0x09, 0x00, 0x01, 0x00, 0x03, 0x70, 0x00, 0x00, 0xc1, 0x01, 0x01, 0x00, 0x00, 0x00, 0x0e, 0x18,
// Set UART baudrate to 115200
0x01, 0x00, 0xFC, 0x15, 0xc2, 0x02, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x03, 0x70, 0x00, 0x00, 0xea, 0x01, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xc2,

View File

@ -39,7 +39,6 @@ System properties:
#define | Description
-----------------------------------|-------------------------------------
HAVE_EHCILL | TI CC256x/WL18xx with eHCILL is used
HAVE_MALLOC | Use dynamic memory
@ -70,6 +69,7 @@ BTstack properties:
-------------------------|---------------------------------------------
ENABLE_CLASSIC | Enable Classic related code in HCI and L2CAP
ENABLE_BLE | Enable BLE related code in HCI and L2CAP
ENABLE_EHCILL | Enable eHCILL low power mode on TI CC256x/WL18xx chipsets
ENABLE_LOG_DEBUG | Enable log_debug messages
ENABLE_LOG_ERROR | Enable log_error messages
ENABLE_LOG_INFO | Enable log_info messages

View File

@ -1970,7 +1970,7 @@ int main (int argc, char * const * argv){
hci_transport_config_uart.baudrate_main = 0;
hci_transport_config_uart.flowcontrol = 1;
hci_transport_config_uart.device_name = UART_DEVICE;
transport = hci_transport_h4_instance();
transport = hci_transport_h4_instance(btstack_uart_block_posix_instance());
#ifdef HAVE_PLATFORM_IPHONE_OS
// use default (max) UART baudrate over netgraph interface

View File

@ -0,0 +1,155 @@
/*
* Copyright (C) 2016 BlueKitchen GmbH
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holders nor the names of
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* 4. Any redistribution, use, or modification is done solely for
* personal benefit and not for any commercial purpose or for
* monetary gain.
*
* THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS
* RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* Please inquire about commercial licensing options at
* contact@bluekitchen-gmbh.com
*
*/
/*
* btstack_uart_block_embedded.c
*
* Common code to access UART via asynchronous block read/write commands on top of hal_uart_dma.h
*
*/
#include "btstack_debug.h"
#include "btstack_uart_block.h"
#include "btstack_run_loop_embedded.h"
#include "hal_uart_dma.h"
// uart config
static const btstack_uart_config_t * uart_config;
// data source for integration with BTstack Runloop
static btstack_data_source_t transport_data_source;
static int send_complete;
static int receive_complete;
// callbacks
static void (*block_sent)(void);
static void (*block_received)(void);
static void btstack_uart_block_received(void){
receive_complete = 1;
btstack_run_loop_embedded_trigger();
}
static void btstack_uart_block_sent(void){
send_complete = 1;
btstack_run_loop_embedded_trigger();
}
static int btstack_uart_embedded_init(const btstack_uart_config_t * config){
uart_config = config;
hal_uart_dma_set_block_received(&btstack_uart_block_received);
hal_uart_dma_set_block_sent(&btstack_uart_block_sent);
return 0;
}
static void btstack_uart_embedded_process(btstack_data_source_t *ds, btstack_data_source_callback_type_t callback_type) {
switch (callback_type){
case DATA_SOURCE_CALLBACK_POLL:
if (send_complete){
send_complete = 0;
block_sent();
}
if (receive_complete){
receive_complete = 0;
block_received();
}
break;
default:
break;
}
}
static int btstack_uart_embedded_open(void){
hal_uart_dma_init();
hal_uart_dma_set_baud(uart_config->baudrate);
// set up polling data_source
btstack_run_loop_set_data_source_handler(&transport_data_source, &btstack_uart_embedded_process);
btstack_run_loop_enable_data_source_callbacks(&transport_data_source, DATA_SOURCE_CALLBACK_POLL);
btstack_run_loop_add_data_source(&transport_data_source);
return 0;
}
static int btstack_uart_embedded_close(void){
return 0;
}
static void btstack_uart_embedded_set_block_received( void (*block_handler)(void)){
block_received = block_handler;
}
static void btstack_uart_embedded_set_block_sent( void (*block_handler)(void)){
block_sent = block_handler;
}
static int btstack_uart_embedded_set_parity(int parity){
return 0;
}
static void btstack_uart_embedded_send_block(const uint8_t *data, uint16_t size){
hal_uart_dma_send_block(data, size);
}
static void btstack_uart_embedded_receive_block(uint8_t *buffer, uint16_t len){
hal_uart_dma_receive_block(buffer, len);
}
// static void btstack_uart_embedded_set_sleep(uint8_t sleep){
// }
// static void btstack_uart_embedded_set_csr_irq_handler( void (*csr_irq_handler)(void)){
// }
static const btstack_uart_block_t btstack_uart_embedded = {
/* int (*init)(hci_transport_config_uart_t * config); */ &btstack_uart_embedded_init,
/* int (*open)(void); */ &btstack_uart_embedded_open,
/* int (*close)(void); */ &btstack_uart_embedded_close,
/* void (*set_block_received)(void (*handler)(void)); */ &btstack_uart_embedded_set_block_received,
/* void (*set_block_sent)(void (*handler)(void)); */ &btstack_uart_embedded_set_block_sent,
/* int (*set_baudrate)(uint32_t baudrate); */ &hal_uart_dma_set_baud,
/* int (*set_parity)(int parity); */ &btstack_uart_embedded_set_parity,
/* void (*receive_block)(uint8_t *buffer, uint16_t len); */ &btstack_uart_embedded_receive_block,
/* void (*send_block)(const uint8_t *buffer, uint16_t length); */ &btstack_uart_embedded_send_block,
/* int (*get_supported_sleep_modes); */ NULL,
/* void (*set_sleep)(btstack_uart_sleep_mode_t sleep_mode); */ NULL
};
const btstack_uart_block_t * btstack_uart_block_embedded_instance(void){
return &btstack_uart_embedded;
}

View File

@ -158,6 +158,7 @@ static const hci_transport_h4_t hci_transport_h4_ehcill_dma = {
/* .transport.can_send_packet_now = */ h4_can_send_packet_now,
/* .transport.send_packet = */ ehcill_send_packet,
/* .transport.set_baudrate = */ h4_set_baudrate,
/* .transport.reset_link = */ NULL,
},
/* .ds = */ &hci_transport_h4_dma_ds
};
@ -167,7 +168,7 @@ static void dummy_handler(uint8_t packet_type, uint8_t *packet, uint16_t size){
}
// get h4 singleton
const hci_transport_t * hci_transport_h4_instance(void){
const hci_transport_t * hci_transport_h4_instance(const btstack_uart_block_t * uart_driver){
return &hci_transport_h4_ehcill_dma.transport;
}

View File

@ -59,7 +59,7 @@
#error HCI_OUTGOING_PRE_BUFFER_SIZE not defined. Please update hci.h
#endif
#ifdef HAVE_EHCILL
#ifdef ENABLE_EHCILL
#error "HCI Transport H4 DMA does not support eHCILL. Please use hci_transport_h4_ehcill_dma.c instead."
#endif
@ -123,6 +123,7 @@ static const hci_transport_h4_t hci_transport_h4_dma = {
/* .transport.can_send_packet_now = */ h4_can_send_packet_now,
/* .transport.send_packet = */ h4_send_packet,
/* .transport.set_baudrate = */ h4_set_baudrate,
/* .transport.reset_link = */ NULL,
},
/* .ds = */ &hci_transport_h4_dma_ds
};
@ -310,6 +311,6 @@ static void dummy_handler(uint8_t packet_type, uint8_t *packet, uint16_t size){
}
// get h4 singleton
const hci_transport_t * hci_transport_h4_instance(void){
const hci_transport_t * hci_transport_h4_instance(const btstack_uart_block_t * uart_driver){
return &hci_transport_h4_dma.transport;
}

View File

@ -0,0 +1,361 @@
/*
* Copyright (C) 2016 BlueKitchen GmbH
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holders nor the names of
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* 4. Any redistribution, use, or modification is done solely for
* personal benefit and not for any commercial purpose or for
* monetary gain.
*
* THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS
* RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* Please inquire about commercial licensing options at
* contact@bluekitchen-gmbh.com
*
*/
/*
* btstack_uart_block_posix.c
*
* Common code to access serial port via asynchronous block read/write commands
*
*/
#include "btstack_uart_block.h"
#include "btstack_run_loop.h"
#include "btstack_debug.h"
#include <termios.h> /* POSIX terminal control definitions */
#include <fcntl.h> /* File control definitions */
#include <unistd.h> /* UNIX standard function definitions */
// uart config
static const btstack_uart_config_t * uart_config;
// data source for integration with BTstack Runloop
static btstack_data_source_t transport_data_source;
// block write
static int write_bytes_len;
static const uint8_t * write_bytes_data;
// block read
static uint16_t read_bytes_len;
static uint8_t * read_bytes_data;
// callbacks
static void (*block_sent)(void);
static void (*block_received)(void);
static int btstack_uart_posix_init(const btstack_uart_config_t * config){
uart_config = config;
return 0;
}
static void btstack_uart_posix_process_write(btstack_data_source_t *ds) {
if (write_bytes_len == 0) return;
uint32_t start = btstack_run_loop_get_time_ms();
// write up to write_bytes_len to fd
int bytes_written = write(ds->fd, write_bytes_data, write_bytes_len);
if (bytes_written < 0) {
btstack_run_loop_enable_data_source_callbacks(ds, DATA_SOURCE_CALLBACK_WRITE);
return;
}
uint32_t end = btstack_run_loop_get_time_ms();
if (end - start > 10){
log_info("h4_process: write took %u ms", end - start);
}
write_bytes_data += bytes_written;
write_bytes_len -= bytes_written;
if (write_bytes_len){
btstack_run_loop_enable_data_source_callbacks(ds, DATA_SOURCE_CALLBACK_WRITE);
return;
}
btstack_run_loop_disable_data_source_callbacks(ds, DATA_SOURCE_CALLBACK_WRITE);
// notify done
if (block_sent){
block_sent();
}
}
static void btstack_uart_posix_process_read(btstack_data_source_t *ds) {
if (read_bytes_len == 0) {
log_info("btstack_uart_posix_process_read but no read requested");
btstack_run_loop_disable_data_source_callbacks(ds, DATA_SOURCE_CALLBACK_READ);
}
uint32_t start = btstack_run_loop_get_time_ms();
// read up to bytes_to_read data in
ssize_t bytes_read = read(ds->fd, read_bytes_data, read_bytes_len);
// log_info("btstack_uart_posix_process_read need %u bytes, got %d", read_bytes_len, (int) bytes_read);
uint32_t end = btstack_run_loop_get_time_ms();
if (end - start > 10){
log_info("h4_process: read took %u ms", end - start);
}
if (bytes_read < 0) return;
read_bytes_len -= bytes_read;
read_bytes_data += bytes_read;
if (read_bytes_len > 0) return;
btstack_run_loop_disable_data_source_callbacks(ds, DATA_SOURCE_CALLBACK_READ);
if (block_received){
block_received();
}
}
static void hci_transport_h5_process(btstack_data_source_t *ds, btstack_data_source_callback_type_t callback_type) {
if (ds->fd < 0) return;
switch (callback_type){
case DATA_SOURCE_CALLBACK_READ:
btstack_uart_posix_process_read(ds);
break;
case DATA_SOURCE_CALLBACK_WRITE:
btstack_uart_posix_process_write(ds);
break;
default:
break;
}
}
static int btstack_uart_posix_set_baudrate(uint32_t baudrate){
int fd = transport_data_source.fd;
log_info("h4_set_baudrate %u", baudrate);
struct termios toptions;
if (tcgetattr(fd, &toptions) < 0) {
perror("posix_open: Couldn't get term attributes");
return -1;
}
speed_t brate = baudrate; // let you override switch below if needed
switch(baudrate) {
case 57600: brate=B57600; break;
case 115200: brate=B115200; break;
#ifdef B230400
case 230400: brate=B230400; break;
#endif
#ifdef B460800
case 460800: brate=B460800; break;
#endif
#ifdef B921600
case 921600: brate=B921600; break;
#endif
// Hacks to switch to 2/3 mbps on FTDI FT232 chipsets
// requires special config in Info.plist or Registry
case 2000000:
#if defined(HAVE_POSIX_B300_MAPPED_TO_2000000)
log_info("hci_transport_posix: using B300 for 2 mbps");
brate=B300;
#elif defined(HAVE_POSIX_B1200_MAPPED_TO_2000000)
log_info("hci_transport_posix: using B1200 for 2 mbps");
brate=B1200;
#endif
break;
case 3000000:
#if defined(HAVE_POSIX_B600_MAPPED_TO_3000000)
log_info("hci_transport_posix: using B600 for 3 mbps");
brate=B600;
#elif defined(HAVE_POSIX_B2400_MAPPED_TO_3000000)
log_info("hci_transport_posix: using B2400 for 3 mbps");
brate=B2400;
#endif
break;
default:
break;
}
cfsetospeed(&toptions, brate);
cfsetispeed(&toptions, brate);
if( tcsetattr(fd, TCSANOW, &toptions) < 0) {
perror("posix_set_baudrate: Couldn't set term attributes");
return -1;
}
return 0;
}
static int btstack_uart_posix_open(void){
const char * device_name = uart_config->device_name;
const int flowcontrol = uart_config->flowcontrol;
const uint32_t baudrate = uart_config->baudrate;
struct termios toptions;
int flags = O_RDWR | O_NOCTTY | O_NONBLOCK;
int fd = open(device_name, flags);
if (fd == -1) {
perror("posix_open: Unable to open port ");
perror(device_name);
return -1;
}
if (tcgetattr(fd, &toptions) < 0) {
perror("posix_open: Couldn't get term attributes");
return -1;
}
cfmakeraw(&toptions); // make raw
// 8N1
toptions.c_cflag &= ~CSTOPB;
toptions.c_cflag |= CS8;
// 8E1
// toptions.c_cflag |= PARENB; // enable even parity
//
if (flowcontrol) {
// with flow control
toptions.c_cflag |= CRTSCTS;
} else {
// no flow control
toptions.c_cflag &= ~CRTSCTS;
}
toptions.c_cflag |= CREAD | CLOCAL; // turn on READ & ignore ctrl lines
toptions.c_iflag &= ~(IXON | IXOFF | IXANY); // turn off s/w flow ctrl
// see: http://unixwiz.net/techtips/termios-vmin-vtime.html
toptions.c_cc[VMIN] = 1;
toptions.c_cc[VTIME] = 0;
if(tcsetattr(fd, TCSANOW, &toptions) < 0) {
perror("posix_open: Couldn't set term attributes");
return -1;
}
// store fd in data source
transport_data_source.fd = fd;
// also set baudrate
if (btstack_uart_posix_set_baudrate(baudrate) < 0){
return -1;
}
// set up data_source
btstack_run_loop_set_data_source_fd(&transport_data_source, fd);
btstack_run_loop_set_data_source_handler(&transport_data_source, &hci_transport_h5_process);
btstack_run_loop_add_data_source(&transport_data_source);
return 0;
}
static int btstack_uart_posix_close_new(void){
// first remove run loop handler
btstack_run_loop_remove_data_source(&transport_data_source);
// then close device
close(transport_data_source.fd);
transport_data_source.fd = -1;
return 0;
}
static void btstack_uart_posix_set_block_received( void (*block_handler)(void)){
block_received = block_handler;
}
static void btstack_uart_posix_set_block_sent( void (*block_handler)(void)){
block_sent = block_handler;
}
static int btstack_uart_posix_set_parity(int parity){
int fd = transport_data_source.fd;
struct termios toptions;
if (tcgetattr(fd, &toptions) < 0) {
perror("posix_set_parity: Couldn't get term attributes");
return -1;
}
if (parity){
toptions.c_cflag |= PARENB; // enable even parity
} else {
toptions.c_cflag &= ~PARENB; // enable even parity
}
if(tcsetattr(fd, TCSANOW, &toptions) < 0) {
perror("posix_set_parity: Couldn't set term attributes");
return -1;
}
return 0;
}
static void btstack_uart_posix_send_block(const uint8_t *data, uint16_t size){
// setup async write
write_bytes_data = data;
write_bytes_len = size;
// go
// btstack_uart_posix_process_write(&transport_data_source);
btstack_run_loop_enable_data_source_callbacks(&transport_data_source, DATA_SOURCE_CALLBACK_WRITE);
}
static void btstack_uart_posix_receive_block(uint8_t *buffer, uint16_t len){
read_bytes_data = buffer;
read_bytes_len = len;
btstack_run_loop_enable_data_source_callbacks(&transport_data_source, DATA_SOURCE_CALLBACK_READ);
// go
// btstack_uart_posix_process_read(&transport_data_source);
}
// static void btstack_uart_posix_set_sleep(uint8_t sleep){
// }
// static void btstack_uart_posix_set_csr_irq_handler( void (*csr_irq_handler)(void)){
// }
static const btstack_uart_block_t btstack_uart_posix = {
/* int (*init)(hci_transport_config_uart_t * config); */ &btstack_uart_posix_init,
/* int (*open)(void); */ &btstack_uart_posix_open,
/* int (*close)(void); */ &btstack_uart_posix_close_new,
/* void (*set_block_received)(void (*handler)(void)); */ &btstack_uart_posix_set_block_received,
/* void (*set_block_sent)(void (*handler)(void)); */ &btstack_uart_posix_set_block_sent,
/* int (*set_baudrate)(uint32_t baudrate); */ &btstack_uart_posix_set_baudrate,
/* int (*set_parity)(int parity); */ &btstack_uart_posix_set_parity,
/* void (*receive_block)(uint8_t *buffer, uint16_t len); */ &btstack_uart_posix_receive_block,
/* void (*send_block)(const uint8_t *buffer, uint16_t length); */ &btstack_uart_posix_send_block,
/* int (*get_supported_sleep_modes); */ NULL,
/* void (*set_sleep)(btstack_uart_sleep_mode_t sleep_mode); */ NULL
};
const btstack_uart_block_t * btstack_uart_block_posix_instance(void){
return &btstack_uart_posix;
}

View File

@ -1,438 +0,0 @@
/*
* Copyright (C) 2014 BlueKitchen GmbH
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holders nor the names of
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* 4. Any redistribution, use, or modification is done solely for
* personal benefit and not for any commercial purpose or for
* monetary gain.
*
* THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS
* RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* Please inquire about commercial licensing options at
* contact@bluekitchen-gmbh.com
*
*/
/*
* hci_h4_transport.c
*
* HCI Transport API implementation for basic H4 protocol over POSIX
*
* Created by Matthias Ringwald on 4/29/09.
*/
#include "btstack_config.h"
#include <termios.h> /* POSIX terminal control definitions */
#include <fcntl.h> /* File control definitions */
#include <unistd.h> /* UNIX standard function definitions */
#include <stdio.h>
#include <string.h>
#include <pthread.h>
#include "btstack_debug.h"
#include "hci.h"
#include "hci_transport.h"
#ifdef HAVE_EHCILL
#error "HCI Transport H4 POSIX does not support eHCILL yet. Please remove HAVE_EHCILL from your btstack-config.h"
#endif
// assert pre-buffer for packet type is available
#if !defined(HCI_OUTGOING_PRE_BUFFER_SIZE) || (HCI_OUTGOING_PRE_BUFFER_SIZE == 0)
#error HCI_OUTGOING_PRE_BUFFER_SIZE not defined. Please update hci.h
#endif
static void h4_process(btstack_data_source_t *ds, btstack_data_source_callback_type_t callback_type);
static void dummy_handler(uint8_t packet_type, uint8_t *packet, uint16_t size);
typedef enum {
H4_W4_PACKET_TYPE,
H4_W4_EVENT_HEADER,
H4_W4_ACL_HEADER,
H4_W4_SCO_HEADER,
H4_W4_PAYLOAD,
} H4_STATE;
typedef struct hci_transport_h4 {
hci_transport_t transport;
btstack_data_source_t *ds;
int uart_fd; // different from ds->fd for HCI reader thread
/* power management support, e.g. used by iOS */
btstack_timer_source_t sleep_timer;
} hci_transport_h4_t;
// single instance
static hci_transport_h4_t * hci_transport_h4 = NULL;
static hci_transport_config_uart_t * hci_transport_config_uart = NULL;
static void (*packet_handler)(uint8_t packet_type, uint8_t *packet, uint16_t size) = dummy_handler;
// packet reader state machine
static H4_STATE h4_state;
static int bytes_to_read;
static int read_pos;
// packet writer state
static int write_bytes_len;
static const uint8_t * write_bytes_data;
static uint8_t hci_packet_with_pre_buffer[HCI_INCOMING_PRE_BUFFER_SIZE + 1 + HCI_PACKET_BUFFER_SIZE]; // packet type + max(acl header + acl payload, event header + event data)
static uint8_t * hci_packet = &hci_packet_with_pre_buffer[HCI_INCOMING_PRE_BUFFER_SIZE];
static int h4_set_baudrate(uint32_t baudrate){
log_info("h4_set_baudrate %u", baudrate);
struct termios toptions;
int fd = btstack_run_loop_get_data_source_fd(hci_transport_h4->ds);
if (tcgetattr(fd, &toptions) < 0) {
perror("init_serialport: Couldn't get term attributes");
return -1;
}
speed_t brate = baudrate; // let you override switch below if needed
switch(baudrate) {
case 57600: brate=B57600; break;
case 115200: brate=B115200; break;
#ifdef B230400
case 230400: brate=B230400; break;
#endif
#ifdef B460800
case 460800: brate=B460800; break;
#endif
#ifdef B921600
case 921600: brate=B921600; break;
#endif
// Hacks to switch to 2/3 mbps on FTDI FT232 chipsets
// requires special config in Info.plist or Registry
case 2000000:
#if defined(HAVE_POSIX_B300_MAPPED_TO_2000000)
log_info("hci_transport_posix: using B300 for 2 mbps");
brate=B300;
#elif defined(HAVE_POSIX_B1200_MAPPED_TO_2000000)
log_info("hci_transport_posix: using B1200 for 2 mbps");
brate=B1200;
#endif
break;
case 3000000:
#if defined(HAVE_POSIX_B600_MAPPED_TO_3000000)
log_info("hci_transport_posix: using B600 for 3 mbps");
brate=B600;
#elif defined(HAVE_POSIX_B2400_MAPPED_TO_3000000)
log_info("hci_transport_posix: using B2400 for 3 mbps");
brate=B2400;
#endif
break;
default:
break;
}
cfsetospeed(&toptions, brate);
cfsetispeed(&toptions, brate);
if( tcsetattr(fd, TCSANOW, &toptions) < 0) {
perror("init_serialport: Couldn't set term attributes");
return -1;
}
return 0;
}
static void h4_init(const void * transport_config){
// check for hci_transport_config_uart_t
if (!transport_config) {
log_error("hci_transport_h4_posix: no config!");
return;
}
if (((hci_transport_config_t*)transport_config)->type != HCI_TRANSPORT_CONFIG_UART) {
log_error("hci_transport_h4_posix: config not of type != HCI_TRANSPORT_CONFIG_UART!");
return;
}
hci_transport_config_uart = (hci_transport_config_uart_t*) transport_config;
}
static int h4_open(void){
struct termios toptions;
int flags = O_RDWR | O_NOCTTY | O_NONBLOCK;
int fd = open(hci_transport_config_uart->device_name, flags);
if (fd == -1) {
perror("init_serialport: Unable to open port ");
perror(hci_transport_config_uart->device_name);
return -1;
}
if (tcgetattr(fd, &toptions) < 0) {
perror("init_serialport: Couldn't get term attributes");
return -1;
}
cfmakeraw(&toptions); // make raw
// 8N1
toptions.c_cflag &= ~CSTOPB;
toptions.c_cflag |= CS8;
if (hci_transport_config_uart->flowcontrol) {
// with flow control
toptions.c_cflag |= CRTSCTS;
} else {
// no flow control
toptions.c_cflag &= ~CRTSCTS;
}
toptions.c_cflag |= CREAD | CLOCAL; // turn on READ & ignore ctrl lines
toptions.c_iflag &= ~(IXON | IXOFF | IXANY); // turn off s/w flow ctrl
// see: http://unixwiz.net/techtips/termios-vmin-vtime.html
toptions.c_cc[VMIN] = 1;
toptions.c_cc[VTIME] = 0;
if( tcsetattr(fd, TCSANOW, &toptions) < 0) {
perror("init_serialport: Couldn't set term attributes");
return -1;
}
// set up data_source
hci_transport_h4->ds = (btstack_data_source_t*) malloc(sizeof(btstack_data_source_t));
if (!hci_transport_h4->ds) return -1;
hci_transport_h4->uart_fd = fd;
btstack_run_loop_set_data_source_fd(hci_transport_h4->ds, fd);
btstack_run_loop_set_data_source_handler(hci_transport_h4->ds, &h4_process);
btstack_run_loop_enable_data_source_callbacks(hci_transport_h4->ds, DATA_SOURCE_CALLBACK_READ);
btstack_run_loop_add_data_source(hci_transport_h4->ds);
// also set baudrate
if (h4_set_baudrate(hci_transport_config_uart->baudrate_init) < 0){
return -1;
}
// init state machine
bytes_to_read = 1;
h4_state = H4_W4_PACKET_TYPE;
read_pos = 0;
return 0;
}
static int h4_close(void){
// first remove run loop handler
btstack_run_loop_remove_data_source(hci_transport_h4->ds);
// close device
int fd = btstack_run_loop_get_data_source_fd(hci_transport_h4->ds);
close(fd);
// free struct
free(hci_transport_h4->ds);
hci_transport_h4->ds = NULL;
return 0;
}
static void h4_register_packet_handler(void (*handler)(uint8_t packet_type, uint8_t *packet, uint16_t size)){
packet_handler = handler;
}
static void h4_reset_statemachine(void){
h4_state = H4_W4_PACKET_TYPE;
read_pos = 0;
bytes_to_read = 1;
}
static void h4_deliver_packet(void){
if (read_pos < 3) return; // sanity check
packet_handler(hci_packet[0], &hci_packet[1], read_pos-1);
h4_reset_statemachine();
}
static void h4_statemachine(void){
switch (h4_state) {
case H4_W4_PACKET_TYPE:
switch (hci_packet[0]){
case HCI_EVENT_PACKET:
bytes_to_read = HCI_EVENT_HEADER_SIZE;
h4_state = H4_W4_EVENT_HEADER;
break;
case HCI_ACL_DATA_PACKET:
bytes_to_read = HCI_ACL_HEADER_SIZE;
h4_state = H4_W4_ACL_HEADER;
break;
case HCI_SCO_DATA_PACKET:
bytes_to_read = HCI_SCO_HEADER_SIZE;
h4_state = H4_W4_SCO_HEADER;
break;
default:
log_error("h4_process: invalid packet type 0x%02x", hci_packet[0]);
h4_reset_statemachine();
break;
}
break;
case H4_W4_EVENT_HEADER:
bytes_to_read = hci_packet[2];
h4_state = H4_W4_PAYLOAD;
break;
case H4_W4_ACL_HEADER:
bytes_to_read = little_endian_read_16( hci_packet, 3);
// check ACL length
if (HCI_ACL_HEADER_SIZE + bytes_to_read > HCI_PACKET_BUFFER_SIZE){
log_error("h4_process: invalid ACL payload len %u - only space for %u", bytes_to_read, HCI_PACKET_BUFFER_SIZE - HCI_ACL_HEADER_SIZE);
h4_reset_statemachine();
break;
}
h4_state = H4_W4_PAYLOAD;
break;
case H4_W4_SCO_HEADER:
bytes_to_read = hci_packet[3];
h4_state = H4_W4_PAYLOAD;
break;
case H4_W4_PAYLOAD:
h4_deliver_packet();
break;
default:
break;
}
}
static void h4_process_read(btstack_data_source_t *ds){
if (hci_transport_h4->uart_fd == 0) return;
int read_now = bytes_to_read;
uint32_t start = btstack_run_loop_get_time_ms();
// read up to bytes_to_read data in
ssize_t bytes_read = read(hci_transport_h4->uart_fd, &hci_packet[read_pos], read_now);
// log_info("h4_process: bytes read %u", bytes_read);
if (bytes_read < 0) return;
uint32_t end = btstack_run_loop_get_time_ms();
if (end - start > 10){
log_info("h4_process: read took %u ms", end - start);
}
bytes_to_read -= bytes_read;
read_pos += bytes_read;
if (bytes_to_read > 0) return;
h4_statemachine();
}
static void h4_process_write(btstack_data_source_t * ds){
if (hci_transport_h4->uart_fd == 0) return;
if (write_bytes_len == 0) return;
uint32_t start = btstack_run_loop_get_time_ms();
// write up to write_bytes_len to fd
int bytes_written = write(hci_transport_h4->uart_fd, write_bytes_data, write_bytes_len);
if (bytes_written < 0) {
btstack_run_loop_enable_data_source_callbacks(ds, DATA_SOURCE_CALLBACK_WRITE);
return;
}
uint32_t end = btstack_run_loop_get_time_ms();
if (end - start > 10){
log_info("h4_process: write took %u ms", end - start);
}
write_bytes_data += bytes_written;
write_bytes_len -= bytes_written;
if (write_bytes_len){
btstack_run_loop_enable_data_source_callbacks(ds, DATA_SOURCE_CALLBACK_WRITE);
return;
}
btstack_run_loop_disable_data_source_callbacks(ds, DATA_SOURCE_CALLBACK_WRITE);
// notify upper stack that it can send again
uint8_t event[] = { HCI_EVENT_TRANSPORT_PACKET_SENT, 0};
packet_handler(HCI_EVENT_PACKET, &event[0], sizeof(event));
}
static void h4_process(btstack_data_source_t *ds, btstack_data_source_callback_type_t callback_type) {
switch (callback_type){
case DATA_SOURCE_CALLBACK_READ:
h4_process_read(ds);
break;
case DATA_SOURCE_CALLBACK_WRITE:
h4_process_write(ds);
default:
break;
}
}
static int h4_send_packet(uint8_t packet_type, uint8_t * packet, int size){
if (hci_transport_h4->ds == NULL) return -1;
if (hci_transport_h4->uart_fd == 0) return -1;
// store packet type before actual data and increase size
size++;
packet--;
*packet = packet_type;
// register outgoing request
write_bytes_data = packet;
write_bytes_len = size;
// start sending
h4_process_write(hci_transport_h4->ds);
return 0;
}
static int h4_can_send_now(uint8_t packet_type){
return write_bytes_len == 0;
}
static void dummy_handler(uint8_t packet_type, uint8_t *packet, uint16_t size){
}
// get h4 singleton
const hci_transport_t * hci_transport_h4_instance(void) {
if (hci_transport_h4 == NULL) {
hci_transport_h4 = (hci_transport_h4_t*)malloc( sizeof(hci_transport_h4_t));
memset(hci_transport_h4, 0, sizeof(hci_transport_h4_t));
hci_transport_h4->ds = NULL;
hci_transport_h4->transport.name = "H4_POSIX";
hci_transport_h4->transport.init = h4_init;
hci_transport_h4->transport.open = h4_open;
hci_transport_h4->transport.close = h4_close;
hci_transport_h4->transport.register_packet_handler = h4_register_packet_handler;
hci_transport_h4->transport.can_send_packet_now = h4_can_send_now;
hci_transport_h4->transport.send_packet = h4_send_packet;
hci_transport_h4->transport.set_baudrate = h4_set_baudrate;
}
return (const hci_transport_t *) hci_transport_h4;
}

View File

@ -745,7 +745,7 @@ void BTstackManager::setup(void){
btstack_memory_init();
btstack_run_loop_init(btstack_run_loop_embedded_get_instance());
const hci_transport_t * transport = hci_transport_h4_instance();
const hci_transport_t * transport = hci_transport_h4_instance(btstack_uart_block_embedded_instance());
hci_init(transport, NULL);
hci_set_chipset(btstack_chipset_em9301_instance());

View File

@ -9,12 +9,12 @@ VERSION=`sed -n -e 's/^.*BTSTACK_VERSION \"\(.*\)\"/\1/p' ${BTSTACK_ROOT}/platfo
BTSTACK_PACKAGE=/tmp/btstack
ARCHIVE=btstack-arduino-${VERSION}.zip
SRC_FILES = btstack_memory.c btstack_linked_list.c btstack_memory_pool.c btstack_run_loop.c
SRC_FILES = btstack_memory.c btstack_linked_list.c btstack_memory_pool.c btstack_run_loop.c
SRC_FILES += hci_dump.c hci.c hci_cmd.c btstack_util.c l2cap.c
BLE_FILES = ad_parser.c att_db.c att_server.c att_dispatch.c att_db_util.c le_device_db_memory.c gatt_client.c
BLE_FILES += sm.c ancs_client.h ancs_client.c
PORT_FILES = btstack_config.h bsp_arduino_em9301.cpp BTstack.cpp BTstack.h
EMBEDDED_FILES = btstack_run_loop_embedded.c hci_transport_h4_embedded.c
EMBEDDED_FILES = btstack_run_loop_embedded.c hci_transport_h4_embedded.c btstack_uart_block_embedded.c
PATHS = $(addprefix ${BTSTACK_ROOT}/src/, ${SRC_FILES})
PATHS += $(wildcard ${BTSTACK_ROOT}/src/*.h)

View File

@ -39,7 +39,8 @@ libBTstack_SOURCES = \
BTdaemon_SOURCES = \
daemon.c \
hci_transport_h4_posix.c \
btstack_uart_block_posix.c \
hci_transport_h4.c \
$(libBTstack_SOURCES) \
btstack_memory.c \
hci.c \

View File

@ -50,12 +50,13 @@ CORE = \
btstack_util.c \
COMMON = \
hal_uart_dma.c \
btstack_chipset_cc256x.c \
hci.c \
hci_cmd.c \
hal_uart_dma.c \
btstack_chipset_cc256x.c \
hci.c \
hci_cmd.c \
hci_transport_h4_ehcill_embedded.c \
btstack_link_key_db_memory.c \
btstack_uart_block_embedded.c \
btstack_link_key_db_memory.c \
SPP = \
l2cap.c \

View File

@ -8,7 +8,6 @@
// Port related features
#define HAVE_INIT_SCRIPT
#define HAVE_EMBEDDED_TICK
#define HAVE_EHCILL
// BTstack features that can be enabled
#define ENABLE_BLE
@ -16,6 +15,7 @@
#define ENABLE_LOG_INTO_HCI_DUMP
// #define ENABLE_LOG_ERROR
// #define ENABLE_LOG_INFO
// #define ENABLE_EHCILL
// BTstack configuration. buffers, sizes, ...
#define HCI_ACL_PAYLOAD_SIZE 52

View File

@ -107,16 +107,13 @@ int main(void)
btstack_run_loop_init(btstack_run_loop_embedded_get_instance());
// init HCI
hci_init(hci_transport_h4_instance(), &config);
hci_init(hci_transport_h4_instance(btstack_uart_block_embedded_instance()), &config);
hci_set_link_key_db(btstack_link_key_db_memory_instance());
hci_set_chipset(btstack_chipset_cc256x_instance());
// inform about BTstack state
hci_event_callback_registration.callback = &packet_handler;
hci_add_event_handler(&hci_event_callback_registration);
// use eHCILL
btstack_chipset_cc256x_enable_ehcill(1);
// ready - enable irq used in h4 task
__enable_interrupt();

View File

@ -43,6 +43,7 @@ BTdaemon_FILES = \
daemon.c \
hci.c \
hci_transport_h4_iphone.c \
btstack_uart_block_posix.c \
l2cap.c \
l2cap_signaling.c \
platform_iphone.m \

View File

@ -136,11 +136,11 @@ static uint8_t hci_packet[1+HCI_PACKET_BUFFER_SIZE]; // packet type + max(acl he
static void h4_init(const void * transport_config){
// check for hci_transport_config_uart_t
if (!transport_config) {
log_error("hci_transport_h4_posix: no config!");
log_error("hci_transport_h4_iphone: no config!");
return;
}
if (((hci_transport_config_t*)transport_config)->type != HCI_TRANSPORT_CONFIG_UART) {
log_error("hci_transport_h4_posix: config not of type != HCI_TRANSPORT_CONFIG_UART!");
log_error("hci_transport_h4_iphone: config not of type != HCI_TRANSPORT_CONFIG_UART!");
return;
}
hci_transport_config_uart = (hci_transport_config_uart_t*) transport_config;
@ -384,7 +384,7 @@ static void dummy_handler(uint8_t packet_type, uint8_t *packet, uint16_t size){
}
// get h4 singleton
const hci_transport_t * hci_transport_h4_instance(void) {
const hci_transport_t * hci_transport_h4_instance(const btstack_uart_block_t * uart_driver) {
if (hci_transport_h4 == NULL) {
hci_transport_h4 = (hci_transport_h4_t*)malloc( sizeof(hci_transport_h4_t));
memset(hci_transport_h4, 0, sizeof(hci_transport_h4_t));

View File

@ -54,6 +54,7 @@ COMMON = \
btstack_chipset_cc256x.c \
hci.c \
hci_cmd.c \
btstack_uart_block_embedded.c \
hci_transport_h4_ehcill_embedded.c \
btstack_link_key_db_memory.c \

View File

@ -6,7 +6,6 @@
#define __BTSTACK_CONFIG
// Port related features
#define HAVE_EHCILL
#define HAVE_INIT_SCRIPT
#define HAVE_EMBEDDED_TICK
@ -16,6 +15,7 @@
// #define ENABLE_LOG_INTO_HCI_DUMP
// #define ENABLE_LOG_ERROR
// #define ENABLE_LOG_INFO
// #define ENABLE_EHCILL
// BTstack configuration. buffers, sizes, ...
#define HCI_ACL_PAYLOAD_SIZE 52

View File

@ -378,15 +378,12 @@ int main(void){
btstack_run_loop_init(btstack_run_loop_embedded_get_instance());
// init HCI
const hci_transport_t * transport = hci_transport_h4_instance();
const hci_transport_t * transport = hci_transport_h4_instance(btstack_uart_block_embedded_instance());
btstack_link_key_db_t * link_key_db = btstack_link_key_db_memory_instance();
hci_init(transport, &config);
hci_set_link_key_db(link_key_db);
hci_set_chipset(btstack_chipset_cc256x_instance());
// use eHCILL
btstack_chipset_cc256x_enable_ehcill(1);
// register for HCI events
hci_event_callback_registration.callback = &packet_handler;
hci_add_event_handler(&hci_event_callback_registration);

View File

@ -107,16 +107,13 @@ static void btstack_setup(void){
btstack_run_loop_init(btstack_run_loop_embedded_get_instance());
// init HCI
hci_init(hci_transport_h4_instance(), &config);
hci_init(hci_transport_h4_instance(btstack_uart_block_embedded_instance()), &config);
hci_set_link_key_db(btstack_link_key_db_memory_instance());
hci_set_chipset(btstack_chipset_cc256x_instance());
// inform about BTstack state
hci_event_callback_registration.callback = &packet_handler;
hci_add_event_handler(&hci_event_callback_registration);
// use eHCILL
btstack_chipset_cc256x_enable_ehcill(1);
}
int btstack_main(int argc, const char * argv[]);

View File

@ -56,6 +56,7 @@ COMMON = \
btstack_chipset_cc256x.c \
hci.c \
hci_cmd.c \
btstack_uart_block_embedded.c \
hci_transport_h4_ehcill_embedded.c \
btstack_link_key_db_memory.c \

View File

@ -9,14 +9,13 @@
#define HAVE_INIT_SCRIPT
#define HAVE_EMBEDDED_TICK
// #define HAVE_EHCILL
// BTstack features that can be enabled
#define ENABLE_BLE
#define ENABLE_CLASSIC
#define ENABLE_LOG_INTO_HCI_DUMP
// #define ENABLE_LOG_ERROR
// #define ENABLE_LOG_INFO
// #define ENABLE_EHCILL
// BTstack configuration. buffers, sizes, ...
#define HCI_ACL_PAYLOAD_SIZE 52

View File

@ -114,16 +114,13 @@ static void btstack_setup(void){
btstack_run_loop_init(btstack_run_loop_embedded_get_instance());
// init HCI
hci_init(hci_transport_h4_instance(), &config);
hci_init(hci_transport_h4_instance(btstack_uart_block_embedded_instance()), &config);
hci_set_link_key_db(btstack_link_key_db_memory_instance());
hci_set_chipset(btstack_chipset_cc256x_instance());
// inform about BTstack state
hci_event_callback_registration.callback = &packet_handler;
hci_add_event_handler(&hci_event_callback_registration);
// use eHCILL
// btstack_chipset_cc256x_enable_ehcill(1);
}
int btstack_main(int argc, const char * argv[]);

View File

@ -46,6 +46,7 @@ BTdaemon_OBJS = $(libBTstack_OBJS) \
gatt_client.o \
hci.o \
hci_transport_h4_mtk.o \
btstack_uart_block_posix.o \
l2cap.o \
l2cap_signaling.o \
le_device_db_memory.o \
@ -56,7 +57,7 @@ BTdaemon_OBJS = $(libBTstack_OBJS) \
att_db.o \
att_server.o \
sdp_client.o \
sdp_client_rfcomm.o \
sdp_client_rfcomm.o \
all: $(TOOLCHAIN) version BTstackDaemon libBTstack.so BTstackDaemonRespawn inquiry le_scan rfcomm_echo dist

View File

@ -156,7 +156,7 @@ static void dummy_handler(uint8_t packet_type, uint8_t *packet, uint16_t size){
}
// get h4 singleton
const hci_transport_t * hci_transport_h4_instance(void){
const hci_transport_t * hci_transport_h4_instance(const btstack_uart_block_t * uart_driver){
if (hci_transport_h4 == NULL) {
hci_transport_h4 = (hci_transport_h4_t*)malloc( sizeof(hci_transport_h4_t));
memset(hci_transport_h4, 0, sizeof(hci_transport_h4_t));

View File

@ -6,9 +6,7 @@
#define __BTSTACK_CONFIG
// Port related features
#define HAVE_EHCILL
#define HAVE_EMBEDDED_TIME_MS
#define WICED_BT_UART_MANUAL_CTS_RTS
// BTstack features that can be enabled
#define ENABLE_BLE

View File

@ -1,7 +0,0 @@
BTstack Port for the Microchip PIC32 Harmony Platform
Status: Port started
Installation: place BTstack tree into harmony/framework folder.
Examples: app.X can be opened and compiled in Microchip MPLABX

View File

@ -0,0 +1,16 @@
# BTstack Port for the Microchip PIC32 Harmony Platform
Status: All examples working, polling UART driver. Tested on Bluetooth Audio Development Kit only.
## Setup
- Place BTstack tree into harmony/framework folder.
-Rrun port/pic32-harmony/create_examples.py to create examples in harmony/apps/btstack folder.
## Usage
The examples can be opened and compiled in Microchip MPLABX.
### Modifications to the GATT Database
After changing the GATT definition in $example.gatt, please run ./update_gatt_db.h to regenerate $example.h in the $example folder.

View File

@ -45,17 +45,17 @@ OBJECTDIR=build/${CND_CONF}/${IMAGE_TYPE}
DISTDIR=dist/${CND_CONF}/${IMAGE_TYPE}
# Source Files Quoted if spaced
SOURCEFILES_QUOTED_IF_SPACED=../src/system_config/bk-audio-dk/system_init.c ../src/system_config/bk-audio-dk/system_tasks.c ../src/btstack_port.c ../src/app_debug.c ../src/app.c ../src/main.c ../../../example/spp_and_le_counter.c ../../../src/ble/ad_parser.c ../../../src/ble/att_db.c ../../../src/ble/att_dispatch.c ../../../src/ble/att_server.c ../../../src/ble/le_device_db_memory.c ../../../src/ble/sm.c ../../../chipset/csr/btstack_chipset_csr.c ../../../src/btstack_memory.c ../../../src/hci.c ../../../src/hci_cmd.c ../../../src/hci_dump.c ../../../src/l2cap.c ../../../src/l2cap_signaling.c ../../../src/btstack_linked_list.c ../../../src/btstack_memory_pool.c ../../../src/classic/btstack_link_key_db_memory.c ../../../src/classic/rfcomm.c ../../../src/btstack_run_loop.c ../../../src/classic/sdp_server.c ../../../src/classic/sdp_client.c ../../../src/classic/sdp_client_rfcomm.c ../../../src/classic/sdp_util.c ../../../src/btstack_util.c ../../../platform/embedded/btstack_run_loop_embedded.c ../../../platform/embedded/hci_transport_h4_embedded.c ../../../../driver/tmr/src/dynamic/drv_tmr.c ../../../../system/clk/src/sys_clk.c ../../../../system/clk/src/sys_clk_pic32mx.c ../../../../system/devcon/src/sys_devcon.c ../../../../system/devcon/src/sys_devcon_pic32mx.c ../../../../system/int/src/sys_int_pic32.c ../../../../system/ports/src/sys_ports.c
SOURCEFILES_QUOTED_IF_SPACED=../src/system_config/bt_audio_dk/system_init.c ../src/system_config/bt_audio_dk/system_tasks.c ../src/btstack_port.c ../src/app_debug.c ../src/app.c ../src/main.c ../../../example/spp_and_le_counter.c ../../../src/ble/ad_parser.c ../../../src/ble/att_db.c ../../../src/ble/att_dispatch.c ../../../src/ble/att_server.c ../../../src/ble/le_device_db_memory.c ../../../src/ble/sm.c ../../../chipset/csr/btstack_chipset_csr.c ../../../platform/embedded/btstack_run_loop_embedded.c ../../../platform/embedded/btstack_uart_block_embedded.c ../../../src/btstack_memory.c ../../../src/hci.c ../../../src/hci_cmd.c ../../../src/hci_dump.c ../../../src/l2cap.c ../../../src/l2cap_signaling.c ../../../src/btstack_linked_list.c ../../../src/btstack_memory_pool.c ../../../src/classic/btstack_link_key_db_memory.c ../../../src/classic/rfcomm.c ../../../src/btstack_run_loop.c ../../../src/classic/sdp_server.c ../../../src/classic/sdp_client.c ../../../src/classic/sdp_client_rfcomm.c ../../../src/classic/sdp_util.c ../../../src/btstack_util.c ../../../src/classic/spp_server.c ../../../src/hci_transport_h4.c ../../../src/hci_transport_h5.c ../../../src/btstack_slip.c ../../../../driver/tmr/src/dynamic/drv_tmr.c ../../../../system/clk/src/sys_clk.c ../../../../system/clk/src/sys_clk_pic32mx.c ../../../../system/devcon/src/sys_devcon.c ../../../../system/devcon/src/sys_devcon_pic32mx.c ../../../../system/int/src/sys_int_pic32.c ../../../../system/ports/src/sys_ports.c
# Object Files Quoted if spaced
OBJECTFILES_QUOTED_IF_SPACED=${OBJECTDIR}/_ext/2048875307/system_init.o ${OBJECTDIR}/_ext/2048875307/system_tasks.o ${OBJECTDIR}/_ext/1360937237/btstack_port.o ${OBJECTDIR}/_ext/1360937237/app_debug.o ${OBJECTDIR}/_ext/1360937237/app.o ${OBJECTDIR}/_ext/1360937237/main.o ${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o ${OBJECTDIR}/_ext/534563071/ad_parser.o ${OBJECTDIR}/_ext/534563071/att_db.o ${OBJECTDIR}/_ext/534563071/att_dispatch.o ${OBJECTDIR}/_ext/534563071/att_server.o ${OBJECTDIR}/_ext/534563071/le_device_db_memory.o ${OBJECTDIR}/_ext/534563071/sm.o ${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o ${OBJECTDIR}/_ext/1386528437/btstack_memory.o ${OBJECTDIR}/_ext/1386528437/hci.o ${OBJECTDIR}/_ext/1386528437/hci_cmd.o ${OBJECTDIR}/_ext/1386528437/hci_dump.o ${OBJECTDIR}/_ext/1386528437/l2cap.o ${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o ${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o ${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o ${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o ${OBJECTDIR}/_ext/1386327864/rfcomm.o ${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o ${OBJECTDIR}/_ext/1386327864/sdp_server.o ${OBJECTDIR}/_ext/1386327864/sdp_client.o ${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o ${OBJECTDIR}/_ext/1386327864/sdp_util.o ${OBJECTDIR}/_ext/1386528437/btstack_util.o ${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o ${OBJECTDIR}/_ext/993942601/hci_transport_h4_embedded.o ${OBJECTDIR}/_ext/1880736137/drv_tmr.o ${OBJECTDIR}/_ext/1112166103/sys_clk.o ${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o ${OBJECTDIR}/_ext/1510368962/sys_devcon.o ${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o ${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o ${OBJECTDIR}/_ext/2147153351/sys_ports.o
POSSIBLE_DEPFILES=${OBJECTDIR}/_ext/2048875307/system_init.o.d ${OBJECTDIR}/_ext/2048875307/system_tasks.o.d ${OBJECTDIR}/_ext/1360937237/btstack_port.o.d ${OBJECTDIR}/_ext/1360937237/app_debug.o.d ${OBJECTDIR}/_ext/1360937237/app.o.d ${OBJECTDIR}/_ext/1360937237/main.o.d ${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o.d ${OBJECTDIR}/_ext/534563071/ad_parser.o.d ${OBJECTDIR}/_ext/534563071/att_db.o.d ${OBJECTDIR}/_ext/534563071/att_dispatch.o.d ${OBJECTDIR}/_ext/534563071/att_server.o.d ${OBJECTDIR}/_ext/534563071/le_device_db_memory.o.d ${OBJECTDIR}/_ext/534563071/sm.o.d ${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o.d ${OBJECTDIR}/_ext/1386528437/btstack_memory.o.d ${OBJECTDIR}/_ext/1386528437/hci.o.d ${OBJECTDIR}/_ext/1386528437/hci_cmd.o.d ${OBJECTDIR}/_ext/1386528437/hci_dump.o.d ${OBJECTDIR}/_ext/1386528437/l2cap.o.d ${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o.d ${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o.d ${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o.d ${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o.d ${OBJECTDIR}/_ext/1386327864/rfcomm.o.d ${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o.d ${OBJECTDIR}/_ext/1386327864/sdp_server.o.d ${OBJECTDIR}/_ext/1386327864/sdp_client.o.d ${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o.d ${OBJECTDIR}/_ext/1386327864/sdp_util.o.d ${OBJECTDIR}/_ext/1386528437/btstack_util.o.d ${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o.d ${OBJECTDIR}/_ext/993942601/hci_transport_h4_embedded.o.d ${OBJECTDIR}/_ext/1880736137/drv_tmr.o.d ${OBJECTDIR}/_ext/1112166103/sys_clk.o.d ${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o.d ${OBJECTDIR}/_ext/1510368962/sys_devcon.o.d ${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o.d ${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o.d ${OBJECTDIR}/_ext/2147153351/sys_ports.o.d
OBJECTFILES_QUOTED_IF_SPACED=${OBJECTDIR}/_ext/101891878/system_init.o ${OBJECTDIR}/_ext/101891878/system_tasks.o ${OBJECTDIR}/_ext/1360937237/btstack_port.o ${OBJECTDIR}/_ext/1360937237/app_debug.o ${OBJECTDIR}/_ext/1360937237/app.o ${OBJECTDIR}/_ext/1360937237/main.o ${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o ${OBJECTDIR}/_ext/534563071/ad_parser.o ${OBJECTDIR}/_ext/534563071/att_db.o ${OBJECTDIR}/_ext/534563071/att_dispatch.o ${OBJECTDIR}/_ext/534563071/att_server.o ${OBJECTDIR}/_ext/534563071/le_device_db_memory.o ${OBJECTDIR}/_ext/534563071/sm.o ${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o ${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o ${OBJECTDIR}/_ext/993942601/btstack_uart_block_embedded.o ${OBJECTDIR}/_ext/1386528437/btstack_memory.o ${OBJECTDIR}/_ext/1386528437/hci.o ${OBJECTDIR}/_ext/1386528437/hci_cmd.o ${OBJECTDIR}/_ext/1386528437/hci_dump.o ${OBJECTDIR}/_ext/1386528437/l2cap.o ${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o ${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o ${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o ${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o ${OBJECTDIR}/_ext/1386327864/rfcomm.o ${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o ${OBJECTDIR}/_ext/1386327864/sdp_server.o ${OBJECTDIR}/_ext/1386327864/sdp_client.o ${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o ${OBJECTDIR}/_ext/1386327864/sdp_util.o ${OBJECTDIR}/_ext/1386528437/btstack_util.o ${OBJECTDIR}/_ext/1386327864/spp_server.o ${OBJECTDIR}/_ext/1386528437/hci_transport_h4.o ${OBJECTDIR}/_ext/1386528437/hci_transport_h5.o ${OBJECTDIR}/_ext/1386528437/btstack_slip.o ${OBJECTDIR}/_ext/1880736137/drv_tmr.o ${OBJECTDIR}/_ext/1112166103/sys_clk.o ${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o ${OBJECTDIR}/_ext/1510368962/sys_devcon.o ${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o ${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o ${OBJECTDIR}/_ext/2147153351/sys_ports.o
POSSIBLE_DEPFILES=${OBJECTDIR}/_ext/101891878/system_init.o.d ${OBJECTDIR}/_ext/101891878/system_tasks.o.d ${OBJECTDIR}/_ext/1360937237/btstack_port.o.d ${OBJECTDIR}/_ext/1360937237/app_debug.o.d ${OBJECTDIR}/_ext/1360937237/app.o.d ${OBJECTDIR}/_ext/1360937237/main.o.d ${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o.d ${OBJECTDIR}/_ext/534563071/ad_parser.o.d ${OBJECTDIR}/_ext/534563071/att_db.o.d ${OBJECTDIR}/_ext/534563071/att_dispatch.o.d ${OBJECTDIR}/_ext/534563071/att_server.o.d ${OBJECTDIR}/_ext/534563071/le_device_db_memory.o.d ${OBJECTDIR}/_ext/534563071/sm.o.d ${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o.d ${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o.d ${OBJECTDIR}/_ext/993942601/btstack_uart_block_embedded.o.d ${OBJECTDIR}/_ext/1386528437/btstack_memory.o.d ${OBJECTDIR}/_ext/1386528437/hci.o.d ${OBJECTDIR}/_ext/1386528437/hci_cmd.o.d ${OBJECTDIR}/_ext/1386528437/hci_dump.o.d ${OBJECTDIR}/_ext/1386528437/l2cap.o.d ${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o.d ${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o.d ${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o.d ${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o.d ${OBJECTDIR}/_ext/1386327864/rfcomm.o.d ${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o.d ${OBJECTDIR}/_ext/1386327864/sdp_server.o.d ${OBJECTDIR}/_ext/1386327864/sdp_client.o.d ${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o.d ${OBJECTDIR}/_ext/1386327864/sdp_util.o.d ${OBJECTDIR}/_ext/1386528437/btstack_util.o.d ${OBJECTDIR}/_ext/1386327864/spp_server.o.d ${OBJECTDIR}/_ext/1386528437/hci_transport_h4.o.d ${OBJECTDIR}/_ext/1386528437/hci_transport_h5.o.d ${OBJECTDIR}/_ext/1386528437/btstack_slip.o.d ${OBJECTDIR}/_ext/1880736137/drv_tmr.o.d ${OBJECTDIR}/_ext/1112166103/sys_clk.o.d ${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o.d ${OBJECTDIR}/_ext/1510368962/sys_devcon.o.d ${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o.d ${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o.d ${OBJECTDIR}/_ext/2147153351/sys_ports.o.d
# Object Files
OBJECTFILES=${OBJECTDIR}/_ext/2048875307/system_init.o ${OBJECTDIR}/_ext/2048875307/system_tasks.o ${OBJECTDIR}/_ext/1360937237/btstack_port.o ${OBJECTDIR}/_ext/1360937237/app_debug.o ${OBJECTDIR}/_ext/1360937237/app.o ${OBJECTDIR}/_ext/1360937237/main.o ${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o ${OBJECTDIR}/_ext/534563071/ad_parser.o ${OBJECTDIR}/_ext/534563071/att_db.o ${OBJECTDIR}/_ext/534563071/att_dispatch.o ${OBJECTDIR}/_ext/534563071/att_server.o ${OBJECTDIR}/_ext/534563071/le_device_db_memory.o ${OBJECTDIR}/_ext/534563071/sm.o ${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o ${OBJECTDIR}/_ext/1386528437/btstack_memory.o ${OBJECTDIR}/_ext/1386528437/hci.o ${OBJECTDIR}/_ext/1386528437/hci_cmd.o ${OBJECTDIR}/_ext/1386528437/hci_dump.o ${OBJECTDIR}/_ext/1386528437/l2cap.o ${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o ${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o ${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o ${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o ${OBJECTDIR}/_ext/1386327864/rfcomm.o ${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o ${OBJECTDIR}/_ext/1386327864/sdp_server.o ${OBJECTDIR}/_ext/1386327864/sdp_client.o ${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o ${OBJECTDIR}/_ext/1386327864/sdp_util.o ${OBJECTDIR}/_ext/1386528437/btstack_util.o ${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o ${OBJECTDIR}/_ext/993942601/hci_transport_h4_embedded.o ${OBJECTDIR}/_ext/1880736137/drv_tmr.o ${OBJECTDIR}/_ext/1112166103/sys_clk.o ${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o ${OBJECTDIR}/_ext/1510368962/sys_devcon.o ${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o ${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o ${OBJECTDIR}/_ext/2147153351/sys_ports.o
OBJECTFILES=${OBJECTDIR}/_ext/101891878/system_init.o ${OBJECTDIR}/_ext/101891878/system_tasks.o ${OBJECTDIR}/_ext/1360937237/btstack_port.o ${OBJECTDIR}/_ext/1360937237/app_debug.o ${OBJECTDIR}/_ext/1360937237/app.o ${OBJECTDIR}/_ext/1360937237/main.o ${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o ${OBJECTDIR}/_ext/534563071/ad_parser.o ${OBJECTDIR}/_ext/534563071/att_db.o ${OBJECTDIR}/_ext/534563071/att_dispatch.o ${OBJECTDIR}/_ext/534563071/att_server.o ${OBJECTDIR}/_ext/534563071/le_device_db_memory.o ${OBJECTDIR}/_ext/534563071/sm.o ${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o ${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o ${OBJECTDIR}/_ext/993942601/btstack_uart_block_embedded.o ${OBJECTDIR}/_ext/1386528437/btstack_memory.o ${OBJECTDIR}/_ext/1386528437/hci.o ${OBJECTDIR}/_ext/1386528437/hci_cmd.o ${OBJECTDIR}/_ext/1386528437/hci_dump.o ${OBJECTDIR}/_ext/1386528437/l2cap.o ${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o ${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o ${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o ${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o ${OBJECTDIR}/_ext/1386327864/rfcomm.o ${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o ${OBJECTDIR}/_ext/1386327864/sdp_server.o ${OBJECTDIR}/_ext/1386327864/sdp_client.o ${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o ${OBJECTDIR}/_ext/1386327864/sdp_util.o ${OBJECTDIR}/_ext/1386528437/btstack_util.o ${OBJECTDIR}/_ext/1386327864/spp_server.o ${OBJECTDIR}/_ext/1386528437/hci_transport_h4.o ${OBJECTDIR}/_ext/1386528437/hci_transport_h5.o ${OBJECTDIR}/_ext/1386528437/btstack_slip.o ${OBJECTDIR}/_ext/1880736137/drv_tmr.o ${OBJECTDIR}/_ext/1112166103/sys_clk.o ${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o ${OBJECTDIR}/_ext/1510368962/sys_devcon.o ${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o ${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o ${OBJECTDIR}/_ext/2147153351/sys_ports.o
# Source Files
SOURCEFILES=../src/system_config/bk-audio-dk/system_init.c ../src/system_config/bk-audio-dk/system_tasks.c ../src/btstack_port.c ../src/app_debug.c ../src/app.c ../src/main.c ../../../example/spp_and_le_counter.c ../../../src/ble/ad_parser.c ../../../src/ble/att_db.c ../../../src/ble/att_dispatch.c ../../../src/ble/att_server.c ../../../src/ble/le_device_db_memory.c ../../../src/ble/sm.c ../../../chipset/csr/btstack_chipset_csr.c ../../../src/btstack_memory.c ../../../src/hci.c ../../../src/hci_cmd.c ../../../src/hci_dump.c ../../../src/l2cap.c ../../../src/l2cap_signaling.c ../../../src/btstack_linked_list.c ../../../src/btstack_memory_pool.c ../../../src/classic/btstack_link_key_db_memory.c ../../../src/classic/rfcomm.c ../../../src/btstack_run_loop.c ../../../src/classic/sdp_server.c ../../../src/classic/sdp_client.c ../../../src/classic/sdp_client_rfcomm.c ../../../src/classic/sdp_util.c ../../../src/btstack_util.c ../../../platform/embedded/btstack_run_loop_embedded.c ../../../platform/embedded/hci_transport_h4_embedded.c ../../../../driver/tmr/src/dynamic/drv_tmr.c ../../../../system/clk/src/sys_clk.c ../../../../system/clk/src/sys_clk_pic32mx.c ../../../../system/devcon/src/sys_devcon.c ../../../../system/devcon/src/sys_devcon_pic32mx.c ../../../../system/int/src/sys_int_pic32.c ../../../../system/ports/src/sys_ports.c
SOURCEFILES=../src/system_config/bt_audio_dk/system_init.c ../src/system_config/bt_audio_dk/system_tasks.c ../src/btstack_port.c ../src/app_debug.c ../src/app.c ../src/main.c ../../../example/spp_and_le_counter.c ../../../src/ble/ad_parser.c ../../../src/ble/att_db.c ../../../src/ble/att_dispatch.c ../../../src/ble/att_server.c ../../../src/ble/le_device_db_memory.c ../../../src/ble/sm.c ../../../chipset/csr/btstack_chipset_csr.c ../../../platform/embedded/btstack_run_loop_embedded.c ../../../platform/embedded/btstack_uart_block_embedded.c ../../../src/btstack_memory.c ../../../src/hci.c ../../../src/hci_cmd.c ../../../src/hci_dump.c ../../../src/l2cap.c ../../../src/l2cap_signaling.c ../../../src/btstack_linked_list.c ../../../src/btstack_memory_pool.c ../../../src/classic/btstack_link_key_db_memory.c ../../../src/classic/rfcomm.c ../../../src/btstack_run_loop.c ../../../src/classic/sdp_server.c ../../../src/classic/sdp_client.c ../../../src/classic/sdp_client_rfcomm.c ../../../src/classic/sdp_util.c ../../../src/btstack_util.c ../../../src/classic/spp_server.c ../../../src/hci_transport_h4.c ../../../src/hci_transport_h5.c ../../../src/btstack_slip.c ../../../../driver/tmr/src/dynamic/drv_tmr.c ../../../../system/clk/src/sys_clk.c ../../../../system/clk/src/sys_clk_pic32mx.c ../../../../system/devcon/src/sys_devcon.c ../../../../system/devcon/src/sys_devcon_pic32mx.c ../../../../system/int/src/sys_int_pic32.c ../../../../system/ports/src/sys_ports.c
CFLAGS=
@ -94,474 +94,522 @@ endif
# ------------------------------------------------------------------------------------
# Rules for buildStep: compile
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
${OBJECTDIR}/_ext/2048875307/system_init.o: ../src/system_config/bk-audio-dk/system_init.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/2048875307"
@${RM} ${OBJECTDIR}/_ext/2048875307/system_init.o.d
@${RM} ${OBJECTDIR}/_ext/2048875307/system_init.o
@${FIXDEPS} "${OBJECTDIR}/_ext/2048875307/system_init.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/2048875307/system_init.o.d" -o ${OBJECTDIR}/_ext/2048875307/system_init.o ../src/system_config/bk-audio-dk/system_init.c
${OBJECTDIR}/_ext/101891878/system_init.o: ../src/system_config/bt_audio_dk/system_init.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/101891878"
@${RM} ${OBJECTDIR}/_ext/101891878/system_init.o.d
@${RM} ${OBJECTDIR}/_ext/101891878/system_init.o
@${FIXDEPS} "${OBJECTDIR}/_ext/101891878/system_init.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/101891878/system_init.o.d" -o ${OBJECTDIR}/_ext/101891878/system_init.o ../src/system_config/bt_audio_dk/system_init.c
${OBJECTDIR}/_ext/2048875307/system_tasks.o: ../src/system_config/bk-audio-dk/system_tasks.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/2048875307"
@${RM} ${OBJECTDIR}/_ext/2048875307/system_tasks.o.d
@${RM} ${OBJECTDIR}/_ext/2048875307/system_tasks.o
@${FIXDEPS} "${OBJECTDIR}/_ext/2048875307/system_tasks.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/2048875307/system_tasks.o.d" -o ${OBJECTDIR}/_ext/2048875307/system_tasks.o ../src/system_config/bk-audio-dk/system_tasks.c
${OBJECTDIR}/_ext/101891878/system_tasks.o: ../src/system_config/bt_audio_dk/system_tasks.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/101891878"
@${RM} ${OBJECTDIR}/_ext/101891878/system_tasks.o.d
@${RM} ${OBJECTDIR}/_ext/101891878/system_tasks.o
@${FIXDEPS} "${OBJECTDIR}/_ext/101891878/system_tasks.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/101891878/system_tasks.o.d" -o ${OBJECTDIR}/_ext/101891878/system_tasks.o ../src/system_config/bt_audio_dk/system_tasks.c
${OBJECTDIR}/_ext/1360937237/btstack_port.o: ../src/btstack_port.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1360937237"
@${RM} ${OBJECTDIR}/_ext/1360937237/btstack_port.o.d
@${RM} ${OBJECTDIR}/_ext/1360937237/btstack_port.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/btstack_port.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1360937237/btstack_port.o.d" -o ${OBJECTDIR}/_ext/1360937237/btstack_port.o ../src/btstack_port.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/btstack_port.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1360937237/btstack_port.o.d" -o ${OBJECTDIR}/_ext/1360937237/btstack_port.o ../src/btstack_port.c
${OBJECTDIR}/_ext/1360937237/app_debug.o: ../src/app_debug.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1360937237"
@${RM} ${OBJECTDIR}/_ext/1360937237/app_debug.o.d
@${RM} ${OBJECTDIR}/_ext/1360937237/app_debug.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/app_debug.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1360937237/app_debug.o.d" -o ${OBJECTDIR}/_ext/1360937237/app_debug.o ../src/app_debug.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/app_debug.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1360937237/app_debug.o.d" -o ${OBJECTDIR}/_ext/1360937237/app_debug.o ../src/app_debug.c
${OBJECTDIR}/_ext/1360937237/app.o: ../src/app.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1360937237"
@${RM} ${OBJECTDIR}/_ext/1360937237/app.o.d
@${RM} ${OBJECTDIR}/_ext/1360937237/app.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/app.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1360937237/app.o.d" -o ${OBJECTDIR}/_ext/1360937237/app.o ../src/app.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/app.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1360937237/app.o.d" -o ${OBJECTDIR}/_ext/1360937237/app.o ../src/app.c
${OBJECTDIR}/_ext/1360937237/main.o: ../src/main.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1360937237"
@${RM} ${OBJECTDIR}/_ext/1360937237/main.o.d
@${RM} ${OBJECTDIR}/_ext/1360937237/main.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/main.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1360937237/main.o.d" -o ${OBJECTDIR}/_ext/1360937237/main.o ../src/main.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/main.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1360937237/main.o.d" -o ${OBJECTDIR}/_ext/1360937237/main.o ../src/main.c
${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o: ../../../example/spp_and_le_counter.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/97075643"
@${RM} ${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o.d
@${RM} ${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o
@${FIXDEPS} "${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o.d" -o ${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o ../../../example/spp_and_le_counter.c
@${FIXDEPS} "${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o.d" -o ${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o ../../../example/spp_and_le_counter.c
${OBJECTDIR}/_ext/534563071/ad_parser.o: ../../../src/ble/ad_parser.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/534563071"
@${RM} ${OBJECTDIR}/_ext/534563071/ad_parser.o.d
@${RM} ${OBJECTDIR}/_ext/534563071/ad_parser.o
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/ad_parser.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/ad_parser.o.d" -o ${OBJECTDIR}/_ext/534563071/ad_parser.o ../../../src/ble/ad_parser.c
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/ad_parser.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/ad_parser.o.d" -o ${OBJECTDIR}/_ext/534563071/ad_parser.o ../../../src/ble/ad_parser.c
${OBJECTDIR}/_ext/534563071/att_db.o: ../../../src/ble/att_db.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/534563071"
@${RM} ${OBJECTDIR}/_ext/534563071/att_db.o.d
@${RM} ${OBJECTDIR}/_ext/534563071/att_db.o
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/att_db.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/att_db.o.d" -o ${OBJECTDIR}/_ext/534563071/att_db.o ../../../src/ble/att_db.c
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/att_db.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/att_db.o.d" -o ${OBJECTDIR}/_ext/534563071/att_db.o ../../../src/ble/att_db.c
${OBJECTDIR}/_ext/534563071/att_dispatch.o: ../../../src/ble/att_dispatch.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/534563071"
@${RM} ${OBJECTDIR}/_ext/534563071/att_dispatch.o.d
@${RM} ${OBJECTDIR}/_ext/534563071/att_dispatch.o
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/att_dispatch.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/att_dispatch.o.d" -o ${OBJECTDIR}/_ext/534563071/att_dispatch.o ../../../src/ble/att_dispatch.c
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/att_dispatch.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/att_dispatch.o.d" -o ${OBJECTDIR}/_ext/534563071/att_dispatch.o ../../../src/ble/att_dispatch.c
${OBJECTDIR}/_ext/534563071/att_server.o: ../../../src/ble/att_server.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/534563071"
@${RM} ${OBJECTDIR}/_ext/534563071/att_server.o.d
@${RM} ${OBJECTDIR}/_ext/534563071/att_server.o
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/att_server.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/att_server.o.d" -o ${OBJECTDIR}/_ext/534563071/att_server.o ../../../src/ble/att_server.c
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/att_server.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/att_server.o.d" -o ${OBJECTDIR}/_ext/534563071/att_server.o ../../../src/ble/att_server.c
${OBJECTDIR}/_ext/534563071/le_device_db_memory.o: ../../../src/ble/le_device_db_memory.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/534563071"
@${RM} ${OBJECTDIR}/_ext/534563071/le_device_db_memory.o.d
@${RM} ${OBJECTDIR}/_ext/534563071/le_device_db_memory.o
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/le_device_db_memory.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/le_device_db_memory.o.d" -o ${OBJECTDIR}/_ext/534563071/le_device_db_memory.o ../../../src/ble/le_device_db_memory.c
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/le_device_db_memory.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/le_device_db_memory.o.d" -o ${OBJECTDIR}/_ext/534563071/le_device_db_memory.o ../../../src/ble/le_device_db_memory.c
${OBJECTDIR}/_ext/534563071/sm.o: ../../../src/ble/sm.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/534563071"
@${RM} ${OBJECTDIR}/_ext/534563071/sm.o.d
@${RM} ${OBJECTDIR}/_ext/534563071/sm.o
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/sm.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/sm.o.d" -o ${OBJECTDIR}/_ext/534563071/sm.o ../../../src/ble/sm.c
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/sm.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/sm.o.d" -o ${OBJECTDIR}/_ext/534563071/sm.o ../../../src/ble/sm.c
${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o: ../../../chipset/csr/btstack_chipset_csr.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1768064806"
@${RM} ${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o.d
@${RM} ${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o.d" -o ${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o ../../../chipset/csr/btstack_chipset_csr.c
${OBJECTDIR}/_ext/1386528437/btstack_memory.o: ../../../src/btstack_memory.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_memory.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_memory.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_memory.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_memory.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_memory.o ../../../src/btstack_memory.c
${OBJECTDIR}/_ext/1386528437/hci.o: ../../../src/hci.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/hci.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/hci.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/hci.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/hci.o.d" -o ${OBJECTDIR}/_ext/1386528437/hci.o ../../../src/hci.c
${OBJECTDIR}/_ext/1386528437/hci_cmd.o: ../../../src/hci_cmd.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_cmd.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_cmd.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/hci_cmd.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/hci_cmd.o.d" -o ${OBJECTDIR}/_ext/1386528437/hci_cmd.o ../../../src/hci_cmd.c
${OBJECTDIR}/_ext/1386528437/hci_dump.o: ../../../src/hci_dump.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_dump.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_dump.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/hci_dump.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/hci_dump.o.d" -o ${OBJECTDIR}/_ext/1386528437/hci_dump.o ../../../src/hci_dump.c
${OBJECTDIR}/_ext/1386528437/l2cap.o: ../../../src/l2cap.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/l2cap.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/l2cap.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/l2cap.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/l2cap.o.d" -o ${OBJECTDIR}/_ext/1386528437/l2cap.o ../../../src/l2cap.c
${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o: ../../../src/l2cap_signaling.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o.d" -o ${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o ../../../src/l2cap_signaling.c
${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o: ../../../src/btstack_linked_list.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o ../../../src/btstack_linked_list.c
${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o: ../../../src/btstack_memory_pool.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o ../../../src/btstack_memory_pool.c
${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o: ../../../src/classic/btstack_link_key_db_memory.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o.d" -o ${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o ../../../src/classic/btstack_link_key_db_memory.c
${OBJECTDIR}/_ext/1386327864/rfcomm.o: ../../../src/classic/rfcomm.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/rfcomm.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/rfcomm.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/rfcomm.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/rfcomm.o.d" -o ${OBJECTDIR}/_ext/1386327864/rfcomm.o ../../../src/classic/rfcomm.c
${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o: ../../../src/btstack_run_loop.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o ../../../src/btstack_run_loop.c
${OBJECTDIR}/_ext/1386327864/sdp_server.o: ../../../src/classic/sdp_server.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_server.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_server.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/sdp_server.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/sdp_server.o.d" -o ${OBJECTDIR}/_ext/1386327864/sdp_server.o ../../../src/classic/sdp_server.c
${OBJECTDIR}/_ext/1386327864/sdp_client.o: ../../../src/classic/sdp_client.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_client.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_client.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/sdp_client.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/sdp_client.o.d" -o ${OBJECTDIR}/_ext/1386327864/sdp_client.o ../../../src/classic/sdp_client.c
${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o: ../../../src/classic/sdp_client_rfcomm.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o.d" -o ${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o ../../../src/classic/sdp_client_rfcomm.c
${OBJECTDIR}/_ext/1386327864/sdp_util.o: ../../../src/classic/sdp_util.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_util.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_util.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/sdp_util.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/sdp_util.o.d" -o ${OBJECTDIR}/_ext/1386327864/sdp_util.o ../../../src/classic/sdp_util.c
${OBJECTDIR}/_ext/1386528437/btstack_util.o: ../../../src/btstack_util.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_util.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_util.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_util.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_util.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_util.o ../../../src/btstack_util.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o.d" -o ${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o ../../../chipset/csr/btstack_chipset_csr.c
${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o: ../../../platform/embedded/btstack_run_loop_embedded.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/993942601"
@${RM} ${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o.d
@${RM} ${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o
@${FIXDEPS} "${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o.d" -o ${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o ../../../platform/embedded/btstack_run_loop_embedded.c
@${FIXDEPS} "${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o.d" -o ${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o ../../../platform/embedded/btstack_run_loop_embedded.c
${OBJECTDIR}/_ext/993942601/hci_transport_h4_embedded.o: ../../../platform/embedded/hci_transport_h4_embedded.c nbproject/Makefile-${CND_CONF}.mk
${OBJECTDIR}/_ext/993942601/btstack_uart_block_embedded.o: ../../../platform/embedded/btstack_uart_block_embedded.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/993942601"
@${RM} ${OBJECTDIR}/_ext/993942601/hci_transport_h4_embedded.o.d
@${RM} ${OBJECTDIR}/_ext/993942601/hci_transport_h4_embedded.o
@${FIXDEPS} "${OBJECTDIR}/_ext/993942601/hci_transport_h4_embedded.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/993942601/hci_transport_h4_embedded.o.d" -o ${OBJECTDIR}/_ext/993942601/hci_transport_h4_embedded.o ../../../platform/embedded/hci_transport_h4_embedded.c
@${RM} ${OBJECTDIR}/_ext/993942601/btstack_uart_block_embedded.o.d
@${RM} ${OBJECTDIR}/_ext/993942601/btstack_uart_block_embedded.o
@${FIXDEPS} "${OBJECTDIR}/_ext/993942601/btstack_uart_block_embedded.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/993942601/btstack_uart_block_embedded.o.d" -o ${OBJECTDIR}/_ext/993942601/btstack_uart_block_embedded.o ../../../platform/embedded/btstack_uart_block_embedded.c
${OBJECTDIR}/_ext/1386528437/btstack_memory.o: ../../../src/btstack_memory.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_memory.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_memory.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_memory.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_memory.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_memory.o ../../../src/btstack_memory.c
${OBJECTDIR}/_ext/1386528437/hci.o: ../../../src/hci.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/hci.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/hci.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/hci.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/hci.o.d" -o ${OBJECTDIR}/_ext/1386528437/hci.o ../../../src/hci.c
${OBJECTDIR}/_ext/1386528437/hci_cmd.o: ../../../src/hci_cmd.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_cmd.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_cmd.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/hci_cmd.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/hci_cmd.o.d" -o ${OBJECTDIR}/_ext/1386528437/hci_cmd.o ../../../src/hci_cmd.c
${OBJECTDIR}/_ext/1386528437/hci_dump.o: ../../../src/hci_dump.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_dump.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_dump.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/hci_dump.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/hci_dump.o.d" -o ${OBJECTDIR}/_ext/1386528437/hci_dump.o ../../../src/hci_dump.c
${OBJECTDIR}/_ext/1386528437/l2cap.o: ../../../src/l2cap.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/l2cap.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/l2cap.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/l2cap.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/l2cap.o.d" -o ${OBJECTDIR}/_ext/1386528437/l2cap.o ../../../src/l2cap.c
${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o: ../../../src/l2cap_signaling.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o.d" -o ${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o ../../../src/l2cap_signaling.c
${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o: ../../../src/btstack_linked_list.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o ../../../src/btstack_linked_list.c
${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o: ../../../src/btstack_memory_pool.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o ../../../src/btstack_memory_pool.c
${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o: ../../../src/classic/btstack_link_key_db_memory.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o.d" -o ${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o ../../../src/classic/btstack_link_key_db_memory.c
${OBJECTDIR}/_ext/1386327864/rfcomm.o: ../../../src/classic/rfcomm.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/rfcomm.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/rfcomm.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/rfcomm.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/rfcomm.o.d" -o ${OBJECTDIR}/_ext/1386327864/rfcomm.o ../../../src/classic/rfcomm.c
${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o: ../../../src/btstack_run_loop.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o ../../../src/btstack_run_loop.c
${OBJECTDIR}/_ext/1386327864/sdp_server.o: ../../../src/classic/sdp_server.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_server.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_server.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/sdp_server.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/sdp_server.o.d" -o ${OBJECTDIR}/_ext/1386327864/sdp_server.o ../../../src/classic/sdp_server.c
${OBJECTDIR}/_ext/1386327864/sdp_client.o: ../../../src/classic/sdp_client.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_client.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_client.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/sdp_client.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/sdp_client.o.d" -o ${OBJECTDIR}/_ext/1386327864/sdp_client.o ../../../src/classic/sdp_client.c
${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o: ../../../src/classic/sdp_client_rfcomm.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o.d" -o ${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o ../../../src/classic/sdp_client_rfcomm.c
${OBJECTDIR}/_ext/1386327864/sdp_util.o: ../../../src/classic/sdp_util.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_util.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_util.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/sdp_util.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/sdp_util.o.d" -o ${OBJECTDIR}/_ext/1386327864/sdp_util.o ../../../src/classic/sdp_util.c
${OBJECTDIR}/_ext/1386528437/btstack_util.o: ../../../src/btstack_util.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_util.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_util.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_util.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_util.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_util.o ../../../src/btstack_util.c
${OBJECTDIR}/_ext/1386327864/spp_server.o: ../../../src/classic/spp_server.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/spp_server.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/spp_server.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/spp_server.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/spp_server.o.d" -o ${OBJECTDIR}/_ext/1386327864/spp_server.o ../../../src/classic/spp_server.c
${OBJECTDIR}/_ext/1386528437/hci_transport_h4.o: ../../../src/hci_transport_h4.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_transport_h4.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_transport_h4.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/hci_transport_h4.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/hci_transport_h4.o.d" -o ${OBJECTDIR}/_ext/1386528437/hci_transport_h4.o ../../../src/hci_transport_h4.c
${OBJECTDIR}/_ext/1386528437/hci_transport_h5.o: ../../../src/hci_transport_h5.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_transport_h5.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_transport_h5.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/hci_transport_h5.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/hci_transport_h5.o.d" -o ${OBJECTDIR}/_ext/1386528437/hci_transport_h5.o ../../../src/hci_transport_h5.c
${OBJECTDIR}/_ext/1386528437/btstack_slip.o: ../../../src/btstack_slip.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_slip.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_slip.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_slip.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_slip.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_slip.o ../../../src/btstack_slip.c
${OBJECTDIR}/_ext/1880736137/drv_tmr.o: ../../../../driver/tmr/src/dynamic/drv_tmr.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1880736137"
@${RM} ${OBJECTDIR}/_ext/1880736137/drv_tmr.o.d
@${RM} ${OBJECTDIR}/_ext/1880736137/drv_tmr.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1880736137/drv_tmr.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1880736137/drv_tmr.o.d" -o ${OBJECTDIR}/_ext/1880736137/drv_tmr.o ../../../../driver/tmr/src/dynamic/drv_tmr.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1880736137/drv_tmr.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1880736137/drv_tmr.o.d" -o ${OBJECTDIR}/_ext/1880736137/drv_tmr.o ../../../../driver/tmr/src/dynamic/drv_tmr.c
${OBJECTDIR}/_ext/1112166103/sys_clk.o: ../../../../system/clk/src/sys_clk.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1112166103"
@${RM} ${OBJECTDIR}/_ext/1112166103/sys_clk.o.d
@${RM} ${OBJECTDIR}/_ext/1112166103/sys_clk.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1112166103/sys_clk.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1112166103/sys_clk.o.d" -o ${OBJECTDIR}/_ext/1112166103/sys_clk.o ../../../../system/clk/src/sys_clk.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1112166103/sys_clk.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1112166103/sys_clk.o.d" -o ${OBJECTDIR}/_ext/1112166103/sys_clk.o ../../../../system/clk/src/sys_clk.c
${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o: ../../../../system/clk/src/sys_clk_pic32mx.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1112166103"
@${RM} ${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o.d
@${RM} ${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o.d" -o ${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o ../../../../system/clk/src/sys_clk_pic32mx.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o.d" -o ${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o ../../../../system/clk/src/sys_clk_pic32mx.c
${OBJECTDIR}/_ext/1510368962/sys_devcon.o: ../../../../system/devcon/src/sys_devcon.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1510368962"
@${RM} ${OBJECTDIR}/_ext/1510368962/sys_devcon.o.d
@${RM} ${OBJECTDIR}/_ext/1510368962/sys_devcon.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1510368962/sys_devcon.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1510368962/sys_devcon.o.d" -o ${OBJECTDIR}/_ext/1510368962/sys_devcon.o ../../../../system/devcon/src/sys_devcon.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1510368962/sys_devcon.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1510368962/sys_devcon.o.d" -o ${OBJECTDIR}/_ext/1510368962/sys_devcon.o ../../../../system/devcon/src/sys_devcon.c
${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o: ../../../../system/devcon/src/sys_devcon_pic32mx.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1510368962"
@${RM} ${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o.d
@${RM} ${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o.d" -o ${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o ../../../../system/devcon/src/sys_devcon_pic32mx.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o.d" -o ${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o ../../../../system/devcon/src/sys_devcon_pic32mx.c
${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o: ../../../../system/int/src/sys_int_pic32.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/2087176412"
@${RM} ${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o.d
@${RM} ${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o
@${FIXDEPS} "${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o.d" -o ${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o ../../../../system/int/src/sys_int_pic32.c
@${FIXDEPS} "${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o.d" -o ${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o ../../../../system/int/src/sys_int_pic32.c
${OBJECTDIR}/_ext/2147153351/sys_ports.o: ../../../../system/ports/src/sys_ports.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/2147153351"
@${RM} ${OBJECTDIR}/_ext/2147153351/sys_ports.o.d
@${RM} ${OBJECTDIR}/_ext/2147153351/sys_ports.o
@${FIXDEPS} "${OBJECTDIR}/_ext/2147153351/sys_ports.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/2147153351/sys_ports.o.d" -o ${OBJECTDIR}/_ext/2147153351/sys_ports.o ../../../../system/ports/src/sys_ports.c
@${FIXDEPS} "${OBJECTDIR}/_ext/2147153351/sys_ports.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/2147153351/sys_ports.o.d" -o ${OBJECTDIR}/_ext/2147153351/sys_ports.o ../../../../system/ports/src/sys_ports.c
else
${OBJECTDIR}/_ext/2048875307/system_init.o: ../src/system_config/bk-audio-dk/system_init.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/2048875307"
@${RM} ${OBJECTDIR}/_ext/2048875307/system_init.o.d
@${RM} ${OBJECTDIR}/_ext/2048875307/system_init.o
@${FIXDEPS} "${OBJECTDIR}/_ext/2048875307/system_init.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/2048875307/system_init.o.d" -o ${OBJECTDIR}/_ext/2048875307/system_init.o ../src/system_config/bk-audio-dk/system_init.c
${OBJECTDIR}/_ext/101891878/system_init.o: ../src/system_config/bt_audio_dk/system_init.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/101891878"
@${RM} ${OBJECTDIR}/_ext/101891878/system_init.o.d
@${RM} ${OBJECTDIR}/_ext/101891878/system_init.o
@${FIXDEPS} "${OBJECTDIR}/_ext/101891878/system_init.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/101891878/system_init.o.d" -o ${OBJECTDIR}/_ext/101891878/system_init.o ../src/system_config/bt_audio_dk/system_init.c
${OBJECTDIR}/_ext/2048875307/system_tasks.o: ../src/system_config/bk-audio-dk/system_tasks.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/2048875307"
@${RM} ${OBJECTDIR}/_ext/2048875307/system_tasks.o.d
@${RM} ${OBJECTDIR}/_ext/2048875307/system_tasks.o
@${FIXDEPS} "${OBJECTDIR}/_ext/2048875307/system_tasks.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/2048875307/system_tasks.o.d" -o ${OBJECTDIR}/_ext/2048875307/system_tasks.o ../src/system_config/bk-audio-dk/system_tasks.c
${OBJECTDIR}/_ext/101891878/system_tasks.o: ../src/system_config/bt_audio_dk/system_tasks.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/101891878"
@${RM} ${OBJECTDIR}/_ext/101891878/system_tasks.o.d
@${RM} ${OBJECTDIR}/_ext/101891878/system_tasks.o
@${FIXDEPS} "${OBJECTDIR}/_ext/101891878/system_tasks.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/101891878/system_tasks.o.d" -o ${OBJECTDIR}/_ext/101891878/system_tasks.o ../src/system_config/bt_audio_dk/system_tasks.c
${OBJECTDIR}/_ext/1360937237/btstack_port.o: ../src/btstack_port.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1360937237"
@${RM} ${OBJECTDIR}/_ext/1360937237/btstack_port.o.d
@${RM} ${OBJECTDIR}/_ext/1360937237/btstack_port.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/btstack_port.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1360937237/btstack_port.o.d" -o ${OBJECTDIR}/_ext/1360937237/btstack_port.o ../src/btstack_port.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/btstack_port.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1360937237/btstack_port.o.d" -o ${OBJECTDIR}/_ext/1360937237/btstack_port.o ../src/btstack_port.c
${OBJECTDIR}/_ext/1360937237/app_debug.o: ../src/app_debug.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1360937237"
@${RM} ${OBJECTDIR}/_ext/1360937237/app_debug.o.d
@${RM} ${OBJECTDIR}/_ext/1360937237/app_debug.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/app_debug.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1360937237/app_debug.o.d" -o ${OBJECTDIR}/_ext/1360937237/app_debug.o ../src/app_debug.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/app_debug.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1360937237/app_debug.o.d" -o ${OBJECTDIR}/_ext/1360937237/app_debug.o ../src/app_debug.c
${OBJECTDIR}/_ext/1360937237/app.o: ../src/app.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1360937237"
@${RM} ${OBJECTDIR}/_ext/1360937237/app.o.d
@${RM} ${OBJECTDIR}/_ext/1360937237/app.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/app.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1360937237/app.o.d" -o ${OBJECTDIR}/_ext/1360937237/app.o ../src/app.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/app.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1360937237/app.o.d" -o ${OBJECTDIR}/_ext/1360937237/app.o ../src/app.c
${OBJECTDIR}/_ext/1360937237/main.o: ../src/main.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1360937237"
@${RM} ${OBJECTDIR}/_ext/1360937237/main.o.d
@${RM} ${OBJECTDIR}/_ext/1360937237/main.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/main.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1360937237/main.o.d" -o ${OBJECTDIR}/_ext/1360937237/main.o ../src/main.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/main.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1360937237/main.o.d" -o ${OBJECTDIR}/_ext/1360937237/main.o ../src/main.c
${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o: ../../../example/spp_and_le_counter.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/97075643"
@${RM} ${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o.d
@${RM} ${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o
@${FIXDEPS} "${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o.d" -o ${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o ../../../example/spp_and_le_counter.c
@${FIXDEPS} "${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o.d" -o ${OBJECTDIR}/_ext/97075643/spp_and_le_counter.o ../../../example/spp_and_le_counter.c
${OBJECTDIR}/_ext/534563071/ad_parser.o: ../../../src/ble/ad_parser.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/534563071"
@${RM} ${OBJECTDIR}/_ext/534563071/ad_parser.o.d
@${RM} ${OBJECTDIR}/_ext/534563071/ad_parser.o
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/ad_parser.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/ad_parser.o.d" -o ${OBJECTDIR}/_ext/534563071/ad_parser.o ../../../src/ble/ad_parser.c
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/ad_parser.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/ad_parser.o.d" -o ${OBJECTDIR}/_ext/534563071/ad_parser.o ../../../src/ble/ad_parser.c
${OBJECTDIR}/_ext/534563071/att_db.o: ../../../src/ble/att_db.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/534563071"
@${RM} ${OBJECTDIR}/_ext/534563071/att_db.o.d
@${RM} ${OBJECTDIR}/_ext/534563071/att_db.o
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/att_db.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/att_db.o.d" -o ${OBJECTDIR}/_ext/534563071/att_db.o ../../../src/ble/att_db.c
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/att_db.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/att_db.o.d" -o ${OBJECTDIR}/_ext/534563071/att_db.o ../../../src/ble/att_db.c
${OBJECTDIR}/_ext/534563071/att_dispatch.o: ../../../src/ble/att_dispatch.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/534563071"
@${RM} ${OBJECTDIR}/_ext/534563071/att_dispatch.o.d
@${RM} ${OBJECTDIR}/_ext/534563071/att_dispatch.o
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/att_dispatch.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/att_dispatch.o.d" -o ${OBJECTDIR}/_ext/534563071/att_dispatch.o ../../../src/ble/att_dispatch.c
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/att_dispatch.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/att_dispatch.o.d" -o ${OBJECTDIR}/_ext/534563071/att_dispatch.o ../../../src/ble/att_dispatch.c
${OBJECTDIR}/_ext/534563071/att_server.o: ../../../src/ble/att_server.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/534563071"
@${RM} ${OBJECTDIR}/_ext/534563071/att_server.o.d
@${RM} ${OBJECTDIR}/_ext/534563071/att_server.o
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/att_server.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/att_server.o.d" -o ${OBJECTDIR}/_ext/534563071/att_server.o ../../../src/ble/att_server.c
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/att_server.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/att_server.o.d" -o ${OBJECTDIR}/_ext/534563071/att_server.o ../../../src/ble/att_server.c
${OBJECTDIR}/_ext/534563071/le_device_db_memory.o: ../../../src/ble/le_device_db_memory.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/534563071"
@${RM} ${OBJECTDIR}/_ext/534563071/le_device_db_memory.o.d
@${RM} ${OBJECTDIR}/_ext/534563071/le_device_db_memory.o
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/le_device_db_memory.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/le_device_db_memory.o.d" -o ${OBJECTDIR}/_ext/534563071/le_device_db_memory.o ../../../src/ble/le_device_db_memory.c
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/le_device_db_memory.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/le_device_db_memory.o.d" -o ${OBJECTDIR}/_ext/534563071/le_device_db_memory.o ../../../src/ble/le_device_db_memory.c
${OBJECTDIR}/_ext/534563071/sm.o: ../../../src/ble/sm.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/534563071"
@${RM} ${OBJECTDIR}/_ext/534563071/sm.o.d
@${RM} ${OBJECTDIR}/_ext/534563071/sm.o
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/sm.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/sm.o.d" -o ${OBJECTDIR}/_ext/534563071/sm.o ../../../src/ble/sm.c
@${FIXDEPS} "${OBJECTDIR}/_ext/534563071/sm.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/534563071/sm.o.d" -o ${OBJECTDIR}/_ext/534563071/sm.o ../../../src/ble/sm.c
${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o: ../../../chipset/csr/btstack_chipset_csr.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1768064806"
@${RM} ${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o.d
@${RM} ${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o.d" -o ${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o ../../../chipset/csr/btstack_chipset_csr.c
${OBJECTDIR}/_ext/1386528437/btstack_memory.o: ../../../src/btstack_memory.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_memory.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_memory.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_memory.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_memory.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_memory.o ../../../src/btstack_memory.c
${OBJECTDIR}/_ext/1386528437/hci.o: ../../../src/hci.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/hci.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/hci.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/hci.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/hci.o.d" -o ${OBJECTDIR}/_ext/1386528437/hci.o ../../../src/hci.c
${OBJECTDIR}/_ext/1386528437/hci_cmd.o: ../../../src/hci_cmd.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_cmd.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_cmd.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/hci_cmd.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/hci_cmd.o.d" -o ${OBJECTDIR}/_ext/1386528437/hci_cmd.o ../../../src/hci_cmd.c
${OBJECTDIR}/_ext/1386528437/hci_dump.o: ../../../src/hci_dump.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_dump.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_dump.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/hci_dump.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/hci_dump.o.d" -o ${OBJECTDIR}/_ext/1386528437/hci_dump.o ../../../src/hci_dump.c
${OBJECTDIR}/_ext/1386528437/l2cap.o: ../../../src/l2cap.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/l2cap.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/l2cap.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/l2cap.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/l2cap.o.d" -o ${OBJECTDIR}/_ext/1386528437/l2cap.o ../../../src/l2cap.c
${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o: ../../../src/l2cap_signaling.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o.d" -o ${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o ../../../src/l2cap_signaling.c
${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o: ../../../src/btstack_linked_list.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o ../../../src/btstack_linked_list.c
${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o: ../../../src/btstack_memory_pool.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o ../../../src/btstack_memory_pool.c
${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o: ../../../src/classic/btstack_link_key_db_memory.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o.d" -o ${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o ../../../src/classic/btstack_link_key_db_memory.c
${OBJECTDIR}/_ext/1386327864/rfcomm.o: ../../../src/classic/rfcomm.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/rfcomm.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/rfcomm.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/rfcomm.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/rfcomm.o.d" -o ${OBJECTDIR}/_ext/1386327864/rfcomm.o ../../../src/classic/rfcomm.c
${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o: ../../../src/btstack_run_loop.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o ../../../src/btstack_run_loop.c
${OBJECTDIR}/_ext/1386327864/sdp_server.o: ../../../src/classic/sdp_server.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_server.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_server.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/sdp_server.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/sdp_server.o.d" -o ${OBJECTDIR}/_ext/1386327864/sdp_server.o ../../../src/classic/sdp_server.c
${OBJECTDIR}/_ext/1386327864/sdp_client.o: ../../../src/classic/sdp_client.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_client.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_client.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/sdp_client.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/sdp_client.o.d" -o ${OBJECTDIR}/_ext/1386327864/sdp_client.o ../../../src/classic/sdp_client.c
${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o: ../../../src/classic/sdp_client_rfcomm.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o.d" -o ${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o ../../../src/classic/sdp_client_rfcomm.c
${OBJECTDIR}/_ext/1386327864/sdp_util.o: ../../../src/classic/sdp_util.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_util.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_util.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/sdp_util.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/sdp_util.o.d" -o ${OBJECTDIR}/_ext/1386327864/sdp_util.o ../../../src/classic/sdp_util.c
${OBJECTDIR}/_ext/1386528437/btstack_util.o: ../../../src/btstack_util.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_util.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_util.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_util.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_util.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_util.o ../../../src/btstack_util.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o.d" -o ${OBJECTDIR}/_ext/1768064806/btstack_chipset_csr.o ../../../chipset/csr/btstack_chipset_csr.c
${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o: ../../../platform/embedded/btstack_run_loop_embedded.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/993942601"
@${RM} ${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o.d
@${RM} ${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o
@${FIXDEPS} "${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o.d" -o ${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o ../../../platform/embedded/btstack_run_loop_embedded.c
@${FIXDEPS} "${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o.d" -o ${OBJECTDIR}/_ext/993942601/btstack_run_loop_embedded.o ../../../platform/embedded/btstack_run_loop_embedded.c
${OBJECTDIR}/_ext/993942601/hci_transport_h4_embedded.o: ../../../platform/embedded/hci_transport_h4_embedded.c nbproject/Makefile-${CND_CONF}.mk
${OBJECTDIR}/_ext/993942601/btstack_uart_block_embedded.o: ../../../platform/embedded/btstack_uart_block_embedded.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/993942601"
@${RM} ${OBJECTDIR}/_ext/993942601/hci_transport_h4_embedded.o.d
@${RM} ${OBJECTDIR}/_ext/993942601/hci_transport_h4_embedded.o
@${FIXDEPS} "${OBJECTDIR}/_ext/993942601/hci_transport_h4_embedded.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/993942601/hci_transport_h4_embedded.o.d" -o ${OBJECTDIR}/_ext/993942601/hci_transport_h4_embedded.o ../../../platform/embedded/hci_transport_h4_embedded.c
@${RM} ${OBJECTDIR}/_ext/993942601/btstack_uart_block_embedded.o.d
@${RM} ${OBJECTDIR}/_ext/993942601/btstack_uart_block_embedded.o
@${FIXDEPS} "${OBJECTDIR}/_ext/993942601/btstack_uart_block_embedded.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/993942601/btstack_uart_block_embedded.o.d" -o ${OBJECTDIR}/_ext/993942601/btstack_uart_block_embedded.o ../../../platform/embedded/btstack_uart_block_embedded.c
${OBJECTDIR}/_ext/1386528437/btstack_memory.o: ../../../src/btstack_memory.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_memory.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_memory.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_memory.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_memory.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_memory.o ../../../src/btstack_memory.c
${OBJECTDIR}/_ext/1386528437/hci.o: ../../../src/hci.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/hci.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/hci.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/hci.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/hci.o.d" -o ${OBJECTDIR}/_ext/1386528437/hci.o ../../../src/hci.c
${OBJECTDIR}/_ext/1386528437/hci_cmd.o: ../../../src/hci_cmd.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_cmd.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_cmd.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/hci_cmd.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/hci_cmd.o.d" -o ${OBJECTDIR}/_ext/1386528437/hci_cmd.o ../../../src/hci_cmd.c
${OBJECTDIR}/_ext/1386528437/hci_dump.o: ../../../src/hci_dump.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_dump.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_dump.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/hci_dump.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/hci_dump.o.d" -o ${OBJECTDIR}/_ext/1386528437/hci_dump.o ../../../src/hci_dump.c
${OBJECTDIR}/_ext/1386528437/l2cap.o: ../../../src/l2cap.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/l2cap.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/l2cap.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/l2cap.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/l2cap.o.d" -o ${OBJECTDIR}/_ext/1386528437/l2cap.o ../../../src/l2cap.c
${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o: ../../../src/l2cap_signaling.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o.d" -o ${OBJECTDIR}/_ext/1386528437/l2cap_signaling.o ../../../src/l2cap_signaling.c
${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o: ../../../src/btstack_linked_list.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_linked_list.o ../../../src/btstack_linked_list.c
${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o: ../../../src/btstack_memory_pool.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_memory_pool.o ../../../src/btstack_memory_pool.c
${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o: ../../../src/classic/btstack_link_key_db_memory.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o.d" -o ${OBJECTDIR}/_ext/1386327864/btstack_link_key_db_memory.o ../../../src/classic/btstack_link_key_db_memory.c
${OBJECTDIR}/_ext/1386327864/rfcomm.o: ../../../src/classic/rfcomm.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/rfcomm.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/rfcomm.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/rfcomm.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/rfcomm.o.d" -o ${OBJECTDIR}/_ext/1386327864/rfcomm.o ../../../src/classic/rfcomm.c
${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o: ../../../src/btstack_run_loop.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_run_loop.o ../../../src/btstack_run_loop.c
${OBJECTDIR}/_ext/1386327864/sdp_server.o: ../../../src/classic/sdp_server.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_server.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_server.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/sdp_server.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/sdp_server.o.d" -o ${OBJECTDIR}/_ext/1386327864/sdp_server.o ../../../src/classic/sdp_server.c
${OBJECTDIR}/_ext/1386327864/sdp_client.o: ../../../src/classic/sdp_client.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_client.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_client.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/sdp_client.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/sdp_client.o.d" -o ${OBJECTDIR}/_ext/1386327864/sdp_client.o ../../../src/classic/sdp_client.c
${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o: ../../../src/classic/sdp_client_rfcomm.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o.d" -o ${OBJECTDIR}/_ext/1386327864/sdp_client_rfcomm.o ../../../src/classic/sdp_client_rfcomm.c
${OBJECTDIR}/_ext/1386327864/sdp_util.o: ../../../src/classic/sdp_util.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_util.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/sdp_util.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/sdp_util.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/sdp_util.o.d" -o ${OBJECTDIR}/_ext/1386327864/sdp_util.o ../../../src/classic/sdp_util.c
${OBJECTDIR}/_ext/1386528437/btstack_util.o: ../../../src/btstack_util.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_util.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_util.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_util.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_util.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_util.o ../../../src/btstack_util.c
${OBJECTDIR}/_ext/1386327864/spp_server.o: ../../../src/classic/spp_server.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386327864"
@${RM} ${OBJECTDIR}/_ext/1386327864/spp_server.o.d
@${RM} ${OBJECTDIR}/_ext/1386327864/spp_server.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386327864/spp_server.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386327864/spp_server.o.d" -o ${OBJECTDIR}/_ext/1386327864/spp_server.o ../../../src/classic/spp_server.c
${OBJECTDIR}/_ext/1386528437/hci_transport_h4.o: ../../../src/hci_transport_h4.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_transport_h4.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_transport_h4.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/hci_transport_h4.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/hci_transport_h4.o.d" -o ${OBJECTDIR}/_ext/1386528437/hci_transport_h4.o ../../../src/hci_transport_h4.c
${OBJECTDIR}/_ext/1386528437/hci_transport_h5.o: ../../../src/hci_transport_h5.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_transport_h5.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/hci_transport_h5.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/hci_transport_h5.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/hci_transport_h5.o.d" -o ${OBJECTDIR}/_ext/1386528437/hci_transport_h5.o ../../../src/hci_transport_h5.c
${OBJECTDIR}/_ext/1386528437/btstack_slip.o: ../../../src/btstack_slip.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1386528437"
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_slip.o.d
@${RM} ${OBJECTDIR}/_ext/1386528437/btstack_slip.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1386528437/btstack_slip.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1386528437/btstack_slip.o.d" -o ${OBJECTDIR}/_ext/1386528437/btstack_slip.o ../../../src/btstack_slip.c
${OBJECTDIR}/_ext/1880736137/drv_tmr.o: ../../../../driver/tmr/src/dynamic/drv_tmr.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1880736137"
@${RM} ${OBJECTDIR}/_ext/1880736137/drv_tmr.o.d
@${RM} ${OBJECTDIR}/_ext/1880736137/drv_tmr.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1880736137/drv_tmr.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1880736137/drv_tmr.o.d" -o ${OBJECTDIR}/_ext/1880736137/drv_tmr.o ../../../../driver/tmr/src/dynamic/drv_tmr.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1880736137/drv_tmr.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1880736137/drv_tmr.o.d" -o ${OBJECTDIR}/_ext/1880736137/drv_tmr.o ../../../../driver/tmr/src/dynamic/drv_tmr.c
${OBJECTDIR}/_ext/1112166103/sys_clk.o: ../../../../system/clk/src/sys_clk.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1112166103"
@${RM} ${OBJECTDIR}/_ext/1112166103/sys_clk.o.d
@${RM} ${OBJECTDIR}/_ext/1112166103/sys_clk.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1112166103/sys_clk.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1112166103/sys_clk.o.d" -o ${OBJECTDIR}/_ext/1112166103/sys_clk.o ../../../../system/clk/src/sys_clk.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1112166103/sys_clk.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1112166103/sys_clk.o.d" -o ${OBJECTDIR}/_ext/1112166103/sys_clk.o ../../../../system/clk/src/sys_clk.c
${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o: ../../../../system/clk/src/sys_clk_pic32mx.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1112166103"
@${RM} ${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o.d
@${RM} ${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o.d" -o ${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o ../../../../system/clk/src/sys_clk_pic32mx.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o.d" -o ${OBJECTDIR}/_ext/1112166103/sys_clk_pic32mx.o ../../../../system/clk/src/sys_clk_pic32mx.c
${OBJECTDIR}/_ext/1510368962/sys_devcon.o: ../../../../system/devcon/src/sys_devcon.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1510368962"
@${RM} ${OBJECTDIR}/_ext/1510368962/sys_devcon.o.d
@${RM} ${OBJECTDIR}/_ext/1510368962/sys_devcon.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1510368962/sys_devcon.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1510368962/sys_devcon.o.d" -o ${OBJECTDIR}/_ext/1510368962/sys_devcon.o ../../../../system/devcon/src/sys_devcon.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1510368962/sys_devcon.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1510368962/sys_devcon.o.d" -o ${OBJECTDIR}/_ext/1510368962/sys_devcon.o ../../../../system/devcon/src/sys_devcon.c
${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o: ../../../../system/devcon/src/sys_devcon_pic32mx.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/1510368962"
@${RM} ${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o.d
@${RM} ${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o
@${FIXDEPS} "${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o.d" -o ${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o ../../../../system/devcon/src/sys_devcon_pic32mx.c
@${FIXDEPS} "${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o.d" -o ${OBJECTDIR}/_ext/1510368962/sys_devcon_pic32mx.o ../../../../system/devcon/src/sys_devcon_pic32mx.c
${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o: ../../../../system/int/src/sys_int_pic32.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/2087176412"
@${RM} ${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o.d
@${RM} ${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o
@${FIXDEPS} "${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o.d" -o ${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o ../../../../system/int/src/sys_int_pic32.c
@${FIXDEPS} "${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o.d" -o ${OBJECTDIR}/_ext/2087176412/sys_int_pic32.o ../../../../system/int/src/sys_int_pic32.c
${OBJECTDIR}/_ext/2147153351/sys_ports.o: ../../../../system/ports/src/sys_ports.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/_ext/2147153351"
@${RM} ${OBJECTDIR}/_ext/2147153351/sys_ports.o.d
@${RM} ${OBJECTDIR}/_ext/2147153351/sys_ports.o
@${FIXDEPS} "${OBJECTDIR}/_ext/2147153351/sys_ports.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bk-audio-dk" -I"../../../include" -I"../../../src" -I"../../../ble" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/2147153351/sys_ports.o.d" -o ${OBJECTDIR}/_ext/2147153351/sys_ports.o ../../../../system/ports/src/sys_ports.c
@${FIXDEPS} "${OBJECTDIR}/_ext/2147153351/sys_ports.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -Os -I"." -I"../../../.." -I"../src" -I"../src/system_config/bt_audio_dk" -I"../../../src" -I"../../../chipset/csr" -I"../../../platform/embedded" -MMD -MF "${OBJECTDIR}/_ext/2147153351/sys_ports.o.d" -o ${OBJECTDIR}/_ext/2147153351/sys_ports.o ../../../../system/ports/src/sys_ports.c
endif
@ -576,12 +624,12 @@ endif
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
dist/${CND_CONF}/${IMAGE_TYPE}/app.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk ../../../../../bin/framework/peripheral/PIC32MX450F256L_peripherals.a
@${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE}
${MP_CC} $(MP_EXTRA_LD_PRE) -mdebugger -D__MPLAB_DEBUGGER_PK3=1 -mprocessor=$(MP_PROCESSOR_OPTION) -o dist/${CND_CONF}/${IMAGE_TYPE}/app.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} ../../../../../bin/framework/peripheral/PIC32MX450F256L_peripherals.a -mreserve=boot@0x1FC02000:0x1FC02FEF -mreserve=boot@0x1FC02000:0x1FC0275F -Wl,--defsym=__MPLAB_BUILD=1$(MP_EXTRA_LD_POST)$(MP_LINKER_FILE_OPTION),--defsym=__MPLAB_DEBUG=1,--defsym=__DEBUG=1,--defsym=__MPLAB_DEBUGGER_PK3=1,-Map="${DISTDIR}/${PROJECTNAME}.${IMAGE_TYPE}.map",--memorysummary,dist/${CND_CONF}/${IMAGE_TYPE}/memoryfile.xml
${MP_CC} $(MP_EXTRA_LD_PRE) -mdebugger -D__MPLAB_DEBUGGER_PK3=1 -mprocessor=$(MP_PROCESSOR_OPTION) -o dist/${CND_CONF}/${IMAGE_TYPE}/app.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} ../../../../../bin/framework/peripheral/PIC32MX450F256L_peripherals.a -mreserve=boot@0x1FC02000:0x1FC02FEF -mreserve=boot@0x1FC02000:0x1FC0275F -Wl,--defsym=__MPLAB_BUILD=1$(MP_EXTRA_LD_POST)$(MP_LINKER_FILE_OPTION),--defsym=__MPLAB_DEBUG=1,--defsym=__DEBUG=1,--defsym=__MPLAB_DEBUGGER_PK3=1,--defsym=_min_heap_size=16,-Map="${DISTDIR}/${PROJECTNAME}.${IMAGE_TYPE}.map",--memorysummary,dist/${CND_CONF}/${IMAGE_TYPE}/memoryfile.xml
else
dist/${CND_CONF}/${IMAGE_TYPE}/app.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk ../../../../../bin/framework/peripheral/PIC32MX450F256L_peripherals.a
@${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE}
${MP_CC} $(MP_EXTRA_LD_PRE) -mprocessor=$(MP_PROCESSOR_OPTION) -o dist/${CND_CONF}/${IMAGE_TYPE}/app.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} ../../../../../bin/framework/peripheral/PIC32MX450F256L_peripherals.a -Wl,--defsym=__MPLAB_BUILD=1$(MP_EXTRA_LD_POST)$(MP_LINKER_FILE_OPTION),-Map="${DISTDIR}/${PROJECTNAME}.${IMAGE_TYPE}.map",--memorysummary,dist/${CND_CONF}/${IMAGE_TYPE}/memoryfile.xml
${MP_CC} $(MP_EXTRA_LD_PRE) -mprocessor=$(MP_PROCESSOR_OPTION) -o dist/${CND_CONF}/${IMAGE_TYPE}/app.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} ../../../../../bin/framework/peripheral/PIC32MX450F256L_peripherals.a -Wl,--defsym=__MPLAB_BUILD=1$(MP_EXTRA_LD_POST)$(MP_LINKER_FILE_OPTION),--defsym=_min_heap_size=16,-Map="${DISTDIR}/${PROJECTNAME}.${IMAGE_TYPE}.map",--memorysummary,dist/${CND_CONF}/${IMAGE_TYPE}/memoryfile.xml
${MP_CC_DIR}/xc32-bin2hex dist/${CND_CONF}/${IMAGE_TYPE}/app.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX}
endif

View File

@ -1,8 +1,8 @@
#
#Mon Mar 07 22:03:33 CET 2016
#Mon May 02 17:06:20 CEST 2016
default.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=53fb2ac0203ca7bc347fa1cfc029d2dd
default.languagetoolchain.dir=/Applications/microchip/xc32/v1.40/bin
configurations-xml=935f32d81efe418a2148905ef6c8a87c
configurations-xml=0df9182c13476f6c3a0ce9f91bd947c3
com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=4b47e815d50912689a67d0b162f47a58
default.languagetoolchain.version=1.40
host.platform=mac

View File

@ -6,9 +6,9 @@
projectFiles="true">
<logicalFolder name="f1" displayName="app" projectFiles="true">
<logicalFolder name="f1" displayName="system_config" projectFiles="true">
<logicalFolder name="f1" displayName="bt-audio-dk" projectFiles="true">
<itemPath>../src/system_config/bk-audio-dk/system_definitions.h</itemPath>
<itemPath>../src/system_config/bk-audio-dk/system_config.h</itemPath>
<logicalFolder name="f1" displayName="bt_audio_dk" projectFiles="true">
<itemPath>../src/system_config/bt_audio_dk/system_definitions.h</itemPath>
<itemPath>../src/system_config/bt_audio_dk/system_config.h</itemPath>
</logicalFolder>
</logicalFolder>
<itemPath>../../../src/btstack_debug.h</itemPath>
@ -35,6 +35,7 @@
<itemPath>../../../src/classic/sdp_server.h</itemPath>
<itemPath>../../../src/classic/sdp_client.h</itemPath>
<itemPath>../../../src/classic/sdp_client_rfcomm.h</itemPath>
<itemPath>../../../src/classic/spp_server.h</itemPath>
</logicalFolder>
<logicalFolder name="embedded" displayName="embedded" projectFiles="true">
<itemPath>../../../platform/embedded/hal_cpu.h</itemPath>
@ -57,6 +58,7 @@
<itemPath>../../../src/hci_transport.h</itemPath>
<itemPath>../../../src/l2cap.h</itemPath>
<itemPath>../../../src/l2cap_signaling.h</itemPath>
<itemPath>../../../src/btstack_uart_block.h</itemPath>
</logicalFolder>
</logicalFolder>
<logicalFolder name="f2" displayName="framework" projectFiles="true">
@ -93,9 +95,9 @@
projectFiles="true">
<logicalFolder name="f1" displayName="app" projectFiles="true">
<logicalFolder name="f1" displayName="system_config" projectFiles="true">
<logicalFolder name="f1" displayName="bt-audio-dk" projectFiles="true">
<itemPath>../src/system_config/bk-audio-dk/system_init.c</itemPath>
<itemPath>../src/system_config/bk-audio-dk/system_tasks.c</itemPath>
<logicalFolder name="f1" displayName="bt_audio_dk" projectFiles="true">
<itemPath>../src/system_config/bt_audio_dk/system_init.c</itemPath>
<itemPath>../src/system_config/bt_audio_dk/system_tasks.c</itemPath>
</logicalFolder>
</logicalFolder>
<itemPath>../src/btstack_port.c</itemPath>
@ -116,6 +118,10 @@
<logicalFolder name="chipset-csr" displayName="chipset-csr" projectFiles="true">
<itemPath>../../../chipset/csr/btstack_chipset_csr.c</itemPath>
</logicalFolder>
<logicalFolder name="f1" displayName="platform-embedded" projectFiles="true">
<itemPath>../../../platform/embedded/btstack_run_loop_embedded.c</itemPath>
<itemPath>../../../platform/embedded/btstack_uart_block_embedded.c</itemPath>
</logicalFolder>
<logicalFolder name="src" displayName="src" projectFiles="true">
<itemPath>../../../src/btstack_memory.c</itemPath>
<itemPath>../../../src/hci.c</itemPath>
@ -133,8 +139,10 @@
<itemPath>../../../src/classic/sdp_client_rfcomm.c</itemPath>
<itemPath>../../../src/classic/sdp_util.c</itemPath>
<itemPath>../../../src/btstack_util.c</itemPath>
<itemPath>../../../platform/embedded/btstack_run_loop_embedded.c</itemPath>
<itemPath>../../../platform/embedded/hci_transport_h4_embedded.c</itemPath>
<itemPath>../../../src/classic/spp_server.c</itemPath>
<itemPath>../../../src/hci_transport_h4.c</itemPath>
<itemPath>../../../src/hci_transport_h5.c</itemPath>
<itemPath>../../../src/btstack_slip.c</itemPath>
</logicalFolder>
</logicalFolder>
<logicalFolder name="f2" displayName="framework" projectFiles="true">
@ -201,7 +209,7 @@
<targetPluginBoard></targetPluginBoard>
<platformTool>PICkit3PlatformTool</platformTool>
<languageToolchain>XC32</languageToolchain>
<languageToolchainVersion></languageToolchainVersion>
<languageToolchainVersion>1.40</languageToolchainVersion>
<platform>4</platform>
</toolsSet>
<compileType>
@ -235,7 +243,7 @@
<property key="enable-unroll-loops" value="false"/>
<property key="exclude-floating-point" value="false"/>
<property key="extra-include-directories"
value=".;../../../..;../src;../src/system_config/bk-audio-dk;../../../include;../../../src;../../../ble;../../../chipset/csr;../../../platform/embedded"/>
value=".;../../../..;../src;../src/system_config/bt_audio_dk;../../../src;../../../chipset/csr;../../../platform/embedded"/>
<property key="generate-16-bit-code" value="false"/>
<property key="generate-micro-compressed-code" value="false"/>
<property key="isolate-each-function" value="false"/>
@ -288,7 +296,7 @@
<property key="generate-16-bit-code" value="false"/>
<property key="generate-cross-reference-file" value="false"/>
<property key="generate-micro-compressed-code" value="false"/>
<property key="heap-size" value=""/>
<property key="heap-size" value="16"/>
<property key="input-libraries" value=""/>
<property key="linker-symbols" value=""/>
<property key="map-file" value="${DISTDIR}/${PROJECTNAME}.${IMAGE_TYPE}.map"/>

View File

@ -5,7 +5,7 @@
<confs>
<conf name="default" type="2">
<platformToolSN></platformToolSN>
<languageToolchainDir></languageToolchainDir>
<languageToolchainDir>/Applications/microchip/xc32/v1.40/bin</languageToolchainDir>
<mdbdebugger version="1">
<placeholder1>place holder 1</placeholder1>
<placeholder2>place holder 2</placeholder2>

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/>
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group/>
</open-files>

View File

@ -0,0 +1,113 @@
#!/usr/bin/env python
#
# Create project files for all BTstack embedded examples in harmony/apps/btstack
import os
import shutil
import sys
import time
import subprocess
import re
gatt_update_template = '''#!/bin/sh
DIR=`dirname $0`
BTSTACK_ROOT=$DIR/../../../framework/btstack
echo "Creating EXAMPLE.h from EXAMPLE.gatt"
$BTSTACK_ROOT/tool/compile_gatt.py $BTSTACK_ROOT/example/EXAMPLE.gatt $DIR/EXAMPLE.h
'''
# get script path
script_path = os.path.abspath(os.path.dirname(sys.argv[0]))
# validate Harmony root by reading version.txt
harmony_root = script_path + "/../../../../"
print harmony_root
harmony_version = ""
try:
with open(harmony_root + 'config/harmony.hconfig', 'r') as fin:
for line in fin:
m = re.search('default \"(.*)\"', line)
if m and len(m.groups()) == 1:
harmony_version = m.groups(1)
break
except:
pass
if len(harmony_version) == 0:
print("Cannot find Harmony root. Make sure BTstack is checked out as harmony/vx_xx/frameworks/btstack")
sys.exit(1)
# show Harmony version
print("Found Harmony version %s" % harmony_version)
# path to examples
examples_embedded = script_path + "/../../example/"
# path to WICED/apps/btstack
apps_btstack = harmony_root + "/apps/btstack/"
print("Creating examples in apps/btstack")
# iterate over btstack examples
for file in os.listdir(examples_embedded):
if not file.endswith(".c"):
continue
example = file[:-2]
# recreate folder
apps_folder = apps_btstack + example + "/"
shutil.rmtree(apps_folder)
os.makedirs(apps_folder)
# create update_gatt.sh if .gatt file is present
gatt_path = examples_embedded + example + ".gatt"
if os.path.exists(gatt_path):
update_gatt_script = apps_folder + "update_gatt_db.sh"
with open(update_gatt_script, "wt") as fout:
fout.write(gatt_update_template.replace("EXAMPLE", example))
os.chmod(update_gatt_script, 0o755)
subprocess.call(update_gatt_script + "> /dev/null", shell=True)
print("- %s including compiled GATT DB" % example)
else:
print("- %s" % example)
# create $example.X
appX_folder = apps_folder + example + ".X/"
os.makedirs(appX_folder)
# create makefife
shutil.copyfile(script_path + "/app.X/Makefile", appX_folder + "Makefile")
nbproject_folder = appX_folder = appX_folder + "nbproject/"
os.makedirs(nbproject_folder)
template_path = script_path + "/app.X/nbproject/"
for file in os.listdir(template_path):
src = template_path + file
dst = nbproject_folder + file
# copy private folder
if file == "private":
shutil.copytree(src, dst)
continue
# replace app.X and spp_and_le_counter.c
with open(src, 'r') as fin:
template = fin.read()
with open(dst, 'wt') as fout:
# template = template.replace('app', example)
template = template.replace("<itemPath>../../../example/spp_and_le_counter.c", "<itemPath>../../../../framework/btstack/example/" + example + ".c")
template = template.replace(">../../../../driver", ">../../../../framework/driver");
template = template.replace(">../../../../system", ">../../../../framework/system");
template = template.replace(">../../../chipset", ">../../../../framework/btstack/chipset");
template = template.replace(">../../../platform", ">../../../../framework/btstack/platform");
template = template.replace(">../../../src", ">../../../../framework/btstack/src");
template = template.replace(">../src", ">../../../../framework/btstack/port/pic32-harmony/src");
template = template.replace("app.X", example+".X")
template = template.replace(";../../../..", ";../../../../framework");
template = template.replace(";../../../chipset", ";../../../../framework/btstack/chipset")
template = template.replace(";../../../platform", ";../../../../framework/btstack/platform")
template = template.replace(";../../../src", ";../../../../framework/btstack/src")
template = template.replace(";../src", ";../../../../framework/btstack/port/pic32-harmony/src")
template = template.replace(">../../../../../bin/framework/peripheral", ">../../../../bin/framework/peripheral")
template = template.replace('value=".;', 'value="..;')
fout.write(template)

View File

@ -123,10 +123,10 @@ static uint8_t * tx_buffer_ptr = 0;
// reset Bluetooth using n_shutdown
static void bluetooth_power_cycle(void){
printf("Bluetooth power cycle Reset ON\n");
printf("Bluetooth power cycle: Reset ON\n");
SYS_PORTS_PinClear(PORTS_ID_0, BT_RESET_PORT, BT_RESET_BIT);
msleep(250);
printf("Bluetooth power cycle Reset OFF\n");
printf("Bluetooth power cycle: Reset OFF\n");
SYS_PORTS_PinSet(PORTS_ID_0, BT_RESET_PORT, BT_RESET_BIT);
}
@ -148,36 +148,30 @@ void hal_uart_dma_init(void){
PLIB_USART_HandshakeModeSelect(BT_USART_ID, USART_HANDSHAKE_MODE_FLOW_CONTROL);
PLIB_USART_OperationModeSelect(BT_USART_ID, USART_ENABLE_TX_RX_CTS_RTS_USED);
PLIB_USART_LineControlModeSelect(BT_USART_ID, USART_8N1);
PLIB_USART_TransmitterEnable(BT_USART_ID);
// PLIB_USART_TransmitterInterruptModeSelect(bluetooth_uart_id, USART_TRANSMIT_FIFO_IDLE);
PLIB_USART_ReceiverEnable(BT_USART_ID);
// PLIB_USART_ReceiverInterruptModeSelect(bluetooth_uart_id, USART_RECEIVE_FIFO_ONE_CHAR);
// BCSP on CSR requires even parity
// PLIB_USART_LineControlModeSelect(BT_USART_ID, USART_8E1);
PLIB_USART_TransmitterEnable(BT_USART_ID);
// PLIB_USART_TransmitterInterruptModeSelect(bluetooth_uart_id, USART_TRANSMIT_FIFO_IDLE);
// allow overrun mode: not needed for H4. CSR with BCSP/H5 does not enable RTS/CTS
PLIB_USART_RunInOverflowEnable(BT_USART_ID);
PLIB_USART_ReceiverEnable(BT_USART_ID);
// PLIB_USART_ReceiverInterruptModeSelect(bluetooth_uart_id, USART_RECEIVE_FIFO_ONE_CHAR);
PLIB_USART_Enable(BT_USART_ID);
// enable _RESET
SYS_PORTS_PinDirectionSelect(PORTS_ID_0, SYS_PORTS_DIRECTION_OUTPUT, BT_RESET_PORT, BT_RESET_BIT);
SYS_PORTS_PinDirectionSelect(PORTS_ID_0, SYS_PORTS_DIRECTION_OUTPUT, BT_RESET_PORT, BT_RESET_BIT);
bluetooth_power_cycle();
// After reset, CTS is high and we need to wait until CTS is low again
// HACK: CTS doesn't seem to work right now
msleep(250);
// HACK: CSR seems to do an auto-baud on the uart, which makes the first HCI RESET fail
// 2 options: a) check for CTS going high within 10 ms, b) just send HCI RESET twice
// const uint8_t hci_reset_cmd[] = {0x01, 0x03, 0x0c, 0x00};
// int pos = 0;
// while(pos < sizeof(hci_reset_cmd)){
// if (PLIB_USART_TransmitterIsEmpty(BT_USART_ID)){
// PLIB_USART_TransmitterByteSend(BT_USART_ID, hci_reset_cmd[pos]);
// pos++;
// }
// }
// msleep(250);
}
void hal_uart_dma_set_block_received( void (*the_block_handler)(void)){
@ -193,9 +187,9 @@ void hal_uart_dma_set_csr_irq_handler( void (*the_irq_handler)(void)){
}
int hal_uart_dma_set_baud(uint32_t baud){
PLIB_USART_Disable(BT_USART_ID);
PLIB_USART_BaudRateSet(BT_USART_ID, SYS_CLK_PeripheralFrequencyGet(CLK_BUS_PERIPHERAL_1), baud);
PLIB_USART_Enable(BT_USART_ID);
// PLIB_USART_Disable(BT_USART_ID);
// PLIB_USART_BaudRateSet(BT_USART_ID, SYS_CLK_PeripheralFrequencyGet(CLK_BUS_PERIPHERAL_1), baud);
// PLIB_USART_Enable(BT_USART_ID);
return 0;
}
@ -237,7 +231,7 @@ void BTSTACK_Initialize ( void )
hci_dump_open(NULL, HCI_DUMP_STDOUT);
const hci_transport_t * transport = hci_transport_h4_instance();
const hci_transport_t * transport = hci_transport_h5_instance(btstack_uart_block_embedded_instance());
hci_init(transport, &config);
hci_set_chipset(btstack_chipset_csr_instance());
@ -250,15 +244,22 @@ void BTSTACK_Initialize ( void )
void BTSTACK_Tasks(void){
if (bytes_to_read && PLIB_USART_ReceiverDataIsAvailable(BT_USART_ID)) {
while (bytes_to_read && PLIB_USART_ReceiverDataIsAvailable(BT_USART_ID)) {
*rx_buffer_ptr++ = PLIB_USART_ReceiverByteReceive(BT_USART_ID);
bytes_to_read--;
if (bytes_to_read == 0){
(*rx_done_handler)();
}
}
if (bytes_to_write && PLIB_USART_TransmitterIsEmpty(BT_USART_ID)){
if(PLIB_USART_ReceiverOverrunHasOccurred(BT_USART_ID))
{
// printf("RX Overrun!\n");
PLIB_USART_ReceiverOverrunErrorClear(BT_USART_ID);
}
while (bytes_to_write && !PLIB_USART_TransmitterBufferIsFull(BT_USART_ID)){
PLIB_USART_TransmitterByteSend(BT_USART_ID, *tx_buffer_ptr++);
bytes_to_write--;
if (bytes_to_write == 0){

View File

@ -1,13 +1,6 @@
# Makefile for libusb based examples
BTSTACK_ROOT = ../..
CORE += main.c stdin_support.c
COMMON += \
hci_transport_h4_posix.c \
btstack_run_loop_posix.c \
btstack_link_key_db_fs.c \
CORE += \
bluetooth_init_cc2564B_1.2_BT_Spec_4.1.c \
btstack_chipset_cc256x.c \
@ -15,6 +8,12 @@ CORE += \
btstack_chipset_em9301.c \
btstack_chipset_stlc2500d.c \
btstack_chipset_tc3566x.c \
btstack_link_key_db_fs.c \
btstack_run_loop_posix.c \
btstack_uart_block_posix.c \
hci_transport_h4.c \
main.c \
stdin_support.c \
# btstack_chipset_bcm.c \
# TI-WL183x requires TIInit_11.8.32.c

View File

@ -19,6 +19,7 @@
#define ENABLE_LOG_INTO_HCI_DUMP
#define ENABLE_SCO_OVER_HCI
#define ENABLE_SDP_DES_DUMP
#define ENABLE_EHCILL
// BTstack configuration. buffers, sizes, ...
#define HCI_INCOMING_PRE_BUFFER_SIZE 14 // sizeof benep heade, avoid memcpy

View File

@ -139,6 +139,9 @@ static void local_version_information_callback(uint8_t * packet){
printf("Texas Instruments - CC256x compatible chipset.\n");
use_fast_uart();
hci_set_chipset(btstack_chipset_cc256x_instance());
#ifdef ENABLE_EHCILL
printf("eHCILL enabled.\n");
#endif
break;
case COMPANY_ID_BROADCOM_CORPORATION:
printf("Broadcom chipset. Not supported yet\n");
@ -172,7 +175,8 @@ int main(int argc, const char * argv[]){
config.device_name = "/dev/tty.usbserial-A900K0VK";
// init HCI
const hci_transport_t * transport = hci_transport_h4_instance();
const btstack_uart_block_t * uart_driver = btstack_uart_block_posix_instance();
const hci_transport_t * transport = hci_transport_h4_instance(uart_driver);
const btstack_link_key_db_t * link_key_db = btstack_link_key_db_fs_instance();
hci_init(transport, (void*) &config);
hci_set_link_key_db(link_key_db);

35
port/posix-h5/.gitignore vendored Normal file
View File

@ -0,0 +1,35 @@
ancs_client_demo
ancs_client_demo.h
ble_central_test
ble_peripheral
ble_peripheral_sm_minimal
ble_peripheral_test
bnep_test
classic_test
gap_dedicated_bonding
gap_inquiry
gap_inquiry_and_bond
gap_le_advertisements
gatt_battery_query
gatt_browser
hfp_ag_demo
hfp_hf_demo
hsp_ag_demo
hsp_ag_test
hsp_hs_demo
hsp_hs_test
l2cap_test
le_counter
le_counter.h
le_streamer
le_streamer.h
led_counter
profile.h
sdp_bnep_query
sdp_general_query
sdp_rfcomm_query
spp_and_le_counter
spp_and_le_counter.h
spp_counter
spp_streamer
bluetooth_init_cc2560B_1.2_BT_Spec_4.0.c

57
port/posix-h5/Makefile Normal file
View File

@ -0,0 +1,57 @@
# Makefile for libusb based examples
BTSTACK_ROOT = ../..
CORE += \
bluetooth_init_cc2564B_1.2_BT_Spec_4.1.c \
btstack_chipset_cc256x.c \
btstack_chipset_csr.c \
btstack_chipset_em9301.c \
btstack_chipset_stlc2500d.c \
btstack_chipset_tc3566x.c \
btstack_link_key_db_fs.c \
btstack_run_loop_posix.c \
btstack_uart_block_posix.c \
btstack_slip.c \
hci_transport_h5.c \
main.c \
stdin_support.c \
# btstack_chipset_bcm.c \
# TI-WL183x requires TIInit_11.8.32.c
# examples
include ${BTSTACK_ROOT}/example/Makefile.inc
# fetch and convert TI init scripts
include ${BTSTACK_ROOT}/chipset/cc256x/Makefile.inc
CFLAGS += -g -Wall -Werror \
-I$(BTSTACK_ROOT)/platform/embedded \
-I$(BTSTACK_ROOT)/platform/posix \
-I$(BTSTACK_ROOT)/chipset/bcm \
-I$(BTSTACK_ROOT)/chipset/cc256x \
-I$(BTSTACK_ROOT)/chipset/csr \
-I$(BTSTACK_ROOT)/chipset/em9301 \
-I$(BTSTACK_ROOT)/chipset/stlc2500d \
-I$(BTSTACK_ROOT)/chipset/tc3566x \
VPATH += ${BTSTACK_ROOT}/platform/posix
VPATH += ${BTSTACK_ROOT}/platform/embedded
VPATH += ${BTSTACK_ROOT}/chipset/bcm
VPATH += ${BTSTACK_ROOT}/chipset/cc256x
VPATH += ${BTSTACK_ROOT}/chipset/csr
VPATH += ${BTSTACK_ROOT}/chipset/em9301
VPATH += ${BTSTACK_ROOT}/chipset/stlc2500d
VPATH += ${BTSTACK_ROOT}/chipset/tc3566x
ifeq ($(OS),Windows_NT)
LDFLAGS += -lws2_32
endif
# Command Line examples require porting to win32, so only build on other unix-ish hosts
ifneq ($(OS),Windows_NT)
EXAMPLES += ${EXAMPLES_CLI}
endif
all: ${EXAMPLES}

View File

@ -0,0 +1,28 @@
//
// btstack_config.h for generic POSIX H4 port
//
#ifndef __BTSTACK_CONFIG
#define __BTSTACK_CONFIG
// Port related features
#define HAVE_MALLOC
#define HAVE_POSIX_FILE_IO
#define HAVE_POSIX_STDIN
#define HAVE_POSIX_TIME
// BTstack features that can be enabled
#define ENABLE_BLE
#define ENABLE_CLASSIC
#define ENABLE_LOG_ERROR
#define ENABLE_LOG_INFO
#define ENABLE_LOG_INTO_HCI_DUMP
#define ENABLE_SCO_OVER_HCI
#define ENABLE_SDP_DES_DUMP
// BTstack configuration. buffers, sizes, ...
#define HCI_INCOMING_PRE_BUFFER_SIZE 14 // sizeof benep heade, avoid memcpy
#define HCI_ACL_PAYLOAD_SIZE (1691 + 4)
#endif

194
port/posix-h5/main.c Normal file
View File

@ -0,0 +1,194 @@
/*
* Copyright (C) 2014 BlueKitchen GmbH
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holders nor the names of
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* 4. Any redistribution, use, or modification is done solely for
* personal benefit and not for any commercial purpose or for
* monetary gain.
*
* THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS
* RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* Please inquire about commercial licensing options at
* contact@bluekitchen-gmbh.com
*
*/
// *****************************************************************************
//
// minimal setup for HCI code
//
// *****************************************************************************
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include "btstack_config.h"
#include "btstack_debug.h"
#include "btstack_event.h"
#include "btstack_link_key_db_fs.h"
#include "btstack_memory.h"
#include "btstack_run_loop.h"
#include "btstack_run_loop_posix.h"
#include "hci.h"
#include "hci_dump.h"
#include "stdin_support.h"
#include "btstack_chipset_bcm.h"
#include "btstack_chipset_csr.h"
#include "btstack_chipset_cc256x.h"
#include "btstack_chipset_em9301.h"
#include "btstack_chipset_stlc2500d.h"
#include "btstack_chipset_tc3566x.h"
int btstack_main(int argc, const char * argv[]);
static hci_transport_config_uart_t config = {
HCI_TRANSPORT_CONFIG_UART,
115200,
0, // main baudrate
1, // flow control
NULL,
};
static btstack_packet_callback_registration_t hci_event_callback_registration;
static void sigint_handler(int param){
#ifndef _WIN32
// reset anyway
btstack_stdin_reset();
#endif
log_info(" <= SIGINT received, shutting down..\n");
hci_power_control(HCI_POWER_OFF);
hci_close();
log_info("Good bye, see you.\n");
exit(0);
}
static int led_state = 0;
void hal_led_toggle(void){
led_state = 1 - led_state;
printf("LED State %u\n", led_state);
}
static void use_fast_uart(void){
// printf("Using 921600 baud.\n");
// config.baudrate_main = 921600;
}
static void local_version_information_callback(uint8_t * packet){
printf("Local version information:\n");
uint16_t hci_version = little_endian_read_16(packet, 4);
uint16_t hci_revision = little_endian_read_16(packet, 6);
uint16_t lmp_version = little_endian_read_16(packet, 8);
uint16_t manufacturer = little_endian_read_16(packet, 10);
uint16_t lmp_subversion = little_endian_read_16(packet, 12);
printf("- HCI Version 0x%04x\n", hci_version);
printf("- HCI Revision 0x%04x\n", hci_revision);
printf("- LMP Version 0x%04x\n", lmp_version);
printf("- LMP Revision 0x%04x\n", lmp_subversion);
printf("- Manufacturer 0x%04x\n", manufacturer);
switch (manufacturer){
case COMPANY_ID_CAMBRIDGE_SILICON_RADIO:
printf("Cambridge Silicon Radio CSR chipset.\n");
use_fast_uart();
hci_set_chipset(btstack_chipset_csr_instance());
break;
case COMPANY_ID_TEXAS_INSTRUMENTS_INC:
printf("Texas Instruments - CC256x compatible chipset.\n");
use_fast_uart();
hci_set_chipset(btstack_chipset_cc256x_instance());
break;
case COMPANY_ID_BROADCOM_CORPORATION:
printf("Broadcom chipset. Not supported yet\n");
// hci_set_chipset(btstack_chipset_bcm_instance());
break;
case COMPANY_ID_ST_MICROELECTRONICS:
printf("ST Microelectronics - using STLC2500d driver.\n");
use_fast_uart();
hci_set_chipset(btstack_chipset_stlc2500d_instance());
break;
case COMPANY_ID_EM_MICROELECTRONICS_MARIN:
printf("EM Microelectronics - using EM9301 driver.\n");
hci_set_chipset(btstack_chipset_em9301_instance());
break;
default:
printf("Unknown manufacturer / manufacturer not supported yet.\n");
break;
}
}
static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size){
if (packet_type != HCI_EVENT_PACKET) return;
if (hci_event_packet_get_type(packet) != BTSTACK_EVENT_STATE) return;
if (btstack_event_state_get_state(packet) != HCI_STATE_WORKING) return;
printf("BTstack up and running.\n");
}
int main(int argc, const char * argv[]){
/// GET STARTED with BTstack ///
btstack_memory_init();
btstack_run_loop_init(btstack_run_loop_posix_get_instance());
// use logger: format HCI_DUMP_PACKETLOGGER, HCI_DUMP_BLUEZ or HCI_DUMP_STDOUT
hci_dump_open("/tmp/hci_dump.pklg", HCI_DUMP_PACKETLOGGER);
// pick serial port
config.device_name = "/dev/tty.usbserial-A900K0VK";
// init HCI
const btstack_uart_block_t * uart_driver = btstack_uart_block_posix_instance();
const hci_transport_t * transport = hci_transport_h5_instance(uart_driver);
const btstack_link_key_db_t * link_key_db = btstack_link_key_db_fs_instance();
hci_init(transport, (void*) &config);
hci_set_link_key_db(link_key_db);
// enable auto-sleep mode
// hci_transport_h5_set_auto_sleep(300);
// setup dynamic chipset driver setup
hci_set_local_version_information_callback(&local_version_information_callback);
// register for HCI events
hci_event_callback_registration.callback = &packet_handler;
hci_add_event_handler(&hci_event_callback_registration);
// handle CTRL-c
signal(SIGINT, sigint_handler);
// setup app
btstack_main(argc, argv);
// go
btstack_run_loop_execute();
return 0;
}

View File

@ -33,6 +33,7 @@ COMMON = \
hci.c \
hci_cmd.c \
hci_dump.c \
btstack_uart_block_embedded.c \
hci_transport_h4_ehcill_embedded.c \
l2cap.c \
l2cap_signaling.c \
@ -69,6 +70,8 @@ include ${BTSTACK_ROOT}/chipset/cc256x/Makefile.inc
clean:
rm -f *.map *.o *.d *.out *.elf *.bin *.hex
distclean: clean
make -C libopencm3 clean
# git clone and compile libopencm3

View File

@ -8,13 +8,13 @@
// Port related features
#define HAVE_INIT_SCRIPT
#define HAVE_EMBEDDED_TICK
#define HAVE_EHCILL
// BTstack features that can be enabled
#define ENABLE_BLE
#define ENABLE_CLASSIC
// #define ENABLE_LOG_INFO
// #define ENABLE_LOG_ERROR
// #define ENABLE_EHCILL
// BTstack configuration. buffers, sizes, ...
#define HCI_ACL_PAYLOAD_SIZE 52

View File

@ -434,7 +434,7 @@ int main(void)
btstack_run_loop_init(btstack_run_loop_embedded_get_instance());
// init HCI
hci_init(hci_transport_h4_instance(), (void*) &config);
hci_init(hci_transport_h4_instance(btstack_uart_block_embedded_instance()), (void*) &config);
hci_set_link_key_db(btstack_link_key_db_memory_instance());
hci_set_chipset(btstack_chipset_cc256x_instance());
@ -442,9 +442,6 @@ int main(void)
hci_event_callback_registration.callback = &packet_handler;
hci_add_event_handler(&hci_event_callback_registration);
// enable eHCILL
btstack_chipset_cc256x_enable_ehcill(1);
// hand over to btstack embedded code
btstack_main();

View File

@ -6,7 +6,6 @@
#define __BTSTACK_CONFIG
// Port related features
#define HAVE_EHCILL
#define HAVE_EMBEDDED_TIME_MS
#define WICED_BT_UART_MANUAL_CTS_RTS

View File

@ -231,11 +231,11 @@ static int h4_set_baudrate(uint32_t baudrate){
static void h4_init(const void * transport_config){
// check for hci_transport_config_uart_t
if (!transport_config) {
log_error("hci_transport_h4_posix: no config!");
log_error("hci_transport_h4_wiced: no config!");
return;
}
if (((hci_transport_config_t*)transport_config)->type != HCI_TRANSPORT_CONFIG_UART) {
log_error("hci_transport_h4_posix: config not of type != HCI_TRANSPORT_CONFIG_UART!");
log_error("hci_transport_h4_wiced: config not of type != HCI_TRANSPORT_CONFIG_UART!");
return;
}
hci_transport_config_uart = (hci_transport_config_uart_t*) transport_config;
@ -330,7 +330,7 @@ static void dummy_handler(uint8_t packet_type, uint8_t *packet, uint16_t size){
}
// get h4 singleton
const hci_transport_t * hci_transport_h4_instance(void) {
const hci_transport_t * hci_transport_h4_instance(const btstack_uart_block_t * uart_driver) {
if (hci_transport_h4 == NULL) {
hci_transport_h4 = (hci_transport_h4_t*)malloc( sizeof(hci_transport_h4_t));
memset(hci_transport_h4, 0, sizeof(hci_transport_h4_t));

View File

@ -82,7 +82,7 @@ void application_start(void){
// hci_dump_open(NULL, HCI_DUMP_STDOUT);
// init HCI
hci_init(hci_transport_h4_instance(), (void*) &hci_transport_config_uart);
hci_init(hci_transport_h4_instance(btstack_uart_block_embedded_instance()), (void*) &hci_transport_config_uart);
hci_set_link_key_db(btstack_link_key_db_memory_instance());
hci_set_chipset(btstack_chipset_bcm_instance());

View File

@ -37,8 +37,9 @@ $(NAME)_SOURCES += \
# WICED port incl. support for Broadcom chipset
$(NAME)_SOURCES += \
main.c \
btstack_run_loop_wiced.c \
hci_transport_h4_wiced.c \
main.c \
btstack_run_loop_wiced.c \
btstack_uart_block_embedded.c \
hci_transport_h4_wiced.c \
../../chipset/bcm/btstack_chipset_bcm.c \
../../../drivers/bluetooth/firmware/$(BT_CHIP)$(BT_CHIP_REVISION)/bt_firmware_image.c \

141
src/btstack_uart_block.h Normal file
View File

@ -0,0 +1,141 @@
/*
* Copyright (C) 2016 BlueKitchen GmbH
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holders nor the names of
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* 4. Any redistribution, use, or modification is done solely for
* personal benefit and not for any commercial purpose or for
* monetary gain.
*
* THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS
* RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* Please inquire about commercial licensing options at
* contact@bluekitchen-gmbh.com
*
*/
/*
* btstack_uart_block.h
*
* Common code to access serial port via asynchronous block read/write commands
*
*/
#ifndef __BTSTACK_UART_BLOCK_H
#define __BTSTACK_UART_BLOCK_H
#include <stdint.h>
typedef struct {
uint32_t baudrate;
int flowcontrol;
const char *device_name;
} btstack_uart_config_t;
typedef enum {
// UART active, sleep off
BTSTACK_UART_SLEEP_OFF = 0,
// used for eHCILL
BTSTACK_UART_SLEEP_RTS_HIGH_WAKE_ON_CTS_PULSE,
// used for H5 and for eHCILL without support for wake on CTS pulse
BTSTACK_UART_SLEEP_RTS_LOW_WAKE_ON_RX_EDGE,
} btstack_uart_sleep_mode_t;
typedef enum {
BTSTACK_UART_SLEEP_MASK_RTS_HIGH_WAKE_ON_CTS_PULSE = 1 << BTSTACK_UART_SLEEP_RTS_HIGH_WAKE_ON_CTS_PULSE,
BTSTACK_UART_SLEEP_MASK_RTS_LOW_WAKE_ON_RX_EDGE = 1 << BTSTACK_UART_SLEEP_RTS_LOW_WAKE_ON_RX_EDGE
} btstack_uart_sleep_mode_mask_t;
typedef struct {
/**
* init transport
* @param uart_config
*/
int (*init)(const btstack_uart_config_t * uart_config);
/**
* open transport connection
*/
int (*open)(void);
/**
* close transport connection
*/
int (*close)(void);
/**
* set callback for block received
*/
void (*set_block_received)(void (*block_handler)(void));
/**
* set callback for sent
*/
void (*set_block_sent)(void (*block_handler)(void));
/**
* set baudrate
*/
int (*set_baudrate)(uint32_t baudrate);
/**
* set parity
*/
int (*set_parity)(int parity);
/**
* receive block
*/
void (*receive_block)(uint8_t *buffer, uint16_t len);
/**
* send block
*/
void (*send_block)(const uint8_t *buffer, uint16_t length);
// support for sleep modes in TI's H4 eHCILL and H5
/**
* query supported wakeup mechanisms
* @return supported_sleep_modes mask
*/
int (*get_supported_sleep_modes)(void);
/**
* set UART sleep mode - allows to turn off UART and it's clocks to save energy
* Supported sleep modes:
* - off: UART active, RTS low if receive_block was called and block not read yet
* - RTS high, wake on CTS: RTS should be high. On CTS pulse, UART gets enabled again and RTS goes to low
* - RTS low, wake on RX: data on RX will trigger UART enable, bytes might get lost
*/
void (*set_sleep)(btstack_uart_sleep_mode_t sleep_mode);
} btstack_uart_block_t;
// common implementations
const btstack_uart_block_t * btstack_uart_block_posix_instance(void);
const btstack_uart_block_t * btstack_uart_block_embedded_instance(void);
#endif

View File

@ -867,6 +867,12 @@ static void hci_initialization_timeout_handler(btstack_timer_source_t * ds){
hci_stack->num_cmd_packets = 1;
hci_run();
break;
case HCI_INIT_W4_CUSTOM_INIT_CSR_WARM_BOOT_LINK_RESET:
log_info("Resend HCI Reset - CSR Warm Boot with Link Reset");
if (hci_stack->hci_transport->reset_link){
hci_stack->hci_transport->reset_link();
}
// NOTE: explicit fallthrough to HCI_INIT_W4_CUSTOM_INIT_CSR_WARM_BOOT
case HCI_INIT_W4_CUSTOM_INIT_CSR_WARM_BOOT:
log_info("Resend HCI Reset - CSR Warm Boot");
hci_stack->substate = HCI_INIT_SEND_RESET_CSR_WARM_BOOT;
@ -895,7 +901,7 @@ static void hci_initializing_next_state(void){
// assumption: hci_can_send_command_packet_now() == true
static void hci_initializing_run(void){
log_info("hci_initializing_run: substate %u", hci_stack->substate);
log_info("hci_initializing_run: substate %u, can send %u", hci_stack->substate, hci_can_send_command_packet_now());
switch (hci_stack->substate){
case HCI_INIT_SEND_RESET:
hci_state_reset();
@ -978,7 +984,7 @@ static void hci_initializing_run(void){
&& hci_transport_uart_get_main_baud_rate()){
hci_stack->substate = HCI_INIT_W4_SEND_BAUD_CHANGE;
} else {
hci_stack->substate = HCI_INIT_W4_CUSTOM_INIT_CSR_WARM_BOOT;
hci_stack->substate = HCI_INIT_W4_CUSTOM_INIT_CSR_WARM_BOOT_LINK_RESET;
}
break;
}
@ -1004,7 +1010,12 @@ static void hci_initializing_run(void){
// otherwise continue
hci_stack->substate = HCI_INIT_W4_READ_LOCAL_SUPPORTED_COMMANDS;
hci_send_cmd(&hci_read_local_supported_commands);
break;
break;
case HCI_INIT_READ_LOCAL_SUPPORTED_COMMANDS:
log_info("Resend hci_read_local_supported_commands after CSR Warm Boot double reset");
hci_stack->substate = HCI_INIT_W4_READ_LOCAL_SUPPORTED_COMMANDS;
hci_send_cmd(&hci_read_local_supported_commands);
break;
case HCI_INIT_SET_BD_ADDR:
log_info("Set Public BD ADDR to %s", bd_addr_to_str(hci_stack->custom_bd_addr));
hci_stack->chipset->set_bd_addr_command(hci_stack->custom_bd_addr, hci_stack->hci_packet_buffer);
@ -1109,7 +1120,7 @@ static void hci_initializing_event_handler(uint8_t * packet, uint16_t size){
command_completed = 1;
log_info("Command complete for expected opcode %04x at substate %u", opcode, hci_stack->substate);
} else {
log_info("Command complete for opcode %04x, expected %04x", opcode, hci_stack->last_cmd_opcode);
log_info("Command complete for different opcode %04x, expected %04x, at substate %u", opcode, hci_stack->last_cmd_opcode, hci_stack->substate);
}
}
@ -1163,6 +1174,33 @@ static void hci_initializing_event_handler(uint8_t * packet, uint16_t size){
}
}
// CSR & H5
// Fix: Command Complete for HCI Reset in HCI_INIT_W4_SEND_READ_LOCAL_VERSION_INFORMATION trigger resend
if (!command_completed
&& hci_event_packet_get_type(packet) == HCI_EVENT_COMMAND_COMPLETE
&& hci_stack->substate == HCI_INIT_W4_READ_LOCAL_SUPPORTED_COMMANDS){
uint16_t opcode = little_endian_read_16(packet,3);
if (opcode == hci_reset.opcode){
hci_stack->substate = HCI_INIT_READ_LOCAL_SUPPORTED_COMMANDS;
return;
}
}
// on CSR with BCSP/H5, the reset resend timeout leads to substate == HCI_INIT_SEND_RESET or HCI_INIT_SEND_RESET_CSR_WARM_BOOT
// fix: Correct substate and behave as command below
if (command_completed){
switch (hci_stack->substate){
case HCI_INIT_SEND_RESET:
hci_stack->substate = HCI_INIT_W4_SEND_RESET;
break;
case HCI_INIT_SEND_RESET_CSR_WARM_BOOT:
hci_stack->substate = HCI_INIT_W4_CUSTOM_INIT_CSR_WARM_BOOT;
break;
default:
break;
}
}
if (!command_completed) return;
@ -1178,6 +1216,12 @@ static void hci_initializing_event_handler(uint8_t * packet, uint16_t size){
&& hci_stack->chipset->set_bd_addr_command;
switch(hci_stack->substate){
case HCI_INIT_SEND_RESET:
// on CSR with BCSP/H5, resend triggers resend of HCI Reset and leads to substate == HCI_INIT_SEND_RESET
// fix: just correct substate and behave as command below
hci_stack->substate = HCI_INIT_W4_SEND_RESET;
btstack_run_loop_remove_timer(&hci_stack->timeout);
break;
case HCI_INIT_W4_SEND_RESET:
btstack_run_loop_remove_timer(&hci_stack->timeout);
break;

View File

@ -421,6 +421,7 @@ typedef enum hci_init_state{
HCI_INIT_W4_CUSTOM_INIT,
HCI_INIT_SEND_RESET_CSR_WARM_BOOT,
HCI_INIT_W4_CUSTOM_INIT_CSR_WARM_BOOT,
HCI_INIT_W4_CUSTOM_INIT_CSR_WARM_BOOT_LINK_RESET,
HCI_INIT_READ_LOCAL_SUPPORTED_COMMANDS,
HCI_INIT_W4_READ_LOCAL_SUPPORTED_COMMANDS,

View File

@ -47,6 +47,7 @@
#define __HCI_TRANSPORT_H
#include <stdint.h>
#include "btstack_uart_block.h"
#include "btstack_run_loop.h"
#if defined __cplusplus
@ -94,10 +95,15 @@ typedef struct {
int (*send_packet)(uint8_t packet_type, uint8_t *packet, int size);
/**
* extension for UART transport implementations
* extension for UART transport implementations
*/
int (*set_baudrate)(uint32_t baudrate);
/**
* extension for UART H5 on CSR: reset BCSP/H5 Link
*/
void (*reset_link)(void);
} hci_transport_t;
typedef enum {
@ -121,19 +127,27 @@ typedef struct {
// inline various hci_transport_X.h files
/*
* @brief
* @brief Setup H4 instance with uart_driver
* @param uart_driver to use
*/
extern const hci_transport_t * hci_transport_h4_instance(void);
const hci_transport_t * hci_transport_h4_instance(const btstack_uart_block_t * uart_driver);
/*
* @brief Setup H5 instance with uart_driver
* @param uart_driver to use
*/
const hci_transport_t * hci_transport_h5_instance(const btstack_uart_block_t * uart_driver);
/*
* @brief Enable H5 Low Power Mode: enter sleep mode after x ms of inactivity
* @param inactivity_timeout_ms or 0 for off
*/
void hci_transport_h5_set_auto_sleep(uint16_t inactivity_timeout_ms);
/*
* @brief
*/
extern const hci_transport_t * hci_transport_h5_instance(void);
/*
* @brief
*/
extern const hci_transport_t * hci_transport_usb_instance(void);
const hci_transport_t * hci_transport_usb_instance(void);
/* API_END */

521
src/hci_transport_h4.c Normal file
View File

@ -0,0 +1,521 @@
/*
* Copyright (C) 2014 BlueKitchen GmbH
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holders nor the names of
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* 4. Any redistribution, use, or modification is done solely for
* personal benefit and not for any commercial purpose or for
* monetary gain.
*
* THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS
* RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* Please inquire about commercial licensing options at
* contact@bluekitchen-gmbh.com
*
*/
/*
* hci_h4_transport.c
*
* HCI Transport API implementation for H4 protocol over POSIX with optional support for eHCILL
*
* Created by Matthias Ringwald on 4/29/09.
*/
#include "btstack_config.h"
#include "btstack_debug.h"
#include "hci.h"
#include "hci_transport.h"
#include "btstack_uart_block.h"
#ifdef ENABLE_EHCILL
// eHCILL commands
#define EHCILL_GO_TO_SLEEP_IND 0x030
#define EHCILL_GO_TO_SLEEP_ACK 0x031
#define EHCILL_WAKE_UP_IND 0x032
#define EHCILL_WAKE_UP_ACK 0x033
static int hci_transport_h4_ehcill_outgoing_packet_ready(void);
static int hci_transport_h4_ehcill_sleep_mode_active(void);
static void hci_transport_h4_echill_send_wakeup_ind(void);
static void hci_transport_h4_ehcill_handle_command(uint8_t action);
static void hci_transport_h4_ehcill_handle_ehcill_command_sent(void);
static void hci_transport_h4_ehcill_handle_packet_sent(void);
static void hci_transport_h4_ehcill_open(void);
static void hci_transport_h4_ehcill_reset_statemachine(void);
static void hci_transport_h4_ehcill_send_ehcill_command(void);
static void hci_transport_h4_ehcill_sleep_ack_timer_setup(void);
static void hci_transport_h4_ehcill_trigger_wakeup(void);
typedef enum {
EHCILL_STATE_SLEEP,
EHCILL_STATE_W4_ACK,
EHCILL_STATE_AWAKE
} EHCILL_STATE;
// eHCILL state machine
static EHCILL_STATE ehcill_state;
static uint8_t ehcill_command_to_send;
static btstack_uart_sleep_mode_t btstack_uart_sleep_mode;
// work around for eHCILL problem
static btstack_timer_source_t ehcill_sleep_ack_timer;
#endif
// assert pre-buffer for packet type is available
#if !defined(HCI_OUTGOING_PRE_BUFFER_SIZE) || (HCI_OUTGOING_PRE_BUFFER_SIZE == 0)
#error HCI_OUTGOING_PRE_BUFFER_SIZE not defined. Please update hci.h
#endif
static void dummy_handler(uint8_t packet_type, uint8_t *packet, uint16_t size);
typedef enum {
H4_W4_PACKET_TYPE,
H4_W4_EVENT_HEADER,
H4_W4_ACL_HEADER,
H4_W4_SCO_HEADER,
H4_W4_PAYLOAD,
} H4_STATE;
typedef enum {
TX_IDLE = 1,
TX_W4_PACKET_SENT,
#ifdef ENABLE_EHCILL
TX_W4_WAKEUP,
TX_W2_EHCILL_SEND,
TX_W4_EHCILL_SENT,
#endif
} TX_STATE;
// UART Driver + Config
static const btstack_uart_block_t * btstack_uart;
static btstack_uart_config_t uart_config;
// write state
static TX_STATE tx_state;
static uint8_t * tx_data;
static uint16_t tx_len; // 0 == no outgoing packet
static uint8_t packet_sent_event[] = { HCI_EVENT_TRANSPORT_PACKET_SENT, 0};
static void (*packet_handler)(uint8_t packet_type, uint8_t *packet, uint16_t size) = dummy_handler;
// packet reader state machine
static H4_STATE h4_state;
static int bytes_to_read;
static int read_pos;
// incoming packet buffer
static uint8_t hci_packet_with_pre_buffer[HCI_INCOMING_PRE_BUFFER_SIZE + 1 + HCI_PACKET_BUFFER_SIZE]; // packet type + max(acl header + acl payload, event header + event data)
static uint8_t * hci_packet = &hci_packet_with_pre_buffer[HCI_INCOMING_PRE_BUFFER_SIZE];
static int hci_transport_h4_set_baudrate(uint32_t baudrate){
log_info("hci_transport_h4_set_baudrate %u", baudrate);
return btstack_uart->set_baudrate(baudrate);
}
static void hci_transport_h4_reset_statemachine(void){
h4_state = H4_W4_PACKET_TYPE;
read_pos = 0;
bytes_to_read = 1;
}
static void hci_transport_h4_trigger_next_read(void){
// log_info("hci_transport_h4_trigger_next_read: %u bytes", bytes_to_read);
btstack_uart->receive_block(&hci_packet[read_pos], bytes_to_read);
}
static void hci_transport_h4_block_read(void){
read_pos += bytes_to_read;
switch (h4_state) {
case H4_W4_PACKET_TYPE:
switch (hci_packet[0]){
case HCI_EVENT_PACKET:
bytes_to_read = HCI_EVENT_HEADER_SIZE;
h4_state = H4_W4_EVENT_HEADER;
break;
case HCI_ACL_DATA_PACKET:
bytes_to_read = HCI_ACL_HEADER_SIZE;
h4_state = H4_W4_ACL_HEADER;
break;
case HCI_SCO_DATA_PACKET:
bytes_to_read = HCI_SCO_HEADER_SIZE;
h4_state = H4_W4_SCO_HEADER;
break;
#ifdef ENABLE_EHCILL
case EHCILL_GO_TO_SLEEP_IND:
case EHCILL_GO_TO_SLEEP_ACK:
case EHCILL_WAKE_UP_IND:
case EHCILL_WAKE_UP_ACK:
hci_transport_h4_ehcill_handle_command(hci_packet[0]);
hci_transport_h4_reset_statemachine();
break;
#endif
default:
log_error("hci_transport_h4: invalid packet type 0x%02x", hci_packet[0]);
hci_transport_h4_reset_statemachine();
break;
}
break;
case H4_W4_EVENT_HEADER:
bytes_to_read = hci_packet[2];
h4_state = H4_W4_PAYLOAD;
break;
case H4_W4_ACL_HEADER:
bytes_to_read = little_endian_read_16( hci_packet, 3);
// check ACL length
if (HCI_ACL_HEADER_SIZE + bytes_to_read > HCI_PACKET_BUFFER_SIZE){
log_error("hci_transport_h4: invalid ACL payload len %u - only space for %u", bytes_to_read, HCI_PACKET_BUFFER_SIZE - HCI_ACL_HEADER_SIZE);
hci_transport_h4_reset_statemachine();
break;
}
h4_state = H4_W4_PAYLOAD;
break;
case H4_W4_SCO_HEADER:
bytes_to_read = hci_packet[3];
h4_state = H4_W4_PAYLOAD;
break;
case H4_W4_PAYLOAD:
packet_handler(hci_packet[0], &hci_packet[1], read_pos-1);
hci_transport_h4_reset_statemachine();
break;
default:
break;
}
hci_transport_h4_trigger_next_read();
}
static void hci_transport_h4_block_sent(void){
switch (tx_state){
case TX_W4_PACKET_SENT:
// packet fully sent, reset state
tx_len = 0;
tx_state = TX_IDLE;
#ifdef ENABLE_EHCILL
// notify eHCILL engine
hci_transport_h4_ehcill_handle_packet_sent();
#endif
// notify upper stack that it can send again
packet_handler(HCI_EVENT_PACKET, &packet_sent_event[0], sizeof(packet_sent_event));
break;
#ifdef ENABLE_EHCILL
case TX_W4_EHCILL_SENT:
hci_transport_h4_ehcill_handle_ehcill_command_sent();
break;
#endif
default:
break;
}
}
static int hci_transport_h4_can_send_now(uint8_t packet_type){
return tx_state == TX_IDLE;
}
static int hci_transport_h4_send_packet(uint8_t packet_type, uint8_t * packet, int size){
// store packet type before actual data and increase size
size++;
packet--;
*packet = packet_type;
// store request
tx_len = size;
tx_data = packet;
#ifdef ENABLE_EHCILL
if (hci_transport_h4_ehcill_sleep_mode_active()){
hci_transport_h4_ehcill_trigger_wakeup();
return 0;
}
#endif
// start sending
tx_state = TX_W4_PACKET_SENT;
btstack_uart->send_block(packet, size);
return 0;
}
static void hci_transport_h4_init(const void * transport_config){
// check for hci_transport_config_uart_t
if (!transport_config) {
log_error("hci_transport_h4: no config!");
return;
}
if (((hci_transport_config_t*)transport_config)->type != HCI_TRANSPORT_CONFIG_UART) {
log_error("hci_transport_h4: config not of type != HCI_TRANSPORT_CONFIG_UART!");
return;
}
// extract UART config from transport config
hci_transport_config_uart_t * hci_transport_config_uart = (hci_transport_config_uart_t*) transport_config;
uart_config.baudrate = hci_transport_config_uart->baudrate_init;
uart_config.flowcontrol = hci_transport_config_uart->flowcontrol;
uart_config.device_name = hci_transport_config_uart->device_name;
// setup UART driver
btstack_uart->init(&uart_config);
btstack_uart->set_block_received(&hci_transport_h4_block_read);
btstack_uart->set_block_sent(&hci_transport_h4_block_sent);
}
static int hci_transport_h4_open(void){
int res = btstack_uart->open();
if (res){
return res;
}
hci_transport_h4_reset_statemachine();
hci_transport_h4_trigger_next_read();
tx_state = TX_IDLE;
#ifdef ENABLE_EHCILL
hci_transport_h4_ehcill_open();
#endif
return 0;
}
static int hci_transport_h4_close(void){
return btstack_uart->close();
}
static void hci_transport_h4_register_packet_handler(void (*handler)(uint8_t packet_type, uint8_t *packet, uint16_t size)){
packet_handler = handler;
}
static void dummy_handler(uint8_t packet_type, uint8_t *packet, uint16_t size){
}
//
// --- main part of eHCILL implementation ---
//
#ifdef ENABLE_EHCILL
static void hci_transport_h4_ehcill_open(void){
hci_transport_h4_ehcill_reset_statemachine();
// find best sleep mode to use: wake on CTS, wake on RX, none
btstack_uart_sleep_mode = BTSTACK_UART_SLEEP_OFF;
int supported_sleep_modes = 0;
if (btstack_uart->get_supported_sleep_modes){
supported_sleep_modes = btstack_uart->get_supported_sleep_modes();
}
if (supported_sleep_modes & BTSTACK_UART_SLEEP_MASK_RTS_HIGH_WAKE_ON_CTS_PULSE){
log_info("eHCILL: using wake on CTS");
btstack_uart_sleep_mode = BTSTACK_UART_SLEEP_RTS_HIGH_WAKE_ON_CTS_PULSE;
} else if (supported_sleep_modes & BTSTACK_UART_SLEEP_MASK_RTS_LOW_WAKE_ON_RX_EDGE){
log_info("eHCILL: using wake on RX");
btstack_uart_sleep_mode = BTSTACK_UART_SLEEP_RTS_LOW_WAKE_ON_RX_EDGE;
} else {
log_info("eHCILL: UART driver does not provide compatible sleep mode");
}
}
static void hci_transport_h4_echill_send_wakeup_ind(void){
// update state
tx_state = TX_W4_WAKEUP;
ehcill_state = EHCILL_STATE_W4_ACK;
ehcill_command_to_send = EHCILL_WAKE_UP_IND;
btstack_uart->send_block(&ehcill_command_to_send, 1);
}
static int hci_transport_h4_ehcill_outgoing_packet_ready(void){
return tx_len != 0;
}
static int hci_transport_h4_ehcill_sleep_mode_active(void){
return ehcill_state == EHCILL_STATE_SLEEP;
}
static void hci_transport_h4_ehcill_reset_statemachine(void){
ehcill_state = EHCILL_STATE_AWAKE;
}
static void hci_transport_h4_ehcill_send_ehcill_command(void){
log_debug("eHCILL: send command %02x", ehcill_command_to_send);
tx_state = TX_W4_EHCILL_SENT;
btstack_uart->send_block(&ehcill_command_to_send, 1);
}
static void hci_transport_h4_ehcill_sleep_ack_timer_handler(btstack_timer_source_t * timer){
log_debug("eHCILL: timer triggered");
hci_transport_h4_ehcill_send_ehcill_command();
}
static void hci_transport_h4_ehcill_sleep_ack_timer_setup(void){
// setup timer
log_debug("eHCILL: set timer for sending command");
btstack_run_loop_set_timer_handler(&ehcill_sleep_ack_timer, &hci_transport_h4_ehcill_sleep_ack_timer_handler);
btstack_run_loop_set_timer(&ehcill_sleep_ack_timer, 50);
btstack_run_loop_add_timer(&ehcill_sleep_ack_timer);
}
static void hci_transport_h4_ehcill_trigger_wakeup(void){
switch (tx_state){
case TX_W2_EHCILL_SEND:
case TX_W4_EHCILL_SENT:
// wake up / sleep ack in progress, nothing to do now
return;
case TX_IDLE:
default:
// all clear, prepare for wakeup
break;
}
// UART needed again
if (btstack_uart_sleep_mode){
btstack_uart->set_sleep(BTSTACK_UART_SLEEP_OFF);
}
hci_transport_h4_echill_send_wakeup_ind();
}
static void hci_transport_h4_ehcill_schedule_ecill_command(uint8_t command){
ehcill_command_to_send = command;
switch (tx_state){
case TX_IDLE:
if (ehcill_command_to_send == EHCILL_WAKE_UP_ACK){
// send right away
hci_transport_h4_ehcill_send_ehcill_command();
} else {
// change state so BTstack cannot send and setup timer
tx_state = TX_W2_EHCILL_SEND;
hci_transport_h4_ehcill_sleep_ack_timer_setup();
}
break;
default:
break;
}
}
static void hci_transport_h4_ehcill_handle_command(uint8_t action){
// log_info("hci_transport_h4_ehcill_handle: %x, state %u, defer_rx %u", action, ehcill_state, ehcill_defer_rx_size);
switch(ehcill_state){
case EHCILL_STATE_AWAKE:
switch(action){
case EHCILL_GO_TO_SLEEP_IND:
ehcill_state = EHCILL_STATE_SLEEP;
log_info("eHCILL: GO_TO_SLEEP_IND RX");
hci_transport_h4_ehcill_schedule_ecill_command(EHCILL_GO_TO_SLEEP_ACK);
break;
default:
break;
}
break;
case EHCILL_STATE_SLEEP:
switch(action){
case EHCILL_WAKE_UP_IND:
ehcill_state = EHCILL_STATE_AWAKE;
log_info("eHCILL: WAKE_UP_IND RX");
hci_transport_h4_ehcill_schedule_ecill_command(EHCILL_WAKE_UP_ACK);
break;
default:
break;
}
break;
case EHCILL_STATE_W4_ACK:
switch(action){
case EHCILL_WAKE_UP_IND:
case EHCILL_WAKE_UP_ACK:
log_info("eHCILL: WAKE_UP_IND or ACK");
tx_state = TX_W4_PACKET_SENT;
ehcill_state = EHCILL_STATE_AWAKE;
btstack_uart->send_block(tx_data, tx_len);
break;
default:
break;
}
break;
}
}
static void hci_transport_h4_ehcill_handle_packet_sent(void){
// now, send pending ehcill command if neccessary
switch (ehcill_command_to_send){
case EHCILL_GO_TO_SLEEP_ACK:
hci_transport_h4_ehcill_sleep_ack_timer_setup();
break;
case EHCILL_WAKE_UP_IND:
hci_transport_h4_ehcill_send_ehcill_command();
break;
default:
break;
}
}
static void hci_transport_h4_ehcill_handle_ehcill_command_sent(void){
tx_state = TX_IDLE;
int command = ehcill_command_to_send;
ehcill_command_to_send = 0;
if (command == EHCILL_GO_TO_SLEEP_ACK) {
log_info("eHCILL: GO_TO_SLEEP_ACK sent, enter sleep mode");
// UART not needed after EHCILL_GO_TO_SLEEP_ACK was sent
if (btstack_uart_sleep_mode != BTSTACK_UART_SLEEP_OFF){
btstack_uart->set_sleep(btstack_uart_sleep_mode);
}
}
// already packet ready? then start wakeup
if (hci_transport_h4_ehcill_outgoing_packet_ready()){
if (btstack_uart_sleep_mode){
btstack_uart->set_sleep(BTSTACK_UART_SLEEP_OFF);
}
hci_transport_h4_echill_send_wakeup_ind();
}
}
#endif
// --- end of eHCILL implementation ---------
static const hci_transport_t hci_transport_h4 = {
/* const char * name; */ "H4",
/* void (*init) (const void *transport_config); */ &hci_transport_h4_init,
/* int (*open)(void); */ &hci_transport_h4_open,
/* int (*close)(void); */ &hci_transport_h4_close,
/* void (*register_packet_handler)(void (*handler)(...); */ &hci_transport_h4_register_packet_handler,
/* int (*can_send_packet_now)(uint8_t packet_type); */ &hci_transport_h4_can_send_now,
/* int (*send_packet)(...); */ &hci_transport_h4_send_packet,
/* int (*set_baudrate)(uint32_t baudrate); */ &hci_transport_h4_set_baudrate,
/* void (*reset_link)(void); */ NULL,
};
// configure and return h4 singleton
const hci_transport_t * hci_transport_h4_instance(const btstack_uart_block_t * uart_driver) {
btstack_uart = uart_driver;
return &hci_transport_h4;
}

View File

@ -43,22 +43,11 @@
* Created by Matthias Ringwald on 4/29/09.
*/
#include <termios.h> /* POSIX terminal control definitions */
#include <fcntl.h> /* File control definitions */
#include <unistd.h> /* UNIX standard function definitions */
#include <stdio.h>
#include <string.h>
#include "hci.h"
#include "btstack_slip.h"
#include "btstack_debug.h"
#include "hci_transport.h"
#ifdef HAVE_EHCILL
#error "HCI Transport H5 POSIX does not support eHCILL. Please either use HAVE_EHCILL or H5 Transport"
#endif
/// newer
#include "btstack_uart_block.h"
typedef enum {
LINK_UNINITIALIZED,
@ -66,6 +55,20 @@ typedef enum {
LINK_ACTIVE
} hci_transport_link_state_t;
typedef enum {
HCI_TRANSPORT_LINK_SEND_SYNC = 1 << 0,
HCI_TRANSPORT_LINK_SEND_SYNC_RESPONSE = 1 << 1,
HCI_TRANSPORT_LINK_SEND_CONFIG = 1 << 2,
HCI_TRANSPORT_LINK_SEND_CONFIG_RESPONSE = 1 << 3,
HCI_TRANSPORT_LINK_SEND_SLEEP = 1 << 4,
HCI_TRANSPORT_LINK_SEND_WOKEN = 1 << 5,
HCI_TRANSPORT_LINK_SEND_WAKEUP = 1 << 6,
HCI_TRANSPORT_LINK_SEND_QUEUED_PACKET = 1 << 7,
HCI_TRANSPORT_LINK_SEND_ACK_PACKET = 1 << 8,
HCI_TRANSPORT_LINK_ENTER_SLEEP = 1 << 9,
} hci_transport_link_actions_t;
// Configuration Field. No packet buffers -> sliding window = 1, no OOF flow control, no data integrity check
#define LINK_CONFIG_SLIDING_WINDOW_SIZE 1
#define LINK_CONFIG_OOF_FLOW_CONTROL 0
@ -83,9 +86,14 @@ typedef enum {
#define LINK_ACKNOWLEDGEMENT_TYPE 0x00
#define LINK_CONTROL_PACKET_TYPE 0x0f
// max size of write requests
#define LINK_SLIP_TX_CHUNK_LEN 64
// ---
static const uint8_t link_control_sync[] = { 0x01, 0x7e};
static const uint8_t link_control_sync_response[] = { 0x02, 0x7d};
static const uint8_t link_control_config[] = { 0x03, 0xfc, LINK_CONFIG_FIELD};
static const uint8_t link_control_config_prefix_len = 2;
static const uint8_t link_control_config_response[] = { 0x04, 0x7b, LINK_CONFIG_FIELD};
static const uint8_t link_control_config_response_prefix_len = 2;
static const uint8_t link_control_wakeup[] = { 0x05, 0xfa};
@ -95,8 +103,9 @@ static const uint8_t link_control_sleep[] = { 0x07, 0x78};
// incoming pre-bufffer + 4 bytes H5 header + max(acl header + acl payload, event header + event data) + 2 bytes opt CRC
static uint8_t hci_packet_with_pre_buffer[HCI_INCOMING_PRE_BUFFER_SIZE + 6 + HCI_PACKET_BUFFER_SIZE];
// Non-optimized outgoing buffer (EOF, 4 bytes header, payload, EOF)
static uint8_t slip_outgoing_buffer[2 + 2 * (HCI_PACKET_BUFFER_SIZE + 4)];
// outgoing slip encoded buffer. +1 to assert that last SOF fits in buffer
static uint8_t slip_outgoing_buffer[LINK_SLIP_TX_CHUNK_LEN+1];
static int slip_write_active;
// H5 Link State
static hci_transport_link_state_t link_state;
@ -106,48 +115,75 @@ static uint8_t link_ack_nr;
static uint16_t link_resend_timeout_ms;
static uint8_t link_peer_asleep;
// auto sleep-mode
static btstack_timer_source_t inactivity_timer;
static uint16_t link_inactivity_timeout_ms; // auto-sleep if set
// Outgoing packet
static uint8_t hci_packet_type;
static uint16_t hci_packet_size;
static uint8_t * hci_packet;
// device
static hci_transport_config_uart_t * hci_transport_config_uart;
// data source for device
static btstack_data_source_t hci_transport_h5_data_source;
// hci_transport_t instance
static hci_transport_t * hci_transport_h5;
// hci packet handler
static void (*packet_handler)(uint8_t packet_type, uint8_t *packet, uint16_t size);
static int hci_transport_link_actions;
// UART Driver + Config
static const btstack_uart_block_t * btstack_uart;
static btstack_uart_config_t uart_config;
static btstack_uart_sleep_mode_t btstack_uart_sleep_mode;
// Prototypes
static int hci_transport_h5_process(btstack_data_source_t *ds);
static void hci_transport_h5_process_frame(uint16_t frame_size);
static int hci_transport_link_have_outgoing_packet(void);
static void hci_transport_link_send_queued_packet(void);
static void hci_transport_link_set_timer(uint16_t timeout_ms);
static void hci_transport_link_timeout_handler(btstack_timer_source_t * timer);
static int hci_transport_h5_outgoing_packet(void);
static void hci_transport_h5_send_queued_packet(void);
static void hci_transport_link_run(void);
static void hci_transport_slip_init(void);
// Generic helper
static void hci_transport_h5_send_really(const uint8_t * data, int size){
// log_info("hci_transport_h5_send_really (%u bytes)", size);
// log_info_hexdump(data, size);
while (size > 0) {
int bytes_written = write(hci_transport_h5_data_source.fd, data, size);
if (bytes_written < 0) {
usleep(5000);
continue;
}
data += bytes_written;
size -= bytes_written;
}
// -----------------------------
static void hci_transport_inactivity_timeout_handler(btstack_timer_source_t * ts){
log_info("h5: inactivity timeout. link state %u, peer asleep %u, actions 0x%02x, outgoing packet %u",
link_state, link_peer_asleep, hci_transport_link_actions, hci_transport_link_have_outgoing_packet());
if (hci_transport_link_have_outgoing_packet()) return;
if (link_state != LINK_ACTIVE) return;
if (hci_transport_link_actions) return;
if (link_peer_asleep) return;
hci_transport_link_actions |= HCI_TRANSPORT_LINK_SEND_SLEEP;
hci_transport_link_run();
}
static void hci_transport_inactivity_timer_set(void){
if (!link_inactivity_timeout_ms) return;
btstack_run_loop_set_timer_handler(&inactivity_timer, &hci_transport_inactivity_timeout_handler);
btstack_run_loop_set_timer(&inactivity_timer, link_inactivity_timeout_ms);
btstack_run_loop_remove_timer(&inactivity_timer);
btstack_run_loop_add_timer(&inactivity_timer);
}
// -----------------------------
// SLIP Outgoing
// Fill chunk and write
static void hci_transport_slip_encode_chunk_and_send(int pos){
while (btstack_slip_encoder_has_data() & (pos < LINK_SLIP_TX_CHUNK_LEN)) {
slip_outgoing_buffer[pos++] = btstack_slip_encoder_get_byte();
}
if (!btstack_slip_encoder_has_data()){
// Start of Frame
slip_outgoing_buffer[pos++] = BTSTACK_SLIP_SOF;
}
slip_write_active = 1;
log_info("hci_transport_slip: send %u bytes", pos);
btstack_uart->send_block(slip_outgoing_buffer, pos);
}
static inline void hci_transport_slip_send_next_chunk(void){
hci_transport_slip_encode_chunk_and_send(0);
}
// format: 0xc0 HEADER PACKER 0xc0
// @param uint8_t header[4]
static void hci_transport_slip_send_frame(const uint8_t * header, const uint8_t * packet, uint16_t packet_size){
@ -165,14 +201,9 @@ static void hci_transport_slip_send_frame(const uint8_t * header, const uint8_t
// Packet
btstack_slip_encoder_start(packet, packet_size);
while (btstack_slip_encoder_has_data()){
slip_outgoing_buffer[pos++] = btstack_slip_encoder_get_byte();
}
// Start of Frame
slip_outgoing_buffer[pos++] = BTSTACK_SLIP_SOF;
hci_transport_h5_send_really(slip_outgoing_buffer, pos);
// Fill rest of chunk from packet and send
hci_transport_slip_encode_chunk_and_send(pos);
}
// SLIP Incoming
@ -239,6 +270,23 @@ static void hci_transport_link_send_wakeup(void){
hci_transport_link_send_control(link_control_wakeup, sizeof(link_control_wakeup));
}
static void hci_transport_link_send_sleep(void){
log_info("link: send sleep");
hci_transport_link_send_control(link_control_sleep, sizeof(link_control_sleep));
}
static void hci_transport_link_send_queued_packet(void){
log_info("hci_transport_link_send_queued_packet: seq %u, ack %u, size %u", link_seq_nr, link_ack_nr, hci_packet_size);
log_info_hexdump(hci_packet, hci_packet_size);
uint8_t header[4];
hci_transport_link_calc_header(header, link_seq_nr, link_ack_nr, 0, 1, hci_packet_type, hci_packet_size);
hci_transport_slip_send_frame(header, hci_packet, hci_packet_size);
// reset inactvitiy timer
hci_transport_inactivity_timer_set();
}
static void hci_transport_link_send_ack_packet(void){
log_info("link: send ack %u", link_ack_nr);
uint8_t header[4];
@ -246,6 +294,62 @@ static void hci_transport_link_send_ack_packet(void){
hci_transport_slip_send_frame(header, NULL, 0);
}
static void hci_transport_link_run(void){
// exit if outgoing active
if (slip_write_active) return;
// process queued requests
if (hci_transport_link_actions & HCI_TRANSPORT_LINK_SEND_SYNC){
hci_transport_link_actions &= ~HCI_TRANSPORT_LINK_SEND_SYNC;
hci_transport_link_send_sync();
return;
}
if (hci_transport_link_actions & HCI_TRANSPORT_LINK_SEND_SYNC_RESPONSE){
hci_transport_link_actions &= ~HCI_TRANSPORT_LINK_SEND_SYNC_RESPONSE;
hci_transport_link_send_sync_response();
return;
}
if (hci_transport_link_actions & HCI_TRANSPORT_LINK_SEND_CONFIG){
hci_transport_link_actions &= ~HCI_TRANSPORT_LINK_SEND_CONFIG;
hci_transport_link_send_config();
return;
}
if (hci_transport_link_actions & HCI_TRANSPORT_LINK_SEND_CONFIG_RESPONSE){
hci_transport_link_actions &= ~HCI_TRANSPORT_LINK_SEND_CONFIG_RESPONSE;
hci_transport_link_send_config_response();
return;
}
if (hci_transport_link_actions & HCI_TRANSPORT_LINK_SEND_WOKEN){
hci_transport_link_actions &= ~HCI_TRANSPORT_LINK_SEND_WOKEN;
hci_transport_link_send_woken();
return;
}
if (hci_transport_link_actions & HCI_TRANSPORT_LINK_SEND_WAKEUP){
hci_transport_link_actions &= ~HCI_TRANSPORT_LINK_SEND_WAKEUP;
hci_transport_link_send_wakeup();
return;
}
if (hci_transport_link_actions & HCI_TRANSPORT_LINK_SEND_QUEUED_PACKET){
hci_transport_link_actions &= ~HCI_TRANSPORT_LINK_SEND_QUEUED_PACKET;
// packet already contains ack, no need to send addtitional one
hci_transport_link_actions &= ~HCI_TRANSPORT_LINK_SEND_ACK_PACKET;
hci_transport_link_send_queued_packet();
return;
}
if (hci_transport_link_actions & HCI_TRANSPORT_LINK_SEND_ACK_PACKET){
hci_transport_link_actions &= ~HCI_TRANSPORT_LINK_SEND_ACK_PACKET;
hci_transport_link_send_ack_packet();
return;
}
if (hci_transport_link_actions & HCI_TRANSPORT_LINK_SEND_SLEEP){
hci_transport_link_actions &= ~HCI_TRANSPORT_LINK_SEND_SLEEP;
hci_transport_link_actions |= HCI_TRANSPORT_LINK_ENTER_SLEEP;
link_peer_asleep = 1;
hci_transport_link_send_sleep();
return;
}
}
static void hci_transport_link_set_timer(uint16_t timeout_ms){
btstack_run_loop_set_timer_handler(&link_timer, &hci_transport_link_timeout_handler);
btstack_run_loop_set_timer(&link_timer, timeout_ms);
@ -255,30 +359,32 @@ static void hci_transport_link_set_timer(uint16_t timeout_ms){
static void hci_transport_link_timeout_handler(btstack_timer_source_t * timer){
switch (link_state){
case LINK_UNINITIALIZED:
hci_transport_link_send_sync();
hci_transport_link_actions |= HCI_TRANSPORT_LINK_SEND_SYNC;
hci_transport_link_set_timer(LINK_PERIOD_MS);
break;
case LINK_INITIALIZED:
hci_transport_link_send_config();
hci_transport_link_actions |= HCI_TRANSPORT_LINK_SEND_CONFIG;
hci_transport_link_set_timer(LINK_PERIOD_MS);
break;
case LINK_ACTIVE:
if (!hci_transport_h5_outgoing_packet()){
if (!hci_transport_link_have_outgoing_packet()){
log_info("h5 timeout while active, but no outgoing packet");
return;
}
if (link_peer_asleep){
hci_transport_link_send_wakeup();
hci_transport_link_actions |= HCI_TRANSPORT_LINK_SEND_WAKEUP;
hci_transport_link_set_timer(LINK_WAKEUP_MS);
return;
}
// resend packet
hci_transport_h5_send_queued_packet();
hci_transport_link_actions |= HCI_TRANSPORT_LINK_SEND_QUEUED_PACKET;
hci_transport_link_set_timer(link_resend_timeout_ms);
break;
default:
break;
}
hci_transport_link_run();
}
static void hci_transport_link_init(void){
@ -286,19 +392,20 @@ static void hci_transport_link_init(void){
link_peer_asleep = 0;
// get started
hci_transport_link_send_sync();
hci_transport_link_actions |= HCI_TRANSPORT_LINK_SEND_SYNC;
hci_transport_link_set_timer(LINK_PERIOD_MS);
hci_transport_link_run();
}
static int hci_transport_h5_inc_seq_nr(int seq_nr){
static int hci_transport_link_inc_seq_nr(int seq_nr){
return (seq_nr + 1) & 0x07;
}
static int hci_transport_h5_outgoing_packet(void){
static int hci_transport_link_have_outgoing_packet(void){
return hci_packet != 0;
}
static void hci_transport_h5_clear_queue(void){
static void hci_transport_link_clear_queue(void){
btstack_run_loop_remove_timer(&link_timer);
hci_packet = NULL;
}
@ -309,20 +416,6 @@ static void hci_transport_h5_queue_packet(uint8_t packet_type, uint8_t *packet,
hci_packet_size = size;
}
static void hci_transport_h5_send_queued_packet(void){
log_info("hci_transport_h5_send_queued_packet: seq %u, ack %u, size %u", link_seq_nr, link_ack_nr, hci_packet_size);
log_info_hexdump(hci_packet, hci_packet_size);
uint8_t header[4];
hci_transport_link_calc_header(header, link_seq_nr, link_ack_nr, 0, 1, hci_packet_type, hci_packet_size);
hci_transport_slip_send_frame(header, hci_packet, hci_packet_size);
}
static int hci_transport_h5_can_send_packet_now(uint8_t packet_type){
if (hci_transport_h5_outgoing_packet()) return 0;
return link_state == LINK_ACTIVE;
}
static void hci_transport_h5_process_frame(uint16_t frame_size){
if (frame_size < 4) return;
@ -342,6 +435,15 @@ static void hci_transport_h5_process_frame(uint16_t frame_size){
log_info_hexdump(slip_header, 4);
log_info_hexdump(slip_payload, frame_size_without_header);
// CSR 8811 does not seem to auto-detect H5 mode and sends data with even parity.
// if this byte sequence is detected, just enable even parity
const uint8_t sync_response_bcsp[] = {0x01, 0x7a, 0x06, 0x10};
if (memcmp(sync_response_bcsp, slip_header, 4) == 0){
log_info("h5: detected BSCP SYNC sent with Even Parity -> discard frame and enable Even Parity");
btstack_uart->set_parity(1);
return;
}
// validate header checksum
uint8_t header_checksum = slip_header[0] + slip_header[1] + slip_header[2] + slip_header[3];
if (header_checksum != 0xff){
@ -364,7 +466,7 @@ static void hci_transport_h5_process_frame(uint16_t frame_size){
if (link_packet_type != LINK_CONTROL_PACKET_TYPE) break;
if (memcmp(slip_payload, link_control_sync, sizeof(link_control_sync)) == 0){
log_info("link: received sync");
hci_transport_link_send_sync_response();
hci_transport_link_actions |= HCI_TRANSPORT_LINK_SEND_SYNC_RESPONSE;
}
if (memcmp(slip_payload, link_control_sync_response, sizeof(link_control_sync_response)) == 0){
log_info("link: received sync response");
@ -372,7 +474,7 @@ static void hci_transport_h5_process_frame(uint16_t frame_size){
btstack_run_loop_remove_timer(&link_timer);
log_info("link initialized");
//
hci_transport_link_send_config();
hci_transport_link_actions |= HCI_TRANSPORT_LINK_SEND_CONFIG;
hci_transport_link_set_timer(LINK_PERIOD_MS);
}
break;
@ -380,11 +482,11 @@ static void hci_transport_h5_process_frame(uint16_t frame_size){
if (link_packet_type != LINK_CONTROL_PACKET_TYPE) break;
if (memcmp(slip_payload, link_control_sync, sizeof(link_control_sync)) == 0){
log_info("link: received sync");
hci_transport_link_send_sync_response();
hci_transport_link_actions |= HCI_TRANSPORT_LINK_SEND_SYNC_RESPONSE;
}
if (memcmp(slip_payload, link_control_config, sizeof(link_control_config)) == 0){
if (memcmp(slip_payload, link_control_config, link_control_config_prefix_len) == 0){
log_info("link: received config");
hci_transport_link_send_config_response();
hci_transport_link_actions |= HCI_TRANSPORT_LINK_SEND_CONFIG_RESPONSE;
}
if (memcmp(slip_payload, link_control_config_response, link_control_config_response_prefix_len) == 0){
log_info("link: received config response");
@ -405,22 +507,22 @@ static void hci_transport_h5_process_frame(uint16_t frame_size){
if (reliable_packet){
if (seq_nr != link_ack_nr){
log_info("expected seq nr %u, but received %u", link_ack_nr, seq_nr);
hci_transport_link_send_ack_packet();
return;
hci_transport_link_actions |= HCI_TRANSPORT_LINK_SEND_ACK_PACKET;
break;
}
// ack packet right away
link_ack_nr = hci_transport_h5_inc_seq_nr(link_ack_nr);
hci_transport_link_send_ack_packet();
link_ack_nr = hci_transport_link_inc_seq_nr(link_ack_nr);
hci_transport_link_actions |= HCI_TRANSPORT_LINK_SEND_ACK_PACKET;
}
// Process ACKs in reliable packet and explicit ack packets
if (reliable_packet || link_packet_type == LINK_ACKNOWLEDGEMENT_TYPE){
// our packet is good if the remote expects our seq nr + 1
int next_seq_nr = hci_transport_h5_inc_seq_nr(link_seq_nr);
if (hci_transport_h5_outgoing_packet() && next_seq_nr == ack_nr){
int next_seq_nr = hci_transport_link_inc_seq_nr(link_seq_nr);
if (hci_transport_link_have_outgoing_packet() && next_seq_nr == ack_nr){
log_info("h5: outoing packet with seq %u ack'ed", link_seq_nr);
link_seq_nr = next_seq_nr;
hci_transport_h5_clear_queue();
hci_transport_link_clear_queue();
// notify upper stack that it can send again
uint8_t event[] = { HCI_EVENT_TRANSPORT_PACKET_SENT, 0};
@ -432,7 +534,7 @@ static void hci_transport_h5_process_frame(uint16_t frame_size){
case LINK_CONTROL_PACKET_TYPE:
if (memcmp(slip_payload, link_control_config, sizeof(link_control_config)) == 0){
log_info("link: received config");
hci_transport_link_send_config_response();
hci_transport_link_actions |= HCI_TRANSPORT_LINK_SEND_CONFIG_RESPONSE;
break;
}
if (memcmp(slip_payload, link_control_sync, sizeof(link_control_sync)) == 0){
@ -441,27 +543,37 @@ static void hci_transport_h5_process_frame(uint16_t frame_size){
break;
}
if (memcmp(slip_payload, link_control_sleep, sizeof(link_control_sleep)) == 0){
log_info("link: received sleep message");
if (btstack_uart_sleep_mode){
log_info("link: received sleep message. Enabling UART Sleep.");
btstack_uart->set_sleep(btstack_uart_sleep_mode);
} else {
log_info("link: received sleep message. UART Sleep not supported");
}
link_peer_asleep = 1;
break;
}
if (memcmp(slip_payload, link_control_wakeup, sizeof(link_control_wakeup)) == 0){
log_info("link: received wakupe message -> send woken");
link_peer_asleep = 0;
hci_transport_link_send_woken();
hci_transport_link_actions |= HCI_TRANSPORT_LINK_SEND_WOKEN;
break;
}
if (memcmp(slip_payload, link_control_woken, sizeof(link_control_woken)) == 0){
log_info("link: received woken message");
link_peer_asleep = 0;
// TODO: send packet if queued....
// queued packet will be sent in hci_transport_link_run if needed
break;
}
break;
case HCI_EVENT_PACKET:
case HCI_ACL_DATA_PACKET:
case HCI_SCO_DATA_PACKET:
// seems like peer is awake
link_peer_asleep = 0;
// forward packet to stack
packet_handler(link_packet_type, slip_payload, link_payload_len);
// reset inactvitiy timer
hci_transport_inactivity_timer_set();
break;
}
@ -470,6 +582,136 @@ static void hci_transport_h5_process_frame(uint16_t frame_size){
break;
}
hci_transport_link_run();
}
// recommendet time until resend: 3 * time of largest packet
static uint16_t hci_transport_link_calc_resend_timeout(uint32_t baudrate){
uint32_t max_packet_size_in_bit = (HCI_PACKET_BUFFER_SIZE + 6) << 3;
uint32_t t_max_x3_ms = max_packet_size_in_bit * 3000 / baudrate;
log_info("resend timeout for %u baud: %u ms", baudrate, t_max_x3_ms);
return t_max_x3_ms;
}
static void hci_transport_link_update_resend_timeout(uint32_t baudrate){
link_resend_timeout_ms = hci_transport_link_calc_resend_timeout(baudrate);
}
/// H5 Interface
static uint8_t hci_transport_link_read_byte;
static void hci_transport_h5_read_next_byte(void){
log_debug("h5: rx nxt");
btstack_uart->receive_block(&hci_transport_link_read_byte, 1);
}
static void hci_transport_h5_block_received(){
log_debug("slip: process 0x%02x", hci_transport_link_read_byte);
btstack_slip_decoder_process(hci_transport_link_read_byte);
uint16_t frame_size = btstack_slip_decoder_frame_size();
if (frame_size) {
hci_transport_h5_process_frame(frame_size);
hci_transport_slip_init();
}
hci_transport_h5_read_next_byte();
}
static void hci_transport_h5_block_sent(void){
// check if more data to send
if (btstack_slip_encoder_has_data()){
hci_transport_slip_send_next_chunk();
return;
}
// done
slip_write_active = 0;
// enter sleep mode after sending sleep message
if (hci_transport_link_actions & HCI_TRANSPORT_LINK_ENTER_SLEEP){
hci_transport_link_actions &= ~HCI_TRANSPORT_LINK_ENTER_SLEEP;
if (btstack_uart_sleep_mode){
log_info("link: sent sleep message. Enabling UART Sleep.");
btstack_uart->set_sleep(btstack_uart_sleep_mode);
} else {
log_info("link: sent sleep message. UART Sleep not supported");
}
}
hci_transport_link_run();
}
static void hci_transport_h5_init(const void * transport_config){
// check for hci_transport_config_uart_t
if (!transport_config) {
log_error("hci_transport_h5: no config!");
return;
}
if (((hci_transport_config_t*)transport_config)->type != HCI_TRANSPORT_CONFIG_UART) {
log_error("hci_transport_h5: config not of type != HCI_TRANSPORT_CONFIG_UART!");
return;
}
// extract UART config from transport config
hci_transport_config_uart_t * hci_transport_config_uart = (hci_transport_config_uart_t*) transport_config;
uart_config.baudrate = hci_transport_config_uart->baudrate_init;
uart_config.flowcontrol = hci_transport_config_uart->flowcontrol;
uart_config.device_name = hci_transport_config_uart->device_name;
// setup UART driver
btstack_uart->init(&uart_config);
btstack_uart->set_block_received(&hci_transport_h5_block_received);
btstack_uart->set_block_sent(&hci_transport_h5_block_sent);
}
static int hci_transport_h5_open(void){
int res = btstack_uart->open();
if (res){
return res;
}
// check if wake on RX can be used
btstack_uart_sleep_mode = BTSTACK_UART_SLEEP_OFF;
int supported_sleep_modes = 0;
if (btstack_uart->get_supported_sleep_modes){
supported_sleep_modes = btstack_uart->get_supported_sleep_modes();
}
if (supported_sleep_modes & BTSTACK_UART_SLEEP_MASK_RTS_LOW_WAKE_ON_RX_EDGE){
log_info("H5: using wake on RX");
btstack_uart_sleep_mode = BTSTACK_UART_SLEEP_RTS_LOW_WAKE_ON_RX_EDGE;
} else {
log_info("H5: UART driver does not provide compatible sleep mode");
}
// setup resend timeout
hci_transport_link_update_resend_timeout(uart_config.baudrate);
// init slip parser state machine
hci_transport_slip_init();
// init link management - already starts syncing
hci_transport_link_init();
// start receiving
hci_transport_h5_read_next_byte();
return 0;
}
static int hci_transport_h5_close(void){
return btstack_uart->close();
return 0;
}
static void hci_transport_h5_register_packet_handler(void (*handler)(uint8_t packet_type, uint8_t *packet, uint16_t size)){
packet_handler = handler;
}
static int hci_transport_h5_can_send_packet_now(uint8_t packet_type){
int res = !hci_transport_link_have_outgoing_packet() && link_state == LINK_ACTIVE;
// log_info("hci_transport_h5_can_send_packet_now: %u", res);
return res;
}
static int hci_transport_h5_send_packet(uint8_t packet_type, uint8_t *packet, int size){
@ -481,160 +723,38 @@ static int hci_transport_h5_send_packet(uint8_t packet_type, uint8_t *packet, in
// store request
hci_transport_h5_queue_packet(packet_type, packet, size);
// check peer sleep mode
// send wakeup first
if (link_peer_asleep){
hci_transport_link_send_wakeup();
if (btstack_uart_sleep_mode){
log_info("h5: disable UART sleep");
btstack_uart->set_sleep(BTSTACK_UART_SLEEP_OFF);
}
hci_transport_link_actions |= HCI_TRANSPORT_LINK_SEND_WAKEUP;
hci_transport_link_set_timer(LINK_WAKEUP_MS);
return 0;
} else {
hci_transport_link_actions |= HCI_TRANSPORT_LINK_SEND_QUEUED_PACKET;
hci_transport_link_set_timer(link_resend_timeout_ms);
}
// otherwise, send packet right away
hci_transport_h5_send_queued_packet();
// set timer for retransmit
hci_transport_link_set_timer(link_resend_timeout_ms);
hci_transport_link_run();
return 0;
}
/// H5 Interface
static void hci_transport_h5_register_packet_handler(void (*handler)(uint8_t packet_type, uint8_t *packet, uint16_t size)){
packet_handler = handler;
}
// recommendet time until resend: 3 * time of largest packet
static uint16_t hci_transport_h5_calc_resend_timeout(uint32_t baudrate){
uint32_t max_packet_size_in_bit = (HCI_PACKET_BUFFER_SIZE + 6) << 3;
uint32_t t_max_x3_ms = max_packet_size_in_bit * 3000 / baudrate;
log_info("resend timeout for %u baud: %u ms", baudrate, t_max_x3_ms);
return t_max_x3_ms;
}
static void hci_transport_h5_init(const void * transport_config){
// check for hci_transport_config_uart_t
if (!transport_config) {
log_error("hci_transport_h5_posix: no config!");
return;
}
if (((hci_transport_config_t*)transport_config)->type != HCI_TRANSPORT_CONFIG_UART) {
log_error("hci_transport_h5_posix: config not of type != HCI_TRANSPORT_CONFIG_UART!");
return;
}
hci_transport_config_uart = (hci_transport_config_uart_t*) transport_config;
hci_transport_h5_data_source.fd = -1;
}
static int hci_transport_h5_set_baudrate(uint32_t baudrate){
log_info("hci_transport_h5_set_baudrate %u", baudrate);
int res = btstack_uart->set_baudrate(baudrate);
struct termios toptions;
int fd = hci_transport_h5_data_source.fd;
if (tcgetattr(fd, &toptions) < 0) {
perror("init_serialport: Couldn't get term attributes");
return -1;
}
speed_t brate = baudrate; // let you override switch below if needed
switch(baudrate) {
case 57600: brate=B57600; break;
case 115200: brate=B115200; break;
#ifdef B230400
case 230400: brate=B230400; break;
#endif
#ifdef B460800
case 460800: brate=B460800; break;
#endif
#ifdef B921600
case 921600: brate=B921600; break;
#endif
}
cfsetospeed(&toptions, brate);
cfsetispeed(&toptions, brate);
if( tcsetattr(fd, TCSANOW, &toptions) < 0) {
perror("init_serialport: Couldn't set term attributes");
return -1;
}
// extra for h5: calc resend timeout
link_resend_timeout_ms = hci_transport_h5_calc_resend_timeout(baudrate);
if (res) return res;
hci_transport_link_update_resend_timeout(baudrate);
return 0;
}
static int hci_transport_h5_open(void){
struct termios toptions;
int flags = O_RDWR | O_NOCTTY | O_NONBLOCK;
int fd = open(hci_transport_config_uart->device_name, flags);
if (fd == -1) {
perror("h5_open: Unable to open port ");
perror(hci_transport_config_uart->device_name);
return -1;
}
if (tcgetattr(fd, &toptions) < 0) {
perror("h5_open: Couldn't get term attributes");
return -1;
}
cfmakeraw(&toptions); // make raw
// 8N1
toptions.c_cflag &= ~CSTOPB;
toptions.c_cflag |= CS8;
if (hci_transport_config_uart->flowcontrol) {
// with flow control
toptions.c_cflag |= CRTSCTS;
} else {
// no flow control
toptions.c_cflag &= ~CRTSCTS;
}
toptions.c_cflag |= CREAD | CLOCAL; // turn on READ & ignore ctrl lines
//
// toptions.c_cflag |= PARENB; // enable even parity
//
toptions.c_iflag &= ~(IXON | IXOFF | IXANY); // turn off s/w flow ctrl
// see: http://unixwiz.net/techtips/termios-vmin-vtime.html
toptions.c_cc[VMIN] = 1;
toptions.c_cc[VTIME] = 0;
if( tcsetattr(fd, TCSANOW, &toptions) < 0) {
perror("init_serialport: Couldn't set term attributes");
return -1;
}
// set up data_source
btstack_run_loop_set_data_source_fd(&hci_transport_h5_data_source, fd);
btstack_run_loop_set_data_source_handler(&hci_transport_h5_data_source, &hci_transport_h5_process);
btstack_run_loop_enable_data_source_callbacks(&hci_transport_h5_data_source, DATA_SOURCE_CALLBACK_READ);
btstack_run_loop_add_data_source(&hci_transport_h5_data_source);
// also set baudrate
if (hci_transport_h5_set_baudrate(hci_transport_config_uart->baudrate_init) < 0){
return -1;
}
// init slip parser state machine
hci_transport_slip_init();
// init link management - already starts syncing
hci_transport_link_init();
return 0;
}
void hci_transport_h5_reset_link(void){
static void hci_transport_h5_reset_link(void){
log_info("hci_transport_h5_reset_link");
// clear outgoing queue
hci_transport_h5_clear_queue();
hci_transport_link_clear_queue();
// init slip parser state machine
hci_transport_slip_init();
@ -643,47 +763,24 @@ void hci_transport_h5_reset_link(void){
hci_transport_link_init();
}
static int hci_transport_h5_close(void){
// first remove run loop handler
btstack_run_loop_remove_data_source(&hci_transport_h5_data_source);
// then close device
close(hci_transport_h5_data_source.fd);
hci_transport_h5_data_source.fd = -1;
return 0;
static const hci_transport_t hci_transport_h5 = {
/* const char * name; */ "H5",
/* void (*init) (const void *transport_config); */ &hci_transport_h5_init,
/* int (*open)(void); */ &hci_transport_h5_open,
/* int (*close)(void); */ &hci_transport_h5_close,
/* void (*register_packet_handler)(void (*handler)(...); */ &hci_transport_h5_register_packet_handler,
/* int (*can_send_packet_now)(uint8_t packet_type); */ &hci_transport_h5_can_send_packet_now,
/* int (*send_packet)(...); */ &hci_transport_h5_send_packet,
/* int (*set_baudrate)(uint32_t baudrate); */ &hci_transport_h5_set_baudrate,
/* void (*reset_link)(void); */ &hci_transport_h5_reset_link,
};
// configure and return h5 singleton
const hci_transport_t * hci_transport_h5_instance(const btstack_uart_block_t * uart_driver) {
btstack_uart = uart_driver;
return &hci_transport_h5;
}
static void hci_transport_h5_process(btstack_data_source_t *ds, btstack_data_source_callback_type_t callback_type) {
if (hci_transport_h5_data_source.fd < 0) return;
// process data byte by byte
uint8_t data;
while (1) {
int bytes_read = read(hci_transport_h5_data_source.fd, &data, 1);
if (bytes_read < 1) break;
// log_info("slip: process 0x%02x", data);
btstack_slip_decoder_process(data);
uint16_t frame_size = btstack_slip_decoder_frame_size();
if (frame_size) {
hci_transport_h5_process_frame(frame_size);
hci_transport_slip_init();
}
};
}
// get h5 singleton
const hci_transport_t * hci_transport_h5_instance(void) {
if (hci_transport_h5 == NULL) {
hci_transport_h5 = (hci_transport_t*) malloc(sizeof(hci_transport_t));
memset(hci_transport_h5, 0, sizeof(hci_transport_t));
hci_transport_h5->name = "H5_POSIX";
hci_transport_h5->init = &hci_transport_h5_init;
hci_transport_h5->open = &hci_transport_h5_open;
hci_transport_h5->close = &hci_transport_h5_close;
hci_transport_h5->register_packet_handler = &hci_transport_h5_register_packet_handler;
hci_transport_h5->can_send_packet_now = &hci_transport_h5_can_send_packet_now;
hci_transport_h5->send_packet = &hci_transport_h5_send_packet;
hci_transport_h5->set_baudrate = &hci_transport_h5_set_baudrate;
}
return (const hci_transport_t *) hci_transport_h5;
void hci_transport_h5_set_auto_sleep(uint16_t inactivity_timeout_ms){
link_inactivity_timeout_ms = inactivity_timeout_ms;
}