Merge branch 'feature/config_wifi_bt' into 'master'
Clean up WiFi & Bluetooth config options * Splits "WiFi" configuration out from ESP32 configuration submenu to its own menu. * Renames "BT" to "Bluetooth", enabling Bluetooth is now in this option not the ESP32 submenu. * Also disables compiling/linking of BT stack if Bluetooth is disabled, saves some build time. See merge request !397
This commit is contained in:
commit
5fbea86a9e
|
@ -1,41 +1,24 @@
|
|||
menu "BT config"
|
||||
visible if MEMMAP_BT
|
||||
|
||||
|
||||
config BT_ENABLED
|
||||
bool
|
||||
depends on ESP32_ENABLE_STACK_BT
|
||||
menuconfig BT_ENABLED
|
||||
bool "Bluetooth"
|
||||
help
|
||||
This compiles in the low-level BT stack.
|
||||
Select this option to enable Bluetooth stack and show the submenu with Bluetooth configuration choices.
|
||||
|
||||
config BTC_TASK_STACK_SIZE
|
||||
int "BT event (callback to application) task stack size"
|
||||
int "Bluetooth event (callback to application) task stack size"
|
||||
depends on BT_ENABLED
|
||||
default 3072
|
||||
help
|
||||
This select btc task stack size
|
||||
|
||||
config BLUEDROID_MEM_DEBUG
|
||||
bool "Bluedroid memory debug"
|
||||
default no
|
||||
depends on BT_ENABLED
|
||||
default n
|
||||
help
|
||||
Bluedroid memory debug
|
||||
|
||||
#config BT_BTLE
|
||||
# bool "Enable BTLE"
|
||||
# depends on BT_ENABLED
|
||||
# help
|
||||
# This compiles BTLE support
|
||||
#
|
||||
#config BT_BT
|
||||
# bool "Enable classic BT"
|
||||
# depends on BT_ENABLED
|
||||
# help
|
||||
# This enables classic BT support
|
||||
|
||||
endmenu
|
||||
|
||||
# Memory reserved at start of DRAM for Bluetooth stack
|
||||
config BT_RESERVE_DRAM
|
||||
hex
|
||||
default 0x10000 if MEMMAP_BT
|
||||
default 0x10000 if BT_ENABLED
|
||||
default 0
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#
|
||||
# Component Makefile
|
||||
#
|
||||
ifdef CONFIG_BT_ENABLED
|
||||
|
||||
COMPONENT_ADD_INCLUDEDIRS := bluedroid/bta/include \
|
||||
bluedroid/bta/sys/include \
|
||||
|
@ -71,3 +72,5 @@ COMPONENT_SRCDIRS := bluedroid/bta/dm \
|
|||
.
|
||||
|
||||
COMPONENT_SUBMODULES += lib
|
||||
|
||||
endif
|
||||
|
|
|
@ -7,3 +7,5 @@ COMPONENT_ADD_INCLUDEDIRS := port/include port/include/coap libcoap/include libc
|
|||
COMPONENT_OBJS = libcoap/src/address.o libcoap/src/async.o libcoap/src/block.o libcoap/src/coap_time.o libcoap/src/debug.o libcoap/src/encode.o libcoap/src/hashkey.o libcoap/src/mem.o libcoap/src/net.o libcoap/src/option.o libcoap/src/pdu.o libcoap/src/resource.o libcoap/src/str.o libcoap/src/subscribe.o libcoap/src/uri.o port/coap_io_socket.o
|
||||
|
||||
COMPONENT_SRCDIRS := libcoap/src libcoap port
|
||||
|
||||
COMPONENT_SUBMODULES += libcoap
|
||||
|
|
|
@ -20,41 +20,6 @@ config ESP32_DEFAULT_CPU_FREQ_MHZ
|
|||
default 160 if ESP32_DEFAULT_CPU_FREQ_160
|
||||
default 240 if ESP32_DEFAULT_CPU_FREQ_240
|
||||
|
||||
#choice ESP32_WIFI_OR_BT
|
||||
# prompt "Select stack to enable (WiFi or BT)"
|
||||
# default ESP32_ENABLE_WIFI
|
||||
# help
|
||||
# Temporarily, WiFi and BT stacks can not be used at the same time.
|
||||
# Select which stack to enable.
|
||||
|
||||
config ESP32_ENABLE_STACK_WIFI
|
||||
bool "WiFi"
|
||||
select WIFI_ENABLED if ESP32_ENABLE_STACK_WIFI
|
||||
config ESP32_ENABLE_STACK_BT
|
||||
bool "BT"
|
||||
select MEMMAP_BT if ESP32_ENABLE_STACK_BT
|
||||
select BT_ENABLED if ESP32_ENABLE_STACK_BT
|
||||
#config ESP32_ENABLE_STACK_NONE
|
||||
# bool "None"
|
||||
#endchoice
|
||||
|
||||
config SW_COEXIST_ENABLE
|
||||
bool "Software do control of wifi/bt coexisit"
|
||||
depends on ESP32_ENABLE_STACK_BT && ESP32_ENABLE_STACK_WIFI
|
||||
default "n"
|
||||
help
|
||||
Software do something control of wifi/bt coexist. For some heavy traffic senario,
|
||||
do sotware coexist, may be better.
|
||||
|
||||
config MEMMAP_BT
|
||||
bool
|
||||
depends on ESP32_ENABLE_STACK_BT
|
||||
help
|
||||
The Bluetooth stack uses memory that cannot be used as generic memory anymore. This
|
||||
reserves the space for that within the memory map of the compiled binary.
|
||||
This option is required to enable BT stack.
|
||||
Temporarily, this option is not compatible with WiFi stack.
|
||||
|
||||
config MEMMAP_SMP
|
||||
bool "Reserve memory for two cores"
|
||||
default "y"
|
||||
|
@ -99,15 +64,6 @@ config MEMMAP_SPISRAM
|
|||
main memory map. Enable this if you have this hardware and want to use it in the same
|
||||
way as on-chip RAM.
|
||||
|
||||
config WIFI_ENABLED
|
||||
bool
|
||||
default "y"
|
||||
depends on ESP32_ENABLE_STACK_WIFI
|
||||
help
|
||||
This compiles in the low-level WiFi stack.
|
||||
|
||||
Temporarily, this option is not compatible with BT stack.
|
||||
|
||||
config SYSTEM_EVENT_QUEUE_SIZE
|
||||
int "System event queue size"
|
||||
default 32
|
||||
|
@ -180,42 +136,42 @@ config CONSOLE_UART_NONE
|
|||
endchoice
|
||||
|
||||
choice CONSOLE_UART_NUM
|
||||
prompt "UART peripheral to use for console output (0-1)"
|
||||
depends on CONSOLE_UART_CUSTOM
|
||||
prompt "UART peripheral to use for console output (0-1)"
|
||||
depends on CONSOLE_UART_CUSTOM
|
||||
default CONSOLE_UART_CUSTOM_NUM_0
|
||||
help
|
||||
Due of a ROM bug, UART2 is not supported for console output
|
||||
via ets_printf.
|
||||
Due of a ROM bug, UART2 is not supported for console output
|
||||
via ets_printf.
|
||||
|
||||
config CONSOLE_UART_CUSTOM_NUM_0
|
||||
bool "UART0"
|
||||
bool "UART0"
|
||||
config CONSOLE_UART_CUSTOM_NUM_1
|
||||
bool "UART1"
|
||||
bool "UART1"
|
||||
endchoice
|
||||
|
||||
config CONSOLE_UART_NUM
|
||||
int
|
||||
default 0 if CONSOLE_UART_DEFAULT || CONSOLE_UART_NONE
|
||||
default 0 if CONSOLE_UART_CUSTOM_NUM_0
|
||||
default 1 if CONSOLE_UART_CUSTOM_NUM_1
|
||||
int
|
||||
default 0 if CONSOLE_UART_DEFAULT || CONSOLE_UART_NONE
|
||||
default 0 if CONSOLE_UART_CUSTOM_NUM_0
|
||||
default 1 if CONSOLE_UART_CUSTOM_NUM_1
|
||||
|
||||
config CONSOLE_UART_TX_GPIO
|
||||
int "UART TX on GPIO#"
|
||||
depends on CONSOLE_UART_CUSTOM
|
||||
range 0 33
|
||||
default 19
|
||||
int "UART TX on GPIO#"
|
||||
depends on CONSOLE_UART_CUSTOM
|
||||
range 0 33
|
||||
default 19
|
||||
|
||||
config CONSOLE_UART_RX_GPIO
|
||||
int "UART RX on GPIO#"
|
||||
depends on CONSOLE_UART_CUSTOM
|
||||
range 0 39
|
||||
default 21
|
||||
int "UART RX on GPIO#"
|
||||
depends on CONSOLE_UART_CUSTOM
|
||||
range 0 39
|
||||
default 21
|
||||
|
||||
config CONSOLE_UART_BAUDRATE
|
||||
int "UART console baud rate"
|
||||
depends on !CONSOLE_UART_NONE
|
||||
default 115200
|
||||
range 1200 4000000
|
||||
int "UART console baud rate"
|
||||
depends on !CONSOLE_UART_NONE
|
||||
default 115200
|
||||
range 1200 4000000
|
||||
|
||||
config ULP_COPROC_ENABLED
|
||||
bool "Enable Ultra Low Power (ULP) Coprocessor"
|
||||
|
@ -407,24 +363,24 @@ config BROWNOUT_DET_RESETDELAY
|
|||
|
||||
|
||||
choice ESP32_TIME_SYSCALL
|
||||
prompt "Timers used for gettimeofday function"
|
||||
default ESP32_TIME_SYSCALL_USE_RTC_FRC1
|
||||
help
|
||||
This setting defines which hardware timers are used to
|
||||
implement 'gettimeofday' and 'time' functions in C library.
|
||||
prompt "Timers used for gettimeofday function"
|
||||
default ESP32_TIME_SYSCALL_USE_RTC_FRC1
|
||||
help
|
||||
This setting defines which hardware timers are used to
|
||||
implement 'gettimeofday' and 'time' functions in C library.
|
||||
|
||||
- If only FRC1 timer is used, gettimeofday will provide time at
|
||||
microsecond resolution. Time will not be preserved when going
|
||||
into deep sleep mode.
|
||||
- If both FRC1 and RTC timers are used, timekeeping will
|
||||
continue in deep sleep. Time will be reported at 1 microsecond
|
||||
resolution.
|
||||
- If only RTC timer is used, timekeeping will continue in
|
||||
deep sleep, but time will be measured at 6.(6) microsecond
|
||||
resolution. Also the gettimeofday function itself may take
|
||||
longer to run.
|
||||
- If no timers are used, gettimeofday and time functions
|
||||
return -1 and set errno to ENOSYS.
|
||||
- If only FRC1 timer is used, gettimeofday will provide time at
|
||||
microsecond resolution. Time will not be preserved when going
|
||||
into deep sleep mode.
|
||||
- If both FRC1 and RTC timers are used, timekeeping will
|
||||
continue in deep sleep. Time will be reported at 1 microsecond
|
||||
resolution.
|
||||
- If only RTC timer is used, timekeeping will continue in
|
||||
deep sleep, but time will be measured at 6.(6) microsecond
|
||||
resolution. Also the gettimeofday function itself may take
|
||||
longer to run.
|
||||
- If no timers are used, gettimeofday and time functions
|
||||
return -1 and set errno to ENOSYS.
|
||||
|
||||
config ESP32_TIME_SYSCALL_USE_RTC
|
||||
bool "RTC"
|
||||
|
@ -437,85 +393,102 @@ config ESP32_TIME_SYSCALL_USE_NONE
|
|||
endchoice
|
||||
|
||||
choice ESP32_RTC_CLOCK_SOURCE
|
||||
prompt "RTC clock source"
|
||||
default ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC
|
||||
help
|
||||
Choose which clock is used as RTC clock source.
|
||||
The only available option for now is to use internal
|
||||
150kHz RC oscillator.
|
||||
prompt "RTC clock source"
|
||||
default ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC
|
||||
help
|
||||
Choose which clock is used as RTC clock source.
|
||||
The only available option for now is to use internal
|
||||
150kHz RC oscillator.
|
||||
|
||||
config ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC
|
||||
bool "Internal RC"
|
||||
bool "Internal RC"
|
||||
config ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL
|
||||
bool "External 32kHz crystal"
|
||||
depends on DOCUMENTATION_FOR_RTC_CNTL
|
||||
bool "External 32kHz crystal"
|
||||
depends on DOCUMENTATION_FOR_RTC_CNTL
|
||||
endchoice
|
||||
|
||||
|
||||
config ESP32_DEEP_SLEEP_WAKEUP_DELAY
|
||||
int "Extra delay in deep sleep wake stub (in us)"
|
||||
default 0
|
||||
range 0 5000
|
||||
help
|
||||
When ESP32 exits deep sleep, the CPU and the flash chip are powered on
|
||||
at the same time. CPU will run deep sleep stub first, and then
|
||||
proceed to load code from flash. Some flash chips need sufficient
|
||||
time to pass between power on and first read operation. By default,
|
||||
without any extra delay, this time is approximately 900us.
|
||||
int "Extra delay in deep sleep wake stub (in us)"
|
||||
default 0
|
||||
range 0 5000
|
||||
help
|
||||
When ESP32 exits deep sleep, the CPU and the flash chip are powered on
|
||||
at the same time. CPU will run deep sleep stub first, and then
|
||||
proceed to load code from flash. Some flash chips need sufficient
|
||||
time to pass between power on and first read operation. By default,
|
||||
without any extra delay, this time is approximately 900us.
|
||||
|
||||
If you are using a flash chip which needs more than 900us to become
|
||||
ready after power on, set this parameter to add extra delay
|
||||
to the default deep sleep stub.
|
||||
If you are using a flash chip which needs more than 900us to become
|
||||
ready after power on, set this parameter to add extra delay
|
||||
to the default deep sleep stub.
|
||||
|
||||
If you are seeing "flash read err, 1000" message printed to the
|
||||
console after deep sleep reset, try increasing this value.
|
||||
|
||||
|
||||
config ESP32_PHY_AUTO_INIT
|
||||
bool "Initialize PHY in startup code"
|
||||
default y
|
||||
help
|
||||
If enabled, PHY will be initialized in startup code, before
|
||||
app_main function runs.
|
||||
If this is undesired, disable this option and call esp_phy_init
|
||||
from the application before enabling WiFi or BT.
|
||||
|
||||
If this option is enabled, startup code will also initialize
|
||||
NVS prior to initializing PHY.
|
||||
|
||||
If unsure, choose 'y'.
|
||||
|
||||
config ESP32_PHY_INIT_DATA_IN_PARTITION
|
||||
bool "Use a partition to store PHY init data"
|
||||
default n
|
||||
help
|
||||
If enabled, PHY init data will be loaded from a partition.
|
||||
When using a custom partition table, make sure that PHY data
|
||||
partition is included (type: 'data', subtype: 'phy').
|
||||
With default partition tables, this is done automatically.
|
||||
If PHY init data is stored in a partition, it has to be flashed there,
|
||||
otherwise runtime error will occur.
|
||||
|
||||
If this option is not enabled, PHY init data will be embedded
|
||||
into the application binary.
|
||||
|
||||
If unsure, choose 'n'.
|
||||
|
||||
config ESP32_PHY_MAX_TX_POWER
|
||||
int "Max TX power (dBm)"
|
||||
range 0 20
|
||||
default 20
|
||||
help
|
||||
Set maximum transmit power. Actual transmit power for high
|
||||
data rates may be lower than this setting.
|
||||
|
||||
config ESP32_WIFI_RX_BUFFER_NUM
|
||||
int "Max number of WiFi RX buffers"
|
||||
range 2 25
|
||||
default 25
|
||||
help
|
||||
Set the number of WiFi rx buffers. Each buffer takes approximately 1.6KB of RAM.
|
||||
Larger number for higher throughput but more memory. Smaller number for lower
|
||||
throughput but less memory.
|
||||
If you are seeing "flash read err, 1000" message printed to the
|
||||
console after deep sleep reset, try increasing this value.
|
||||
|
||||
endmenu
|
||||
|
||||
menuconfig WIFI_ENABLED
|
||||
bool "WiFi"
|
||||
default y
|
||||
help
|
||||
Select this option to enable WiFi stack and show the submenu with WiFi configuration choices.
|
||||
|
||||
config SW_COEXIST_ENABLE
|
||||
bool "Software controls WiFi/Bluetooth coexistence"
|
||||
depends on WIFI_ENABLED && BT_ENABLED
|
||||
default n
|
||||
help
|
||||
If enabled, WiFi & Bluetooth coexistence is controlled by software rather than hardware.
|
||||
Recommended for heavy traffic scenarios. Both coexistence configuration options are
|
||||
automatically managed, no user intervention is required.
|
||||
|
||||
config ESP32_PHY_AUTO_INIT
|
||||
bool "Initialize PHY in startup code"
|
||||
depends on WIFI_ENABLED
|
||||
default y
|
||||
help
|
||||
If enabled, PHY will be initialized in startup code, before
|
||||
app_main function runs.
|
||||
If this is undesired, disable this option and call esp_phy_init
|
||||
from the application before enabling WiFi or BT.
|
||||
|
||||
If this option is enabled, startup code will also initialize
|
||||
NVS prior to initializing PHY.
|
||||
|
||||
If unsure, choose 'y'.
|
||||
|
||||
config ESP32_PHY_INIT_DATA_IN_PARTITION
|
||||
bool "Use a partition to store PHY init data"
|
||||
depends on WIFI_ENABLED
|
||||
default n
|
||||
help
|
||||
If enabled, PHY init data will be loaded from a partition.
|
||||
When using a custom partition table, make sure that PHY data
|
||||
partition is included (type: 'data', subtype: 'phy').
|
||||
With default partition tables, this is done automatically.
|
||||
If PHY init data is stored in a partition, it has to be flashed there,
|
||||
otherwise runtime error will occur.
|
||||
|
||||
If this option is not enabled, PHY init data will be embedded
|
||||
into the application binary.
|
||||
|
||||
If unsure, choose 'n'.
|
||||
|
||||
config ESP32_PHY_MAX_TX_POWER
|
||||
int "Max TX power (dBm)"
|
||||
range 0 20
|
||||
default 20
|
||||
depends on WIFI_ENABLED
|
||||
help
|
||||
Set maximum transmit power. Actual transmit power for high
|
||||
data rates may be lower than this setting.
|
||||
|
||||
config ESP32_WIFI_RX_BUFFER_NUM
|
||||
int "Max number of WiFi RX buffers"
|
||||
depends on WIFI_ENABLED
|
||||
range 2 25
|
||||
default 25
|
||||
help
|
||||
Set the number of WiFi rx buffers. Each buffer takes approximately 1.6KB of RAM.
|
||||
Larger number for higher throughput but more memory. Smaller number for lower
|
||||
throughput but less memory.
|
||||
|
|
|
@ -192,7 +192,7 @@ void heap_alloc_caps_init() {
|
|||
// TODO: this region should be checked, since we don't need to knock out all region finally
|
||||
disable_mem_region((void*)0x3ffe0000, (void*)0x3ffe8000); //knock out ROM data region
|
||||
|
||||
#if CONFIG_MEMMAP_BT
|
||||
#if CONFIG_BT_ENABLED
|
||||
disable_mem_region((void*)0x3ffb0000, (void*)0x3ffc0000); //knock out BT data region
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
menuconfig ETHERNET
|
||||
bool "Enable Ethernet"
|
||||
bool "Ethernet"
|
||||
default n
|
||||
help
|
||||
Enable this option to enable ethernet driver and show the menu with ethernet features.
|
||||
Select this option to enable ethernet driver and show the submenu with ethernet features.
|
||||
|
||||
config DMA_RX_BUF_NUM
|
||||
int "DMA Rx Buf Num"
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/_types.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#if __has_extension(c_atomic) || __has_extension(cxx_atomic)
|
||||
#define __CLANG_ATOMICS
|
||||
|
|
|
@ -5,10 +5,3 @@
|
|||
# BT config
|
||||
#
|
||||
CONFIG_BT_ENABLED=y
|
||||
|
||||
#
|
||||
# ESP32-specific config
|
||||
#
|
||||
CONFIG_ESP32_ENABLE_STACK_BT=y
|
||||
# CONFIG_ESP32_ENABLE_STACK_NONE is not set
|
||||
CONFIG_MEMMAP_BT=y
|
||||
|
|
|
@ -5,10 +5,3 @@
|
|||
# BT config
|
||||
#
|
||||
CONFIG_BT_ENABLED=y
|
||||
|
||||
#
|
||||
# ESP32-specific config
|
||||
#
|
||||
CONFIG_ESP32_ENABLE_STACK_BT=y
|
||||
# CONFIG_ESP32_ENABLE_STACK_NONE is not set
|
||||
CONFIG_MEMMAP_BT=y
|
||||
|
|
|
@ -5,10 +5,3 @@
|
|||
# BT config
|
||||
#
|
||||
CONFIG_BT_ENABLED=y
|
||||
|
||||
#
|
||||
# ESP32-specific config
|
||||
#
|
||||
CONFIG_ESP32_ENABLE_STACK_BT=y
|
||||
# CONFIG_ESP32_ENABLE_STACK_NONE is not set
|
||||
CONFIG_MEMMAP_BT=y
|
||||
|
|
|
@ -5,10 +5,3 @@
|
|||
# BT config
|
||||
#
|
||||
CONFIG_BT_ENABLED=y
|
||||
|
||||
#
|
||||
# ESP32-specific config
|
||||
#
|
||||
CONFIG_ESP32_ENABLE_STACK_BT=y
|
||||
# CONFIG_ESP32_ENABLE_STACK_NONE is not set
|
||||
CONFIG_MEMMAP_BT=y
|
||||
|
|
Loading…
Reference in a new issue