esp32: Add initial support to Bluetooth Low Energy

Co-authored-by: saramonteiro <saramonteirosouza44@gmail.com>
Co-authored-by: Gustavo Henrique Nihei <gustavonihei@gmail.com>
This commit is contained in:
Alan C. Assis 2021-09-10 10:36:11 -03:00 committed by Gustavo Henrique Nihei
parent 2e94631da4
commit 867c6d0636
22 changed files with 3999 additions and 10 deletions

View File

@ -396,7 +396,7 @@
#define ESP32_NCPUINTS 32
#define ESP32_CPUINT_MAX (ESP32_NCPUINTS - 1)
#define ESP32_CPUINT_PERIPHSET 0xdffe773f
#define ESP32_CPUINT_PERIPHSET 0xdffe741f
#define ESP32_CPUINT_INTERNALSET 0x200188c0
/* Priority 1: 0-10, 12-13, 17-18 (15)

View File

@ -509,6 +509,13 @@ config ESP32_WIRELESS
---help---
Enable Wireless support
config ESP32_BLE
bool "BLE"
default n
select ESP32_WIRELESS
---help---
Enable BLE support
config ESP32_I2C0
bool "I2C 0"
default n
@ -525,11 +532,16 @@ config ESP32_AES_ACCELERATOR
endmenu # ESP32 Peripheral Selection
menuconfig ESP32_WIFI_BT_COEXIST
bool "Wi-Fi and BT coexist"
default n
depends on ESP32_WIRELESS && ESP32_BLE
menu "Memory Configuration"
config ESP32_BT_RESERVE_DRAM
int "Reserved BT DRAM"
default 0
default 65536
config ESP32_TRACEMEM_RESERVE_DRAM
int "Reserved trace memory DRAM"
@ -1170,6 +1182,33 @@ endchoice
endmenu # ESP32_WIRELESS
menu "BLE Configuration"
depends on ESP32_BLE
config ESP32_BLE_PKTBUF_NUM
int "BLE netcard packet buffer number per netcard"
default 16
config ESP32_BLE_TTY_NAME
string "BLE TTY device name"
default "/dev/ttyHCI0"
depends on UART_BTH4
config ESP32_BLE_TASK_STACK_SIZE
int "Controller task stack size"
default 4096
config ESP32_BLE_TASK_PRIORITY
int "Controller task priority"
default 110
config ESP32_BLE_MAX_CONN
int "Maximum BLE simultaneous connections"
range 1 3
default 1
endmenu # BLE Configuration
menu "Real-Time Timer"
depends on ESP32_RT_TIMER

View File

@ -231,7 +231,12 @@ INCLUDES += $(shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)chip$(DELIM)esp-wire
CHIP_CSRCS += esp32_wlan.c esp32_wifi_utils.c esp32_wifi_adapter.c
EXTRA_LIBPATHS += -L $(ARCH_SRCDIR)$(DELIM)chip$(DELIM)esp-wireless-drivers-3rdparty$(DELIM)libs$(DELIM)esp32
EXTRA_LIBS += -lcore -lrtc -lnet80211 -lpp -lsmartconfig -lcoexist -lespnow -lphy -lwpa_supplicant
EXTRA_LIBS += -lcore -lrtc -lnet80211 -lpp -lsmartconfig -lespnow -lphy -lwpa_supplicant
ifeq ($(CONFIG_ESP32_BLE),y)
CHIP_CSRCS += esp32_ble_adapter.c esp32_ble.c
EXTRA_LIBS += -lbtdm_app -lcoexist
endif
# Due to some Wi-Fi related libraries, the option is need to avoid linking too much
# unused functions.

View File

@ -133,7 +133,7 @@ void xtensa_add_region(void)
#endif
#endif
#ifndef CONFIG_ESP32_QEMU_IMAGE
#if !defined(CONFIG_ESP32_QEMU_IMAGE) && !defined(CONFIG_ESP32_BLE)
start = (void *)HEAP_REGION0_START;
size = (size_t)(HEAP_REGION0_END - HEAP_REGION0_START);
umm_addregion(start, size);

View File

@ -0,0 +1,346 @@
/****************************************************************************
* arch/xtensa/src/esp32/esp32_ble.c
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#include <sys/types.h>
#include <sys/socket.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <queue.h>
#include <debug.h>
#include <nuttx/nuttx.h>
#include <nuttx/kmalloc.h>
#include <nuttx/wqueue.h>
#include <nuttx/net/bluetooth.h>
#include <nuttx/wireless/bluetooth/bt_driver.h>
#include <nuttx/wireless/bluetooth/bt_uart.h>
#if defined(CONFIG_UART_BTH4)
#include <nuttx/serial/uart_bth4.h>
#endif
#include "esp32_ble_adapter.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* BLE packet buffer max number */
#define BLE_BUF_NUM CONFIG_ESP32_BLE_PKTBUF_NUM
/* BLE packet buffer max size */
#define BLE_BUF_SIZE 1024
/* Low-priority work queue process RX/TX */
#define BLE_WORK LPWORK
/****************************************************************************
* Private Types
****************************************************************************/
struct esp32_ble_priv_s
{
struct bt_driver_s drv; /* NuttX BT/BLE driver data */
};
/****************************************************************************
* Private Function Prototypes
****************************************************************************/
static int esp32_ble_open(struct bt_driver_s *drv);
static int esp32_ble_send(struct bt_driver_s *drv,
enum bt_buf_type_e type,
void *data, size_t len);
static void esp32_ble_close(struct bt_driver_s *drv);
static void esp32_ble_send_ready(void);
static int esp32_ble_recv_cb(uint8_t *data, uint16_t len);
/****************************************************************************
* Private Data
****************************************************************************/
static struct esp32_ble_priv_s g_ble_priv =
{
.drv =
{
.head_reserve = H4_HEADER_SIZE,
.open = esp32_ble_open,
.send = esp32_ble_send,
.close = esp32_ble_close
}
};
static esp_vhci_host_callback_t vhci_host_cb =
{
.notify_host_send_available = esp32_ble_send_ready,
.notify_host_recv = esp32_ble_recv_cb
};
/****************************************************************************
* Private Functions
****************************************************************************/
/****************************************************************************
* Name: esp32_ble_send_ready
*
* Description:
* If the controller could send an HCI command, this function is called.
*
* Input Parameters:
* None
*
* Returned Value:
* None
*
****************************************************************************/
static void esp32_ble_send_ready(void)
{
}
/****************************************************************************
* Name: esp32_ble_recv_cb
*
* Description:
* BLE receive callback function when BLE hardware receives a packet.
*
* Input Parameters:
* data - BLE packet data pointer
* len - BLE packet length
*
* Returned Value:
* 0 on success or a negated value on failure.
*
****************************************************************************/
static int esp32_ble_recv_cb(uint8_t *data, uint16_t len)
{
int ret;
bool valid;
enum bt_buf_type_e type;
struct esp32_ble_priv_s *priv = &g_ble_priv;
wlinfo("len = %d\n", len);
wlinfo("host recv pkt: ");
for (uint16_t i = 0; i < len; i++)
{
wlinfo("%02x\n", data[i]);
}
switch (data[0])
{
case H4_EVT:
type = BT_EVT;
valid = true;
break;
case H4_ACL:
type = BT_ACL_IN;
valid = true;
break;
case H4_ISO:
type = BT_ISO_IN;
valid = true;
break;
default:
valid = false;
break;
}
if (!valid)
{
wlerr("Invalid H4 header \n");
ret = ERROR;
}
else
{
/* Send packet to host */
ret = bt_netdev_receive(&priv->drv, type,
&data[H4_HEADER_SIZE],
len - H4_HEADER_SIZE);
if (ret < 0)
{
wlerr("Failed to receive ret=%d\n", ret);
}
}
return ret;
}
/****************************************************************************
* Name: esp32_ble_send
*
* Description:
* ESP32 BLE send callback function for BT driver.
*
* Input Parameters:
* drv - BT driver pointer
* type - BT packet type
* data - BT packet data buffer pointer
* len - BT packet length
*
* Returned Value:
* Sent bytes on success or a negated value on failure.
*
****************************************************************************/
static int esp32_ble_send(struct bt_driver_s *drv,
enum bt_buf_type_e type,
void *data, size_t len)
{
uint8_t *hdr = (uint8_t *)data - drv->head_reserve;
if ((len + H4_HEADER_SIZE) > BLE_BUF_SIZE)
{
return -EOVERFLOW;
}
if (type == BT_CMD)
{
*hdr = H4_CMD;
}
else if (type == BT_ACL_OUT)
{
*hdr = H4_ACL;
}
else if (type == BT_ISO_OUT)
{
*hdr = H4_ISO;
}
else
{
wlerr("Unknown BT packet type 0x%x\n", type);
return -EINVAL;
}
if (esp32_vhci_host_check_send_available())
{
esp32_vhci_host_send_packet(hdr, len + drv->head_reserve);
}
return len;
}
/****************************************************************************
* Name: esp32_ble_close
*
* Description:
* ESP32-C3 BLE close callback function for BT driver.
*
* Input Parameters:
* drv - BT driver pointer
*
* Returned Value:
* None
*
****************************************************************************/
static void esp32_ble_close(struct bt_driver_s *drv)
{
}
/****************************************************************************
* Name: esp32_ble_open
*
* Description:
* ESP32-C3 BLE open callback function for BT driver.
*
* Input Parameters:
* drv - BT driver pointer
*
* Returned Value:
* OK
*
****************************************************************************/
static int esp32_ble_open(struct bt_driver_s *drv)
{
return OK;
}
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: esp32_ble_initialize
*
* Description:
* Init BT controller
*
* Input Parameters:
* None
*
* Returned Value:
* OK on success or a negated value on failure.
*
****************************************************************************/
int esp32_ble_initialize(void)
{
int ret;
ret = esp32_bt_controller_init();
if (ret)
{
wlerr("Failed to initialize BLE ret=%d\n", ret);
return ERROR;
}
ret = esp32_bt_controller_enable(ESP_BT_MODE_BLE);
if (ret)
{
wlerr("Failed to Enable BLE ret=%d\n", ret);
return ERROR;
}
ret = esp32_vhci_register_callback(&vhci_host_cb);
if (ret)
{
wlerr("Failed to register BLE callback ret=%d\n", ret);
return ERROR;
}
#if defined(CONFIG_UART_BTH4)
ret = uart_bth4_register(CONFIG_BT_UART_ON_DEV_NAME, &g_ble_priv.drv);
#else
ret = bt_netdev_register(&g_ble_priv.drv);
#endif
if (ret < 0)
{
wlerr("bt_netdev_register or uart_bth4_register error: %d\n", ret);
return ret;
}
return OK;
}

