Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ CONFIG_IPC_SERVICE_BACKEND_RPMSG_WQ_STACK_SIZE=512
CONFIG_HEAP_MEM_POOL_SIZE=8192
CONFIG_CBPRINTF_REDUCED_INTEGRAL=y

CONFIG_ISR_TABLES_LOCAL_DECLARATION=y
CONFIG_LTO=y

CONFIG_BT=y
CONFIG_BT_HCI_RAW=y
CONFIG_BT_MAX_CONN=2
Expand Down
5 changes: 5 additions & 0 deletions subsys/bluetooth/controller/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,11 @@ add_subdirectory_ifdef(
ll_sw/openisa
)

zephyr_library_compile_options_ifdef(
CONFIG_BT_CTLR_OPTIMIZE_FOR_SIZE
${OPTIMIZE_FOR_SIZE_FLAG}
)

zephyr_library_compile_options_ifdef(
CONFIG_BT_CTLR_OPTIMIZE_FOR_SPEED
${OPTIMIZE_FOR_SPEED_FLAG}
Expand Down
30 changes: 26 additions & 4 deletions subsys/bluetooth/controller/Kconfig.ll_sw_split
Original file line number Diff line number Diff line change
Expand Up @@ -598,12 +598,34 @@ config BT_CTLR_DYNAMIC_INTERRUPTS
permit use of SoC's peripheral for custom use when Bluetooth is not
enabled.

choice
prompt "Optimization options"
depends on !LTO
default BT_CTLR_OPTIMIZE_FOR_SPEED

config BT_CTLR_OPTIMIZE_FOR_APP_DEFAULT
bool "Optimize for application defaults"
help
Optimize compilation of Controller for application's default.

config BT_CTLR_OPTIMIZE_FOR_SIZE
bool "Optimize for space"
help
Optimize compilation of Controller for code size.

This is the Zephyr project default, but is overridden to use optimize
for speed when compiling the Controller to reduce application's ISR
and thread latencies.

config BT_CTLR_OPTIMIZE_FOR_SPEED
prompt "Optimize for Speed" if !(SOC_SERIES_NRF51X && BT_CTLR_LE_ENC)
bool
default y if BT_CTLR_LE_ENC
bool "Optimize for Speed"
help
Optimize compilation of controller for execution speed.
Optimize compilation of Controller for execution speed. As the
Controller's Upper Link Layer and Lower Link Layer execute in ISRs,
use of speed optimizations reduces application's ISR and thread
latencies.

endchoice

config BT_CTLR_XTAL_ADVANCED
bool "Advanced event preparation"
Expand Down
1 change: 1 addition & 0 deletions tests/bluetooth/init/prj_ctlr_4_0_dbg.conf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ CONFIG_BT_CTLR_CONN_RSSI=n
CONFIG_BT_CTLR_ADV_INDICATION=n
CONFIG_BT_CTLR_SCAN_REQ_NOTIFY=n
CONFIG_BT_CTLR_SCAN_REQ_RSSI=n
CONFIG_BT_CTLR_OPTIMIZE_FOR_APP_DEFAULT=y
CONFIG_BT_CTLR_PROFILE_ISR=n
CONFIG_BT_CTLR_DEBUG_PINS=n
CONFIG_BT_HCI_VS=y
Expand Down
1 change: 1 addition & 0 deletions tests/bluetooth/init/prj_ctlr_5_x_dbg.conf
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ CONFIG_BT_CTLR_SYNC_ISO_RESERVE_MAX=n
CONFIG_BT_CTLR_CENTRAL_RESERVE_MAX=n
CONFIG_BT_CTLR_CIS_ACCEPT_MIN_OFFSET_STRICT=y
CONFIG_BT_CTLR_EVENT_OVERHEAD_RESERVE_MAX=n
CONFIG_BT_CTLR_OPTIMIZE_FOR_SIZE=y
CONFIG_BT_CTLR_PROFILE_ISR=y
CONFIG_BT_CTLR_DEBUG_PINS=y
CONFIG_BT_CTLR_TEST=y
Expand Down
1 change: 1 addition & 0 deletions tests/bluetooth/init/prj_ctlr_dbg.conf
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ CONFIG_BT_CTLR_ADV_INDICATION=y
CONFIG_BT_CTLR_SCAN_REQ_NOTIFY=y
CONFIG_BT_CTLR_SCAN_REQ_RSSI=y
CONFIG_BT_CTLR_SCAN_INDICATION=y
CONFIG_BT_CTLR_OPTIMIZE_FOR_SPEED=y
CONFIG_BT_CTLR_PROFILE_ISR=y
CONFIG_BT_CTLR_DEBUG_PINS=y
CONFIG_BT_CTLR_TEST=y
Expand Down