soc: riscv: esp32c3: added initial support for ble

subsystem by linking esp32 vhci adapter to the
espressif ble controller adapter

Signed-off-by: Felipe Neves <felipe.neves@espressif.com>
This commit is contained in:
Felipe Neves 2021-06-30 19:25:35 -03:00 committed by Christopher Friedt
commit 2474c9b3f3
5 changed files with 40 additions and 1 deletions

View file

@ -6,3 +6,17 @@
config BOARD config BOARD
default "esp32c3" default "esp32c3"
depends on BOARD_ESP32C3_DEVKITM depends on BOARD_ESP32C3_DEVKITM
if BT
config HEAP_MEM_POOL_SIZE
default 16384
config ENTROPY_GENERATOR
default y
choice BT_HCI_BUS_TYPE
default BT_ESP32
endchoice
endif # BT

View file

@ -10,3 +10,6 @@ CONFIG_SERIAL=y
CONFIG_UART_CONSOLE=y CONFIG_UART_CONSOLE=y
CONFIG_UART_ROM_ESP32C3=y CONFIG_UART_ROM_ESP32C3=y
CONFIG_XIP=n CONFIG_XIP=n
CONFIG_HEAP_MEM_POOL_SIZE=16384
CONFIG_BT=y

View file

@ -254,7 +254,7 @@ static int bt_esp32_ble_init(void)
int ret; int ret;
esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT(); esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT();
#ifdef CONFIG_BT_BREDR #if defined(CONFIG_BT_BREDR) && defined(CONFIG_SOC_ESP32)
esp_bt_mode_t mode = ESP_BT_MODE_BTDM; esp_bt_mode_t mode = ESP_BT_MODE_BTDM;
#else #else
esp_bt_mode_t mode = ESP_BT_MODE_BLE; esp_bt_mode_t mode = ESP_BT_MODE_BLE;

View file

@ -20,6 +20,9 @@ config GEN_SW_ISR_TABLE
config GEN_IRQ_VECTOR_TABLE config GEN_IRQ_VECTOR_TABLE
default n default n
config DYNAMIC_INTERRUPTS
default y
config XIP config XIP
default n default n

View file

@ -150,6 +150,15 @@ SECTIONS
.dram0.data : .dram0.data :
{ {
_data_start = ABSOLUTE(.); _data_start = 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(.);
*(.data) *(.data)
*(.data.*) *(.data.*)
*(.gnu.linkonce.d.*) *(.gnu.linkonce.d.*)
@ -188,6 +197,16 @@ SECTIONS
{ {
. = ALIGN (8); . = ALIGN (8);
__bss_start = ABSOLUTE(.); __bss_start = ABSOLUTE(.);
_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(.);
*(.dynsbss) *(.dynsbss)
*(.sbss) *(.sbss)
*(.sbss.*) *(.sbss.*)