View File

@ -0,0 +1,50 @@
/****************************************************************************
* arch/xtensa/src/esp32/esp32_ble.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
#ifndef __ARCH_XTENSA_SRC_ESP32_ESP32_BLE_H
#define __ARCH_XTENSA_SRC_ESP32_ESP32_BLE_H
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
/****************************************************************************
* Name: esp32_ble_initialize
*
* Description:
* Init BT controller
*
* Input Parameters:
* None
*
* Returned Value:
* success or fail
*
****************************************************************************/
int esp32_ble_initialize(void);
#endif /* __ARCH_XTENSA_SRC_ESP32_ESP32_BLE_H */

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,200 @@
/****************************************************************************
* arch/xtensa/src/esp32/esp32_ble_adapter.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
#ifndef __ARCH_XTENSA_SRC_ESP32_ESP32_BLE_ADAPTER_H
#define __ARCH_XTENSA_SRC_ESP32_ESP32_BLE_ADAPTER_H
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <stdint.h>
#include <stdbool.h>
#include "esp_bt.h"
/* Bluetooth system and controller config */
#define BTDM_CFG_BT_DATA_RELEASE (1 << 0)
#define BTDM_CFG_HCI_UART (1 << 1)
#define BTDM_CFG_CONTROLLER_RUN_APP_CPU (1 << 2)
#define BTDM_CFG_SCAN_DUPLICATE_OPTIONS (1 << 3)
#define BTDM_CFG_SEND_ADV_RESERVED_SIZE (1 << 4)
#define BTDM_CFG_BLE_FULL_SCAN_SUPPORTED (1 << 5)
/* Bluetooth memory regions */
#define SOC_MEM_BT_DATA_START 0x3ffae6e0
#define SOC_MEM_BT_DATA_END 0x3ffaff10
#define SOC_MEM_BT_EM_START 0x3ffb0000
#define SOC_MEM_BT_EM_END 0x3ffb7cd8
#define SOC_MEM_BT_EM_BTDM0_START 0x3ffb0000
#define SOC_MEM_BT_EM_BTDM0_END 0x3ffb09a8
#define SOC_MEM_BT_EM_BLE_START 0x3ffb09a8
#define SOC_MEM_BT_EM_BLE_END 0x3ffb1ddc
#define SOC_MEM_BT_EM_BTDM1_START 0x3ffb1ddc
#define SOC_MEM_BT_EM_BTDM1_END 0x3ffb2730
#define SOC_MEM_BT_EM_BREDR_START 0x3ffb2730
#define SOC_MEM_BT_EM_BREDR_NO_SYNC_END 0x3ffb6388 /* Not calculate with synchronize connection support */
#define SOC_MEM_BT_EM_BREDR_END 0x3ffb7cd8 /* Calculate with synchronize connection support */
#define SOC_MEM_BT_EM_SYNC0_START 0x3ffb6388
#define SOC_MEM_BT_EM_SYNC0_END 0x3ffb6bf8
#define SOC_MEM_BT_EM_SYNC1_START 0x3ffb6bf8
#define SOC_MEM_BT_EM_SYNC1_END 0x3ffb7468
#define SOC_MEM_BT_EM_SYNC2_START 0x3ffb7468
#define SOC_MEM_BT_EM_SYNC2_END 0x3ffb7cd8
#define SOC_MEM_BT_BSS_START 0x3ffb8000
#define SOC_MEM_BT_BSS_END 0x3ffb9a20
#define SOC_MEM_BT_MISC_START 0x3ffbdb28
#define SOC_MEM_BT_MISC_END 0x3ffbdb5c
#define SOC_MEM_BT_EM_PER_SYNC_SIZE 0x870
#define SOC_MEM_BT_EM_BREDR_REAL_END (SOC_MEM_BT_EM_BREDR_NO_SYNC_END + CONFIG_BTDM_CTRL_BR_EDR_MAX_SYNC_CONN_EFF * SOC_MEM_BT_EM_PER_SYNC_SIZE)
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
/****************************************************************************
* Name: esp32_bt_controller_init
*
* Description:
* Init BT controller.
*
* Input Parameters:
* None
*
* Returned Value:
* None
*
****************************************************************************/
int esp32_bt_controller_init(void);
/****************************************************************************
* Name: esp32_bt_controller_deinit
*
* Description:
* Deinit BT controller.
* Input Parameters:
* cfg - Initial configuration of BT controller.
*
* Returned Value:
* None
*
****************************************************************************/
int esp32_bt_controller_deinit(void);
/****************************************************************************
* Name: esp32_bt_controller_enable
*
* Description:
* disable BT controller.
* Input Parameters:
* None
*
* Returned Value:
* None
*
****************************************************************************/
int esp32_bt_controller_enable(esp_bt_mode_t mode);
/****************************************************************************
* Name: esp32_bt_controller_disable
*
* Description:
* disable BT controller.
* Input Parameters:
* None
*
* Returned Value:
* None
*
****************************************************************************/
int esp32_bt_controller_disable(void);
/****************************************************************************
* Name: esp32_bt_controller_enable
*
* Description:
* Enable BT controller.
* Input Parameters:
* None
*
* Returned Value:
* None
*
****************************************************************************/
esp_bt_controller_status_t esp32_bt_controller_get_status(void);
/****************************************************************************
* Name: esp32_vhci_host_check_send_available
*
* Description:
* used for check actively if the host can send packet to controller or not.
* Input Parameters:
* None
*
* Returned Value:
* bool - true or false
*
****************************************************************************/
bool esp32_vhci_host_check_send_available(void);
/****************************************************************************
* Name: esp32_vhci_host_send_packet
*
* Description:
* host send packet to controller.
* Input Parameters:
* data - the packet point
* len - the packet length
*
* Returned Value:
* None
*
****************************************************************************/
void esp32_vhci_host_send_packet(uint8_t *data, uint16_t len);
/****************************************************************************
* Name: esp32_vhci_register_callback
*
* Description:
* register the vhci reference callback.
* Input Parameters:
* callback - struct defined by vhci_host_callback structure.
*
* Returned Value:
* status - success or fail
*
****************************************************************************/
int esp32_vhci_register_callback(
const esp_vhci_host_callback_t *callback);
#endif /* __ARCH_XTENSA_SRC_ESP32_ESP32_BLE_ADAPTER_H */

