Skip to content

Commit

Permalink
[nrfconnect] Disable selected BLE features and RTT (#24227)
Browse files Browse the repository at this point in the history
Disable encryption and EC in BLE controller, and JLink RTT
in all nRF Connect examples. BLE changes save over 5.5kB of
flash and almost 2kB of RAM. Disabling RTT saves over 1kB of
RAM, additionally.

Signed-off-by: Damian Krolik <[email protected]>

Signed-off-by: Damian Krolik <[email protected]>
  • Loading branch information
Damian-Nordic authored and pull[bot] committed Oct 2, 2023
1 parent bbf76cc commit 1540008
Show file tree
Hide file tree
Showing 25 changed files with 66 additions and 5 deletions.
12 changes: 12 additions & 0 deletions config/nrfconnect/chip-module/Kconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,18 @@ config BT_BUF_ACL_TX_SIZE
config BT_RX_STACK_SIZE
default 1200

config BT_CTLR_ECDH
bool
default n

config BT_CTLR_LE_ENC
bool
default n

config BT_DEVICE_NAME_GATT_WRITABLE
bool
default n

# Enable NFC support

config CHIP_NFC_COMMISSIONING
Expand Down
3 changes: 3 additions & 0 deletions examples/all-clusters-app/nrfconnect/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ CONFIG_THREAD_NAME=y
CONFIG_MPU_STACK_GUARD=y
CONFIG_RESET_ON_FATAL_ERROR=n

# Reduce application size
CONFIG_USE_SEGGER_RTT=n

# Disable OTA requestor
CONFIG_CHIP_OTA_REQUESTOR=n

Expand Down
3 changes: 2 additions & 1 deletion examples/all-clusters-app/nrfconnect/prj_dfu.conf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ CONFIG_THREAD_NAME=y
CONFIG_MPU_STACK_GUARD=y
CONFIG_RESET_ON_FATAL_ERROR=n

# reduce application size by disabling including assertions in the output file.
# Reduce application size
CONFIG_USE_SEGGER_RTT=n
CONFIG_ASSERT_VERBOSE=n
CONFIG_ASSERT_NO_FILE_INFO=y
CONFIG_ASSERT_NO_COND_INFO=y
Expand Down
1 change: 1 addition & 0 deletions examples/all-clusters-app/nrfconnect/prj_release.conf
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ CONFIG_BT_DEVICE_NAME="AllClusters"
CONFIG_RESET_ON_FATAL_ERROR=y

# Disable all debug features
CONFIG_USE_SEGGER_RTT=n
CONFIG_SHELL=n
CONFIG_OPENTHREAD_SHELL=n
CONFIG_CONSOLE=n
Expand Down
3 changes: 3 additions & 0 deletions examples/all-clusters-minimal-app/nrfconnect/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ CONFIG_THREAD_NAME=y
CONFIG_MPU_STACK_GUARD=y
CONFIG_RESET_ON_FATAL_ERROR=n

# Reduce application size
CONFIG_USE_SEGGER_RTT=n

# Disable OTA requestor
CONFIG_CHIP_OTA_REQUESTOR=n

Expand Down
3 changes: 2 additions & 1 deletion examples/all-clusters-minimal-app/nrfconnect/prj_dfu.conf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ CONFIG_THREAD_NAME=y
CONFIG_MPU_STACK_GUARD=y
CONFIG_RESET_ON_FATAL_ERROR=n

# reduce application size by disabling including assertions in the output file.
# Reduce application size
CONFIG_USE_SEGGER_RTT=n
CONFIG_ASSERT_VERBOSE=n
CONFIG_ASSERT_NO_FILE_INFO=y
CONFIG_ASSERT_NO_COND_INFO=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ CONFIG_BT_DEVICE_NAME="AllClusters"
CONFIG_RESET_ON_FATAL_ERROR=y

# Disable all debug features
CONFIG_USE_SEGGER_RTT=n
CONFIG_SHELL=n
CONFIG_OPENTHREAD_SHELL=n
CONFIG_CONSOLE=n
Expand Down
3 changes: 3 additions & 0 deletions examples/light-switch-app/nrfconnect/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,6 @@ CONFIG_BT_DEVICE_NAME="MatterSwitch"
CONFIG_THREAD_NAME=y
CONFIG_MPU_STACK_GUARD=y
CONFIG_RESET_ON_FATAL_ERROR=n

# Reduce application size
CONFIG_USE_SEGGER_RTT=n
3 changes: 3 additions & 0 deletions examples/light-switch-app/nrfconnect/prj_no_dfu.conf
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ CONFIG_THREAD_NAME=y
CONFIG_MPU_STACK_GUARD=y
CONFIG_RESET_ON_FATAL_ERROR=n

# Reduce application size
CONFIG_USE_SEGGER_RTT=n

# Disable Matter OTA DFU
CONFIG_CHIP_OTA_REQUESTOR=n

Expand Down
1 change: 1 addition & 0 deletions examples/light-switch-app/nrfconnect/prj_release.conf
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ CONFIG_RESET_ON_FATAL_ERROR=y
CONFIG_PM_DEVICE=y

# Disable all debug features
CONFIG_USE_SEGGER_RTT=n
CONFIG_SHELL=n
CONFIG_OPENTHREAD_SHELL=n
CONFIG_CONSOLE=n
Expand Down
3 changes: 3 additions & 0 deletions examples/lighting-app/nrfconnect/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,6 @@ CONFIG_IEEE802154_NRF5_RX_STACK_SIZE=1024
CONFIG_THREAD_NAME=y
CONFIG_MPU_STACK_GUARD=y
CONFIG_RESET_ON_FATAL_ERROR=n

# Reduce application size
CONFIG_USE_SEGGER_RTT=n
3 changes: 3 additions & 0 deletions examples/lighting-app/nrfconnect/prj_no_dfu.conf
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ CONFIG_THREAD_NAME=y
CONFIG_MPU_STACK_GUARD=y
CONFIG_RESET_ON_FATAL_ERROR=n

# Reduce application size
CONFIG_USE_SEGGER_RTT=n

# Stack size settings
CONFIG_IEEE802154_NRF5_RX_STACK_SIZE=1024

Expand Down
1 change: 1 addition & 0 deletions examples/lighting-app/nrfconnect/prj_release.conf
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ CONFIG_RESET_ON_FATAL_ERROR=y
CONFIG_IEEE802154_NRF5_RX_STACK_SIZE=1024

# Disable all debug features
CONFIG_USE_SEGGER_RTT=n
CONFIG_SHELL=n
CONFIG_OPENTHREAD_SHELL=n
CONFIG_CONSOLE=n
Expand Down
3 changes: 3 additions & 0 deletions examples/lock-app/nrfconnect/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ CONFIG_BT_DEVICE_NAME="MatterLock"
CONFIG_THREAD_NAME=y
CONFIG_MPU_STACK_GUARD=y
CONFIG_RESET_ON_FATAL_ERROR=n

# Reduce application size
CONFIG_USE_SEGGER_RTT=n
3 changes: 3 additions & 0 deletions examples/lock-app/nrfconnect/prj_no_dfu.conf
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ CONFIG_THREAD_NAME=y
CONFIG_MPU_STACK_GUARD=y
CONFIG_RESET_ON_FATAL_ERROR=n

# Reduce application size
CONFIG_USE_SEGGER_RTT=n

# Disable Matter OTA DFU
CONFIG_CHIP_OTA_REQUESTOR=n

Expand Down
1 change: 1 addition & 0 deletions examples/lock-app/nrfconnect/prj_release.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ CONFIG_RESET_ON_FATAL_ERROR=y
CONFIG_PM_DEVICE=y

# Disable all debug features
CONFIG_USE_SEGGER_RTT=n
CONFIG_SHELL=n
CONFIG_OPENTHREAD_SHELL=n
CONFIG_CONSOLE=n
Expand Down
6 changes: 3 additions & 3 deletions examples/pump-app/nrfconnect/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
# limitations under the License.
#

CONFIG_CHIP=y
CONFIG_STD_CPP14=y

# This sample uses Kconfig.defaults to set options common for all
# samples. This file should contain only options specific for this sample
# or overrides of default values.
Expand All @@ -38,3 +35,6 @@ CONFIG_BT_DEVICE_NAME="MatterPump"
CONFIG_THREAD_NAME=y
CONFIG_MPU_STACK_GUARD=y
CONFIG_RESET_ON_FATAL_ERROR=n

# Reduce application size
CONFIG_USE_SEGGER_RTT=n
3 changes: 3 additions & 0 deletions examples/pump-app/nrfconnect/prj_no_dfu.conf
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ CONFIG_THREAD_NAME=y
CONFIG_MPU_STACK_GUARD=y
CONFIG_RESET_ON_FATAL_ERROR=n

# Reduce application size
CONFIG_USE_SEGGER_RTT=n

# Disable Matter OTA DFU
CONFIG_CHIP_OTA_REQUESTOR=n

Expand Down
1 change: 1 addition & 0 deletions examples/pump-app/nrfconnect/prj_release.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ CONFIG_RESET_ON_FATAL_ERROR=y
CONFIG_PM_DEVICE=y

# Disable all debug features
CONFIG_USE_SEGGER_RTT=n
CONFIG_SHELL=n
CONFIG_OPENTHREAD_SHELL=n
CONFIG_CONSOLE=n
Expand Down
3 changes: 3 additions & 0 deletions examples/pump-controller-app/nrfconnect/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ CONFIG_BT_DEVICE_NAME="MatterPumpCtrl"
CONFIG_THREAD_NAME=y
CONFIG_MPU_STACK_GUARD=y
CONFIG_RESET_ON_FATAL_ERROR=n

# Reduce application size
CONFIG_USE_SEGGER_RTT=n
3 changes: 3 additions & 0 deletions examples/pump-controller-app/nrfconnect/prj_no_dfu.conf
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ CONFIG_THREAD_NAME=y
CONFIG_MPU_STACK_GUARD=y
CONFIG_RESET_ON_FATAL_ERROR=n

# Reduce application size
CONFIG_USE_SEGGER_RTT=n

# Disable Matter OTA DFU
CONFIG_CHIP_OTA_REQUESTOR=n

Expand Down
1 change: 1 addition & 0 deletions examples/pump-controller-app/nrfconnect/prj_release.conf
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ CONFIG_RESET_ON_FATAL_ERROR=y
CONFIG_PM_DEVICE=y

# Disable all debug features
CONFIG_USE_SEGGER_RTT=n
CONFIG_SHELL=n
CONFIG_OPENTHREAD_SHELL=n
CONFIG_CONSOLE=n
Expand Down
3 changes: 3 additions & 0 deletions examples/window-app/nrfconnect/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,6 @@ CONFIG_IEEE802154_NRF5_RX_STACK_SIZE=1024
CONFIG_THREAD_NAME=y
CONFIG_MPU_STACK_GUARD=y
CONFIG_RESET_ON_FATAL_ERROR=n

# Reduce application size
CONFIG_USE_SEGGER_RTT=n
3 changes: 3 additions & 0 deletions examples/window-app/nrfconnect/prj_no_dfu.conf
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ CONFIG_THREAD_NAME=y
CONFIG_MPU_STACK_GUARD=y
CONFIG_RESET_ON_FATAL_ERROR=n

# Reduce application size
CONFIG_USE_SEGGER_RTT=n

# Disable Matter OTA DFU
CONFIG_CHIP_OTA_REQUESTOR=n

Expand Down
1 change: 1 addition & 0 deletions examples/window-app/nrfconnect/prj_release.conf
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ CONFIG_IEEE802154_NRF5_RX_STACK_SIZE=1024
CONFIG_PM_DEVICE=y

# Disable all debug features
CONFIG_USE_SEGGER_RTT=n
CONFIG_SHELL=n
CONFIG_OPENTHREAD_SHELL=n
CONFIG_CONSOLE=n
Expand Down

0 comments on commit 1540008

Please sign in to comment.