Skip to content

Commit 4323221

Browse files
cvinayakcfriedt
authored andcommitted
samples: Bluetooth: peripheral_hr minimal configuration update
Updated peripheral_hr sample to use separate Zephyr Controller overlay for minimal configuration. For bbc_microbit: Memory region Used Size Region Size %age Used FLASH: 96268 B 256 KB 36.72% RAM: 16296 B 16 KB 99.46% IDT_LIST: 0 GB 32 KB 0.00% For nrf54l15dk/nrf54l15/cpuapp: Memory region Used Size Region Size %age Used FLASH: 95012 B 1428 KB 6.50% RAM: 17744 B 188 KB 9.22% IDT_LIST: 0 GB 32 KB 0.00% Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent c8d4016 commit 4323221

File tree

4 files changed

+49
-8
lines changed

4 files changed

+49
-8
lines changed

samples/bluetooth/peripheral_hr/README.rst

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,20 @@ Building and Running
2424
This sample can be found under :zephyr_file:`samples/bluetooth/peripheral_hr` in the
2525
Zephyr tree.
2626

27-
See :zephyr:code-sample-category:`bluetooth` samples for details.
27+
Building a minimal variant
28+
--------------------------
29+
30+
.. zephyr-app-commands::
31+
:zephyr-app: samples/bluetooth/peripheral_hr
32+
:board: qemu_cortex_m3
33+
:goals: build
34+
:gen-args: -DCONF_FILE=prj_minimal.conf
35+
36+
Building a minimal variant for bbc_microbit
37+
-------------------------------------------
38+
39+
.. zephyr-app-commands::
40+
:zephyr-app: samples/bluetooth/peripheral_hr
41+
:board: bbc_microbit
42+
:goals: build
43+
:gen-args: -DCONF_FILE=prj_minimal.conf -DEXTRA_CONF_FILE=overlay-bt_ll_sw_split-minimal.conf
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Zephyr open source Bluetooth Low Energy Controller
2+
CONFIG_BT_LL_SW_SPLIT=y
3+
4+
# Optimizations
5+
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y
6+
CONFIG_LTO=y
7+
8+
# Disable Bluetooth controller features not needed
9+
CONFIG_BT_CTLR_CONN_PARAM_REQ=n
10+
CONFIG_BT_CTLR_EXT_REJ_IND=n
11+
CONFIG_BT_CTLR_PER_INIT_FEAT_XCHG=n
12+
CONFIG_BT_CTLR_MIN_USED_CHAN=n
13+
14+
# Buffer sizes
15+
CONFIG_BT_CTLR_RX_BUFFERS=1

samples/bluetooth/peripheral_hr/prj_minimal.conf

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ CONFIG_SIZE_OPTIMIZATIONS=y
4444

4545
# ARM
4646
CONFIG_ARM_MPU=n
47+
CONFIG_BUILTIN_STACK_GUARD=n
4748

4849
# In order to correctly tune the stack sizes for the threads the following
4950
# Configurations can enabled to print the current use:
@@ -91,20 +92,14 @@ CONFIG_BT_PHY_UPDATE=n
9192
CONFIG_BT_GATT_CACHING=n
9293
CONFIG_BT_GATT_SERVICE_CHANGED=n
9394
CONFIG_BT_GAP_PERIPHERAL_PREF_PARAMS=n
94-
CONFIG_BT_SETTINGS_CCC_LAZY_LOADING=y
9595
CONFIG_BT_HCI_VS=n
9696

97-
# Disable Bluetooth controller features not needed
98-
CONFIG_BT_CTLR_PRIVACY=n
99-
CONFIG_BT_CTLR_PHY_2M=n
100-
10197
# Reduce Bluetooth buffers
10298
CONFIG_BT_BUF_EVT_DISCARDABLE_COUNT=1
10399
CONFIG_BT_BUF_EVT_DISCARDABLE_SIZE=45
104100
CONFIG_BT_BUF_EVT_RX_COUNT=4
105101

106102
CONFIG_BT_L2CAP_TX_BUF_COUNT=2
107-
CONFIG_BT_CTLR_RX_BUFFERS=1
108103
CONFIG_BT_BUF_ACL_TX_COUNT=3
109104
CONFIG_BT_BUF_ACL_TX_SIZE=27
110105

samples/bluetooth/peripheral_hr/sample.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,27 @@ tests:
3030
tags: bluetooth
3131
sysbuild: true
3232
sample.bluetooth.peripheral_hr.minimal:
33+
harness: bluetooth
34+
platform_allow:
35+
- qemu_cortex_m3
36+
integration_platforms:
37+
- qemu_cortex_m3
38+
extra_args:
39+
- CONF_FILE=prj_minimal.conf
40+
tags: bluetooth
41+
sample.bluetooth.peripheral_hr.bt_ll_sw_split.minimal:
3342
harness: bluetooth
3443
platform_allow:
3544
- bbc_microbit
45+
- nrf52dk/nrf52832
46+
- nrf54l15dk/nrf54l15/cpuapp
3647
integration_platforms:
3748
- bbc_microbit
38-
extra_args: EXTRA_CONF_FILE=prj_minimal.conf
49+
- nrf52dk/nrf52832
50+
- nrf54l15dk/nrf54l15/cpuapp
51+
extra_args:
52+
- CONF_FILE=prj_minimal.conf
53+
- EXTRA_CONF_FILE=overlay-bt_ll_sw_split-minimal.conf
3954
tags: bluetooth
4055
sample.bluetooth.peripheral_hr.bt_ll_sw_split.extended:
4156
harness: bluetooth

0 commit comments

Comments
 (0)