View File

@ -102,6 +102,14 @@
# define ESP32_WIRELESS_RESERVE_INT 0
#endif
#ifdef CONFIG_ESP32_BLE
# define ESP32_BLE_RESERVE_INT ((1 << ESP32_PERIPH_BT_BB_NMI) | \
(1 << ESP32_PERIPH_RWBLE_IRQ) | \
(1 << ESP32_PERIPH_RWBT_NMI))
#else
# define ESP32_BLE_RESERVE_INT 0
#endif
/****************************************************************************
* Public Data
****************************************************************************/
@ -171,10 +179,12 @@ static uint32_t g_intenable[1];
*/
static uint32_t g_cpu0_freeints = ESP32_CPUINT_PERIPHSET &
(~ESP32_WIRELESS_RESERVE_INT);
(~ESP32_WIRELESS_RESERVE_INT &
~ESP32_BLE_RESERVE_INT);
#ifdef CONFIG_SMP
static uint32_t g_cpu1_freeints = ESP32_CPUINT_PERIPHSET &
(~ESP32_WIRELESS_RESERVE_INT);
(~ESP32_WIRELESS_RESERVE_INT &
~ESP32_BLE_RESERVE_INT);
#endif
/* Bitsets for each interrupt priority 1-5 */
@ -464,6 +474,12 @@ void up_irqinitialize(void)
g_irqmap[ESP32_IRQ_MAC] = IRQ_MKMAP(0, ESP32_CPUINT_MAC);
#endif
#ifdef CONFIG_ESP32_BLE
g_irqmap[ESP32_IRQ_BT_BB_NMI] = IRQ_MKMAP(0, ESP32_PERIPH_BT_BB_NMI);
g_irqmap[ESP32_IRQ_RWBT_NMI] = IRQ_MKMAP(0, ESP32_PERIPH_RWBT_NMI);
g_irqmap[ESP32_IRQ_RWBLE_IRQ] = IRQ_MKMAP(0, ESP32_PERIPH_RWBLE_IRQ);
#endif
/* Initialize CPU interrupts */
esp32_cpuint_initialize();
@ -743,6 +759,15 @@ int esp32_cpuint_initialize(void)
xtensa_enable_cpuint(&g_intenable[0], 1 << ESP32_CPUINT_MAC);
#endif
#ifdef CONFIG_ESP32_BLE
intmap[ESP32_PERIPH_BT_BB_NMI] = CPUINT_ASSIGN(ESP32_IRQ_BT_BB_NMI);
intmap[ESP32_PERIPH_RWBT_NMI] = CPUINT_ASSIGN(ESP32_IRQ_RWBT_NMI);
intmap[ESP32_PERIPH_RWBLE_IRQ] = CPUINT_ASSIGN(ESP32_IRQ_RWBLE_IRQ);
xtensa_enable_cpuint(&g_intenable[0], 1 << ESP32_PERIPH_BT_BB_NMI);
xtensa_enable_cpuint(&g_intenable[0], 1 << ESP32_PERIPH_RWBT_NMI);
xtensa_enable_cpuint(&g_intenable[0], 1 << ESP32_PERIPH_RWBLE_IRQ);
#endif
return OK;
}

View File

@ -349,6 +349,8 @@ static void *wifi_coex_get_schm_curr_phase(void);
static int wifi_coex_set_schm_curr_phase_idx(int idx);
static int wifi_coex_get_schm_curr_phase_idx(void);
extern void coex_bt_high_prio(void);
/****************************************************************************
* Public Functions declaration
****************************************************************************/
@ -2495,6 +2497,7 @@ static void wifi_phy_enable(void)
esp_phy_enable_clock();
phy_set_wifi_mode_only(0);
register_chipv7_phy(&phy_init_data, cal_data, PHY_RF_CAL_NONE);
coex_bt_high_prio();
}
g_phy_access_ref++;
@ -2603,7 +2606,7 @@ int32_t esp_read_mac(uint8_t *mac, esp_mac_type_t type)
uint8_t crc;
int i;
if (type > ESP_MAC_WIFI_SOFTAP)
if (type > ESP_MAC_BT)
{
wlerr("Input type is error=%d\n", type);
return -1;
@ -2645,6 +2648,22 @@ int32_t esp_read_mac(uint8_t *mac, esp_mac_type_t type)
}
}
if (type == ESP_MAC_BT)
{
tmp = mac[0];
for (i = 0; i < 64; i++)
{
mac[0] = tmp | 0x02;
mac[0] ^= i << 2;
if (mac[0] != tmp)
{
break;
}
}
mac[5] += 1;
}
return 0;
}

View File

@ -26,6 +26,7 @@
****************************************************************************/
#include <nuttx/config.h>
#include <nuttx/wireless/wireless.h>
#include <sys/types.h>

View File

@ -1184,7 +1184,8 @@
#define DPORT_SLAVE_SPI_MASK_PRO_V 0x1
#define DPORT_SLAVE_SPI_MASK_PRO_S 0
#define DPORT_WIFI_CLK_EN_REG (DR_REG_DPORT_BASE + 0x0CC)
#define DPORT_WIFI_CLK_EN_REG (DR_REG_DPORT_BASE + 0x0cc)
#define DPORT_CORE_RST_EN_REG (DR_REG_DPORT_BASE + 0x0d0)
#define DPORT_EMAC_CLK_EN (BIT(14))

View File

@ -93,6 +93,17 @@ SECTIONS
. = ALIGN (8);
_sbss = ABSOLUTE(.);
_bss_start = ABSOLUTE(.);
*(.ext_ram.bss*)
_bt_bss_start = ABSOLUTE(.);
*libbt.a:(.bss .bss.* COMMON)
. = ALIGN (4);
_bt_bss_end = ABSOLUTE(.);
_btdm_bss_start = ABSOLUTE(.);
*libbtdm_app.a:(.bss .bss.* COMMON)
. = ALIGN (4);
_btdm_bss_end = ABSOLUTE(.);
. = ALIGN (8);
*(.dynsbss)
*(.sbss)
*(.sbss.*)
@ -109,6 +120,7 @@ SECTIONS
*(COMMON)
*libarch.a:esp32_spiflash.*(.bss .bss.* COMMON)
. = ALIGN(8);
_bss_end = ABSOLUTE(.);
_ebss = ABSOLUTE(.);
} >dram0_0_seg
@ -126,6 +138,14 @@ SECTIONS
/* .data initialized on power-up in ROMed configurations. */
_sdata = ABSOLUTE(.);
_bt_data_start = ABSOLUTE(.);
*libbt.a:(.data .data.*)
. = ALIGN (4);
_bt_data_end = ABSOLUTE(.);
_btdm_data_start = ABSOLUTE(.);
*libbtdm_app.a:(.data .data.*)
. = ALIGN (4);
_btdm_data_end = ABSOLUTE(.);
KEEP (*(.data))
KEEP (*(.data.*))
KEEP (*(.gnu.linkonce.d.*))

View File

@ -34,6 +34,7 @@
****************************************************************************/
#include <nuttx/config.h>
#include "esp32_aliases.ld"
#ifdef CONFIG_ESP32_FLASH_2M
# define FLASH_SIZE 0x200000

View File

@ -0,0 +1,31 @@
/****************************************************************************
* boards/xtensa/esp32/common/scripts/esp32_aliases.ld
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
#include <nuttx/config.h>
/* Lower-case aliases for symbols not compliant to nxstyle */
/* Bluetooth needs symbol alias, to be removed after IDF rename it */
#ifdef CONFIG_ESP32_BLE
api_vhci_host_check_send_available = API_vhci_host_check_send_available;
api_vhci_host_send_packet = API_vhci_host_send_packet;
api_vhci_host_register_callback = API_vhci_host_register_callback;
#endif

View File

@ -181,11 +181,11 @@ PROVIDE ( _sbss_btdm = 0x3ffb8000);
PROVIDE ( _ebss_btdm = 0x3ffbff70);
PROVIDE ( _daylight = 0x3ffae0a4 );
PROVIDE ( dbg_default_handler = 0x3ff97218 );
PROVIDE ( dbg_default_state = 0x3ff97220 );
PROVIDE ( dbg_state = 0x3ffb8d5d );
PROVIDE ( DebugE256PublicKey_x = 0x3ff97428 );
PROVIDE ( DebugE256PublicKey_y = 0x3ff97408 );
PROVIDE ( DebugE256SecretKey = 0x3ff973e8 );
PROVIDE ( _DebugExceptionVector = 0x40000280 );
PROVIDE ( debug_timer = 0x3ffe042c );
PROVIDE ( debug_timerfn = 0x3ffe0430 );
PROVIDE ( dh_group14_generator = 0x3ff9ac60 );
@ -373,6 +373,7 @@ PROVIDE ( hci_cmd_desc_tab_testing = 0x3ff97a98 );
PROVIDE ( hci_cmd_desc_tab_vs = 0x3ff97714 );
PROVIDE ( hci_command_handler = 0x4004c928 );
PROVIDE ( hci_env = 0x3ffb9350 );
PROVIDE ( rwip_env = 0x3ffb8bcc );
PROVIDE ( hci_evt_dbg_desc_tab = 0x3ff9750c );
PROVIDE ( hci_evt_desc_tab = 0x3ff9751c );
PROVIDE ( hci_evt_le_desc_tab = 0x3ff974b4 );
@ -406,6 +407,8 @@ PROVIDE ( __itoa = 0x40056678 );
PROVIDE ( jd_decomp = 0x400613e8 );
PROVIDE ( jd_prepare = 0x40060fa8 );
PROVIDE ( ke_env = 0x3ffb93cc );
PROVIDE ( ke_handler_search = 0x4001a430 );
PROVIDE ( ke_task_env = 0x3ffb81d4 );
PROVIDE ( _KernelExceptionVector = 0x40000300 );
PROVIDE ( _kill_r = 0x4000bd10 );
PROVIDE ( labs = 0x40056370 );
@ -449,9 +452,18 @@ PROVIDE ( llc_state = 0x3ffb96f8 );
PROVIDE ( lldesc_build_chain = 0x4000a850 );
PROVIDE ( lldesc_num2link = 0x4000a948 );
PROVIDE ( lldesc_set_owner = 0x4000a974 );
PROVIDE ( lld_evt_deferred_elt_push = 0x400466b4 );
PROVIDE ( lld_evt_deferred_elt_pop = 0x400466dc );
PROVIDE ( lld_evt_winsize_change = 0x40046730 );
PROVIDE ( lld_evt_rxwin_compute = 0x400467c8 );
PROVIDE ( lld_evt_slave_time_compute = 0x40046818 );
PROVIDE ( lld_evt_env = 0x3ffb9704 );
PROVIDE ( lld_evt_elt_wait_get = 0x400468e4 );
PROVIDE ( lld_evt_get_next_free_slot = 0x4004692c );
PROVIDE ( lld_pdu_adv_pk_desc_tab = 0x3ff98c70 );
PROVIDE ( lld_pdu_llcp_pk_desc_tab = 0x3ff98b68 );
PROVIDE ( lld_pdu_tx_flush_list = 0x4004a760 );
PROVIDE ( lld_pdu_pack = 0x4004ab14 );
PROVIDE ( LLM_AA_CT1 = 0x3ff98d8a );
PROVIDE ( LLM_AA_CT2 = 0x3ff98d88 );
PROVIDE ( llm_default_handler = 0x3ff98d80 );
@ -581,6 +593,9 @@ PROVIDE ( r_E1 = 0x400108e8 );
PROVIDE ( r_E21 = 0x40010968 );
PROVIDE ( r_E22 = 0x400109b4 );
PROVIDE ( r_E3 = 0x40010a58 );
PROVIDE ( lm_n192_mod_mul = 0x40011dc0 );
PROVIDE ( lm_n192_mod_add = 0x40011e9c );
PROVIDE ( lm_n192_mod_sub = 0x40011eec );
PROVIDE ( r_ea_alarm_clear = 0x40015ab4 );
PROVIDE ( r_ea_alarm_set = 0x40015a10 );
PROVIDE ( read = 0x400017dc );
@ -598,6 +613,8 @@ PROVIDE ( r_ea_interval_insert = 0x4001557c );
PROVIDE ( r_ea_interval_remove = 0x40015590 );
PROVIDE ( realloc = 0x4000becc );
PROVIDE ( _realloc_r = 0x4000bbe0 );
PROVIDE ( ea_conflict_check = 0x40014e9c );
PROVIDE ( ea_prog_timer = 0x40014f88 );
PROVIDE ( r_ea_offset_req = 0x40015748 );
PROVIDE ( r_ea_sleep_check = 0x40015928 );
PROVIDE ( r_ea_sw_isr = 0x40015724 );
@ -609,6 +626,7 @@ PROVIDE ( r_ecc_gen_new_public_key = 0x400170c0 );
PROVIDE ( r_ecc_gen_new_secret_key = 0x400170e4 );
PROVIDE ( r_ecc_get_debug_Keys = 0x40017224 );
PROVIDE ( r_ecc_init = 0x40016dbc );
PROVIDE ( ecc_point_multiplication_uint8_256 = 0x40016804 );
PROVIDE ( RecvBuff = 0x3ffe009c );
PROVIDE ( recv_packet = 0x40009424 );
PROVIDE ( r_em_buf_init = 0x4001729c );
@ -910,6 +928,118 @@ PROVIDE ( r_lc_util_get_offset_clke = 0x4002f538 );
PROVIDE ( r_lc_util_get_offset_clkn = 0x4002f51c );
PROVIDE ( r_lc_util_set_loc_trans_coll = 0x4002f500 );
PROVIDE ( r_lc_version = 0x40020a30 );
PROVIDE ( lc_set_encap_pdu_data_p192 = 0x4002e4c8 );
PROVIDE ( lc_set_encap_pdu_data_p256 = 0x4002e454 );
PROVIDE ( lm_get_auth_method = 0x40023420 );
PROVIDE ( lmp_accepted_ext_handler = 0x40027290 );
PROVIDE ( lmp_not_accepted_ext_handler = 0x40029c54 );
PROVIDE ( lmp_clk_adj_handler = 0x40027468 );
PROVIDE ( lmp_clk_adj_ack_handler = 0x400274f4 );
PROVIDE ( lm_get_auth_method = 0x40023420 );
PROVIDE ( lmp_accepted_ext_handler = 0x40027290 );
PROVIDE ( lmp_not_accepted_ext_handler = 0x40029c54 );
PROVIDE ( lmp_clk_adj_handler = 0x40027468 );
PROVIDE ( lmp_clk_adj_ack_handler = 0x400274f4 );
PROVIDE ( lmp_clk_adj_req_handler = 0x4002751c );
PROVIDE ( lmp_feats_res_ext_handler = 0x4002cac4 );
PROVIDE ( lmp_feats_req_ext_handler = 0x4002ccb0 );
PROVIDE ( lmp_pkt_type_tbl_req_handler = 0x40027574 );
PROVIDE ( lmp_esco_link_req_handler = 0x40027610 );
PROVIDE ( lmp_rmv_esco_link_req_handler = 0x400276e8 );
PROVIDE ( lmp_ch_class_req_handler = 0x40027730 );
PROVIDE ( lmp_ch_class_handler = 0x4002ca18 );
PROVIDE ( lmp_ssr_req_handler = 0x4002780c );
PROVIDE ( lmp_ssr_res_handler = 0x40027900 );
PROVIDE ( lmp_pause_enc_aes_req_handler = 0x400279a4 );
PROVIDE ( lmp_pause_enc_req_handler = 0x4002df90 );
PROVIDE ( lmp_resume_enc_req_handler = 0x4002e084 );
PROVIDE ( lmp_num_comparison_fail_handler = 0x40027a74 );
PROVIDE ( lmp_passkey_fail_handler = 0x40027aec );
PROVIDE ( lmp_keypress_notif_handler = 0x4002c5c8 );
PROVIDE ( lmp_pwr_ctrl_req_handler = 0x400263bc );
PROVIDE ( lmp_pwr_ctrl_res_handler = 0x40026480 );
PROVIDE ( lmp_auto_rate_handler = 0x40026548 );
PROVIDE ( lmp_pref_rate_handler = 0x4002657c );
PROVIDE ( lmp_name_req_handler = 0x40025050 );
PROVIDE ( lmp_name_res_handler = 0x400250bc );
PROVIDE ( lmp_not_accepted_handler = 0x400251d0 );
PROVIDE ( lmp_accepted_handler = 0x4002e894 );
PROVIDE ( lmp_clk_off_req_handler = 0x40025a44 );
PROVIDE ( lmp_clk_off_res_handler = 0x40025ab8 );
PROVIDE ( lmp_detach_handler = 0x40025b74 );
PROVIDE ( lmp_tempkey_handler = 0x4002b6b0 );
PROVIDE ( lmp_temprand_handler = 0x4002b74c );
PROVIDE ( lmp_sres_handler = 0x4002b840 );
PROVIDE ( lmp_aurand_handler = 0x4002bda0 );
PROVIDE ( lmp_unitkey_handler = 0x4002c13c );
PROVIDE ( lmp_combkey_handler = 0x4002c234 );
PROVIDE ( lmp_inrand_handler = 0x4002c414 );
PROVIDE ( lmp_oob_fail_handler = 0x40027b84 );
PROVIDE ( lmp_ping_req_handler = 0x40027c08 );
PROVIDE ( lmp_ping_res_handler = 0x40027c5c );
PROVIDE ( lmp_enc_mode_req_handler = 0x40025c60 );
PROVIDE ( lmp_enc_key_size_req_handler = 0x40025e54 );
PROVIDE ( lmp_switch_req_handler = 0x40025f84 );
PROVIDE ( lmp_start_enc_req_handler = 0x4002e124 );
PROVIDE ( lmp_stop_enc_req_handler = 0x4002de30 );
PROVIDE ( lmp_sniff_req_handler = 0x400260c8 );
PROVIDE ( lmp_unsniff_req_handler = 0x400261e0 );
PROVIDE ( lmp_incr_pwr_req_handler = 0x4002629c );
PROVIDE ( lmp_decr_pwr_req_handler = 0x400262f8 );
PROVIDE ( lmp_max_pwr_handler = 0x40026354 );
PROVIDE ( lmp_min_pwr_handler = 0x40026388 );
PROVIDE ( lmp_ver_req_handler = 0x400265f0 );
PROVIDE ( lmp_ver_res_handler = 0x40026670 );
PROVIDE ( lmp_qos_handler = 0x40026790 );
PROVIDE ( lmp_qos_req_handler = 0x40026844 );
PROVIDE ( lmp_sco_link_req_handler = 0x40026930 );
PROVIDE ( lmp_rmv_sco_link_req_handler = 0x40026a10 );
PROVIDE ( lmp_max_slot_handler = 0x40026a54 );
PROVIDE ( lmp_max_slot_req_handler = 0x40026aac );
PROVIDE ( lmp_timing_accu_req_handler = 0x40026b54 );
PROVIDE ( lmp_timing_accu_res_handler = 0x40026bcc );
PROVIDE ( lmp_setup_cmp_handler = 0x40026c84 );
PROVIDE ( lmp_feats_res_handler = 0x4002b548 );
PROVIDE ( lmp_feats_req_handler = 0x4002b620 );
PROVIDE ( lmp_host_con_req_handler = 0x4002b3d8 );
PROVIDE ( lmp_use_semi_perm_key_handler = 0x4002b4c4 );
PROVIDE ( lmp_slot_off_handler = 0x40026cc8 );
PROVIDE ( lmp_page_mode_req_handler = 0x40026d0c );
PROVIDE ( lmp_page_scan_mode_req_handler = 0x40026d4c );
PROVIDE ( lmp_supv_to_handler = 0x40026d94 );
PROVIDE ( lmp_test_activate_handler = 0x40026e7c );
PROVIDE ( lmp_test_ctrl_handler = 0x40026ee4 );
PROVIDE ( lmp_enc_key_size_mask_req_handler = 0x40027038 );
PROVIDE ( lmp_enc_key_size_mask_res_handler = 0x400270a4 );
PROVIDE ( lmp_set_afh_handler = 0x4002b2e4 );
PROVIDE ( lmp_encaps_hdr_handler = 0x40027120 );
PROVIDE ( lmp_encaps_payl_handler = 0x4002e590 );
PROVIDE ( lmp_sp_nb_handler = 0x4002acf0 );
PROVIDE ( lmp_sp_cfm_handler = 0x4002b170 );
PROVIDE ( lmp_dhkey_chk_handler = 0x4002ab48 );
PROVIDE ( lmp_pause_enc_aes_req_handler = 0x400279a4 );
PROVIDE ( lmp_io_cap_res_handler = 0x4002c670 );
PROVIDE ( lmp_io_cap_req_handler = 0x4002c7a4 );
PROVIDE ( lc_cmd_cmp_bd_addr_send = 0x4002cec4 );
PROVIDE ( ld_acl_tx_packet_type_select = 0x4002fb40 );
PROVIDE ( ld_acl_sched = 0x40033268 );
PROVIDE ( ld_acl_sniff_sched = 0x4003340c );
PROVIDE ( ld_acl_rx = 0x4003274c );
PROVIDE ( ld_acl_tx = 0x4002ffdc );
PROVIDE ( ld_acl_rx_sync = 0x4002fbec );
PROVIDE ( ld_acl_rx_sync2 = 0x4002fd8c );
PROVIDE ( ld_acl_rx_no_sync = 0x4002fe78 );
PROVIDE ( ld_acl_clk_isr = 0x40030cf8 );
PROVIDE ( ld_acl_rsw_frm_cbk = 0x40033bb0 );
PROVIDE ( ld_sco_modify = 0x40031778 );
PROVIDE ( lm_cmd_cmp_send = 0x40051838 );
PROVIDE ( ld_sco_frm_cbk = 0x400349dc );
PROVIDE ( ld_acl_sco_rsvd_check = 0x4002fa94 );
PROVIDE ( ld_acl_sniff_frm_cbk = 0x4003482c );
PROVIDE ( ld_inq_end = 0x4003ab48 );
PROVIDE ( ld_inq_sched = 0x4003aba4 );
PROVIDE ( ld_inq_frm_cbk = 0x4003ae4c );
PROVIDE ( ld_pscan_frm_cbk = 0x4003ebe4 );
PROVIDE ( r_ld_acl_active_hop_types_get = 0x40036e10 );
PROVIDE ( r_ld_acl_afh_confirm = 0x40036d40 );
PROVIDE ( r_ld_acl_afh_prepare = 0x40036c84 );
@ -954,6 +1084,11 @@ PROVIDE ( r_ld_acl_timing_accuracy_set = 0x4003673c );
PROVIDE ( r_ld_acl_t_poll_get = 0x40036024 );
PROVIDE ( r_ld_acl_t_poll_set = 0x40036068 );
PROVIDE ( r_ld_acl_tx_enc = 0x400362f8 );
PROVIDE ( ld_acl_frm_cbk = 0x40034414 );
PROVIDE ( ld_acl_rsw_end = 0x40032bc0 );
PROVIDE ( ld_acl_end = 0x40033140 );
PROVIDE ( ld_acl_resched = 0x40033814 );
PROVIDE ( ld_acl_test_mode_update = 0x40032050 );
PROVIDE ( r_ld_acl_unsniff = 0x400361e0 );
PROVIDE ( r_ld_active_check = 0x4003cac4 );
PROVIDE ( r_ld_afh_ch_assess_data_get = 0x4003caec );
@ -1333,6 +1468,13 @@ PROVIDE ( r_lm_num_clk_adj_ack_pending_set = 0x4004f500 );
PROVIDE ( r_lm_oob_f1 = 0x40012e54 );
PROVIDE ( r_lm_pca_sscan_link_get = 0x4004f560 );
PROVIDE ( r_lm_pca_sscan_link_set = 0x4004f550 );
PROVIDE ( nvds_null_read = 0x400542a0 );
PROVIDE ( nvds_null_write = 0x400542a8 );
PROVIDE ( nvds_null_erase = 0x400542b0 );
PROVIDE ( nvds_read = 0x400542c4 );
PROVIDE ( nvds_write = 0x400542fc );
PROVIDE ( nvds_erase = 0x40054334 );
PROVIDE ( nvds_init_memory = 0x40054358 );
PROVIDE ( r_lmp_pack = 0x4001135c );
PROVIDE ( r_lmp_unpack = 0x4001149c );
PROVIDE ( r_lm_read_features = 0x4004f0d8 );
@ -1823,7 +1965,23 @@ PROVIDE ( Xthal_intlevel = 0x3ff9c2b4 );
PROVIDE ( xthal_memcpy = 0x4000c0bc );
PROVIDE ( xthal_set_ccompare = 0x4000c058 );
PROVIDE ( xthal_set_intclear = 0x4000c1ec );
PROVIDE ( _xtos_set_intlevel = 0x4000bfdc );
PROVIDE ( g_ticks_per_us_pro = 0x3ffe01e0 );
PROVIDE ( g_ticks_per_us_app = 0x3ffe40f0 );
PROVIDE ( esp_rom_spiflash_config_param = 0x40063238 );
PROVIDE ( esp_rom_spiflash_read_user_cmd = 0x400621b0 );
PROVIDE ( esp_rom_spiflash_write_encrypted_disable = 0x40062e60 );
PROVIDE ( esp_rom_spiflash_write_encrypted_enable = 0x40062df4 );
PROVIDE ( esp_rom_spiflash_prepare_encrypted_data = 0x40062e1c );
PROVIDE ( esp_rom_spiflash_select_qio_pins = 0x40061ddc );
PROVIDE ( esp_rom_spiflash_attach = 0x40062a6c );
PROVIDE ( esp_rom_spiflash_config_clk = 0x40062bc8 );
PROVIDE ( g_rom_spiflash_chip = 0x3ffae270 );
PROVIDE ( hci_le_rd_rem_used_feats_cmd_handler = 0x400417b4 );
PROVIDE ( llcp_length_req_handler = 0x40043808 );
PROVIDE ( llcp_unknown_rsp_handler = 0x40043ba8 );
PROVIDE ( llcp_channel_map_req_handler = 0x4004291c );
PROVIDE ( llcp_con_up_req_handler = 0x400426f0 );
PROVIDE ( _xtos_alloca_handler = 0x40000010 );
PROVIDE ( _xtos_cause3_handler = 0x40000dd8 );
PROVIDE ( _xtos_c_handler_table = 0x3ffe0548 );
@ -1858,3 +2016,35 @@ PROVIDE ( esp_rom_spiflash_prepare_encrypted_data = 0x40062e1c );
PROVIDE ( esp_rom_printf = ets_printf );
PROVIDE ( esp_rom_delay_us = ets_delay_us );
/* Following are static data, but can be used, not generated by script <<<<< btdm data */
PROVIDE ( hci_tl_env = 0x3ffb8154 );
PROVIDE ( ld_acl_env = 0x3ffb8258 );
PROVIDE ( ea_env = 0x3ffb80ec );
PROVIDE ( lc_sco_data_path_config = 0x3ffb81f8 );
PROVIDE ( lc_sco_env = 0x3ffb81fc );
PROVIDE ( ld_active_ch_map = 0x3ffb8334 );
PROVIDE ( ld_bcst_acl_env = 0x3ffb8274 );
PROVIDE ( ld_csb_rx_env = 0x3ffb8278 );
PROVIDE ( ld_csb_tx_env = 0x3ffb827c );
PROVIDE ( ld_env = 0x3ffb9510 );
PROVIDE ( ld_fm_env = 0x3ffb8284 );
PROVIDE ( ld_inq_env = 0x3ffb82e4 );
PROVIDE ( ld_iscan_env = 0x3ffb82e8 );
PROVIDE ( ld_page_env = 0x3ffb82f0 );
PROVIDE ( ld_pca_env = 0x3ffb82f4 );
PROVIDE ( ld_pscan_env = 0x3ffb8308 );
PROVIDE ( ld_sched_env = 0x3ffb830c );
PROVIDE ( ld_sched_params = 0x3ffb96c0 );
PROVIDE ( ld_sco_env = 0x3ffb824c );
PROVIDE ( ld_sscan_env = 0x3ffb832c );
PROVIDE ( ld_strain_env = 0x3ffb8330 );
PROVIDE ( LM_Sniff = 0x3ffb8230 );
PROVIDE ( LM_SniffSubRate = 0x3ffb8214 );
PROVIDE ( prbs_64bytes = 0x3ff98992 );
PROVIDE ( nvds_env = 0x3ffb8364 );
PROVIDE ( nvds_magic_number = 0x3ff9912a );
PROVIDE ( TASK_DESC_LLD = 0x3ff98b58 );
/* Above are static data, but can be used, not generated by script >>>>> btdm data */

View File

@ -0,0 +1,60 @@
#
# This file is autogenerated: PLEASE DO NOT EDIT IT.
#
# You can use "make menuconfig" to make any modifications to the installed .config file.
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
# modifications.
#
# CONFIG_ARCH_LEDS is not set
# CONFIG_NSH_ARGCAT is not set
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
# CONFIG_NSH_CMDPARMS is not set
CONFIG_ALLOW_BSD_COMPONENTS=y
CONFIG_ARCH="xtensa"
CONFIG_ARCH_BOARD="esp32-devkitc"
CONFIG_ARCH_BOARD_ESP32_DEVKITC=y
CONFIG_ARCH_CHIP="esp32"
CONFIG_ARCH_CHIP_ESP32=y
CONFIG_ARCH_CHIP_ESP32WROVER=y
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH_XTENSA=y
CONFIG_BOARD_LOOPSPERMSEC=16717
CONFIG_BTSAK=y
CONFIG_BUILTIN=y
CONFIG_DRIVERS_BLUETOOTH=y
CONFIG_DRIVERS_IEEE80211=y
CONFIG_DRIVERS_WIRELESS=y
CONFIG_ESP32_BLE=y
CONFIG_ESP32_UART0=y
CONFIG_FS_PROCFS=y
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_IDLETHREAD_STACKSIZE=3072
CONFIG_INTELHEX_BINARY=y
CONFIG_MM_REGIONS=3
CONFIG_NETDEV_LATEINIT=y
CONFIG_NET_BLUETOOTH=y
CONFIG_NET_SOCKOPTS=y
CONFIG_NET_TCP=y
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_LINELEN=64
CONFIG_NSH_READLINE=y
CONFIG_PREALLOC_MQ_MSGS=32
CONFIG_PREALLOC_TIMERS=4
CONFIG_PTHREAD_MUTEX_TYPES=y
CONFIG_RAM_SIZE=114688
CONFIG_RAM_START=0x20000000
CONFIG_RAW_BINARY=y
CONFIG_RR_INTERVAL=200
CONFIG_SCHED_WAITPID=y
CONFIG_SPINLOCK=y
CONFIG_START_DAY=6
CONFIG_START_MONTH=12
CONFIG_START_YEAR=2011
CONFIG_SYSTEM_NSH=y
CONFIG_UART0_SERIAL_CONSOLE=y
CONFIG_USER_ENTRYPOINT="nsh_main"
CONFIG_WIRELESS=y
CONFIG_WIRELESS_BLUETOOTH=y

View File

@ -56,7 +56,7 @@ SCRIPTOUT = $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_out.ld
.PHONY = context distclean
$(SCRIPTOUT): $(LDSCRIPT_TEMPLATE) $(CONFIGFILE)
$(Q) $(CC) -isystem $(TOPDIR)/include -C -P -x c -E $(LDSCRIPT_TEMPLATE) -o $@
$(Q) $(CC) -isystem $(TOPDIR)/include -I $(BOARD_COMMON_DIR)$(DELIM)scripts -C -P -x c -E $(LDSCRIPT_TEMPLATE) -o $@
context:: $(SCRIPTOUT)

View File

@ -62,6 +62,10 @@
# include "esp32_board_wdt.h"
#endif
#ifdef CONFIG_ESP32_BLE
# include "esp32_ble.h"
#endif
#ifdef CONFIG_ESP32_WIRELESS
# include "esp32_board_wlan.h"
#endif
@ -221,6 +225,14 @@ int esp32_bringup(void)
}
#endif
#ifdef CONFIG_ESP32_BLE
ret = esp32_ble_initialize();
if (ret)
{
syslog(LOG_ERR, "ERROR: Failed to initialize BLE: %d \n", ret);
}
#endif
#ifdef CONFIG_ESP32_WIRELESS
ret = board_wlan_init();
if (ret < 0)

View File

@ -62,6 +62,10 @@
# include "esp32_rt_timer.h"
#endif
#ifdef CONFIG_ESP32_BLE
# include "esp32_ble.h"
#endif
#ifdef CONFIG_ESP32_WIRELESS
# include "esp32_board_wlan.h"
#endif
@ -166,6 +170,14 @@ int esp32_bringup(void)
}
#endif
#ifdef CONFIG_ESP32_BLE
ret = esp32_ble_initialize();
if (ret)
{
syslog(LOG_ERR, "ERROR: Failed to initialize BLE: %d \n", ret);
}
#endif
#ifdef CONFIG_ESP32_WIRELESS
ret = board_wlan_init();
if (ret < 0)

View File

@ -61,6 +61,10 @@
# include "esp32_board_wdt.h"
#endif
#ifdef CONFIG_ESP32_BLE
# include "esp32_ble.h"
#endif
#ifdef CONFIG_ESP32_WIRELESS
# include "esp32_board_wlan.h"
#endif
@ -200,6 +204,14 @@ int esp32_bringup(void)
}
#endif
#ifdef CONFIG_ESP32_BLE
ret = esp32_ble_initialize();
if (ret)
{
syslog(LOG_ERR, "ERROR: Failed to initialize BLE: %d \n", ret);
}
#endif
#ifdef CONFIG_ESP32_WIRELESS
ret = board_wlan_init();
if (ret < 0)

View File

@ -62,6 +62,10 @@
# include "esp32_board_wdt.h"
#endif
#ifdef CONFIG_ESP32_BLE
# include "esp32_ble.h"
#endif
#ifdef CONFIG_ESP32_WIRELESS
# include "esp32_board_wlan.h"
#endif
@ -192,6 +196,14 @@ int esp32_bringup(void)
}
#endif
#ifdef CONFIG_ESP32_BLE
ret = esp32_ble_initialize();
if (ret)
{
syslog(LOG_ERR, "ERROR: Failed to initialize BLE: %d \n", ret);
}
#endif
#ifdef CONFIG_ESP32_WIRELESS
ret = board_wlan_init();
if (ret < 0)