Skip to content

Commit

Permalink
samples: remove defconfig
Browse files Browse the repository at this point in the history
Move configuration to generic files

Signed-off-by: Krzysztof Taborowski <[email protected]>
  • Loading branch information
ktaborowski committed Jan 23, 2025
1 parent 1fc6c6a commit 13bfdd0
Show file tree
Hide file tree
Showing 5 changed files with 119 additions and 115 deletions.
90 changes: 90 additions & 0 deletions Kconfig.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ config SIDEWALK_DEFAULTS
imply REQUIRES_FULL_LIBC
imply FPU
imply REBOOT
imply PARTITION_MANAGER_ENABLED

if SIDEWALK_DEFAULTS

config SPIN_VALIDATE
default n

endif # SIDEWALK_DEFAULTS

config SIDEWALK_BUILD
bool
Expand All @@ -39,6 +47,8 @@ config SIDEWALK_BLE
help
Sidewalk Bluetooth Low Energy (BLE) module

if SIDEWALK_BLE

config SIDEWALK_BLE_NAME
string "BLE name adverticed for Sidewalk"
default "SID_APP"
Expand All @@ -47,6 +57,49 @@ config BT_ID_MAX
default 3 if SIDEWALK_DFU
default 2

config BT_REMOTE_VERSION
default y

config BT_BUF_ACL_TX_SIZE
default 251

config BT_BUF_ACL_TX_COUNT
default 3

config BT_BUF_ACL_RX_SIZE
default 251

config BT_BUF_ACL_RX_COUNT_EXTRA
default 4

config BT_L2CAP_TX_MTU
default 247

config BT_CTLR_DATA_LENGTH_MAX
default 247

config BT_PERIPHERAL_PREF_MIN_INT
default 16

config BT_PERIPHERAL_PREF_MAX_INT
default 60

config BT_PERIPHERAL_PREF_LATENCY
default 0

config BT_PERIPHERAL_PREF_TIMEOUT
default 400

config BT_EXT_ADV_MAX_ADV_SET
default 2 if SIDEWALK_DFU
default 1

config BT_MAX_CONN
default 2 if SIDEWALK_DFU
default 1

endif # SIDEWALK_BLE

config SIDEWALK_ASSERT
bool
default SIDEWALK
Expand Down Expand Up @@ -127,6 +180,18 @@ config PSA_WANT_ALG_CBC_PKCS7
config PSA_WANT_ALG_HKDF
default n

config PSA_USE_CC3XX_KEY_AGREEMENT_DRIVER
default n if SOC_NRF52840 || SOC_NRF5340_CPUAPP

config PSA_USE_CC3XX_ASYMMETRIC_SIGNATURE_DRIVER
default n if SOC_NRF52840 || SOC_NRF5340_CPUAPP

config PSA_USE_CC3XX_ASYMMETRIC_ENCRYPTION_DRIVER
default n if SOC_NRF52840 || SOC_NRF5340_CPUAPP

config PSA_USE_CC3XX_KEY_MANAGEMENT_DRIVER
default n if SOC_NRF52840 || SOC_NRF5340_CPUAPP

endif #SIDEWALK_CRYPTO

config SIDEWALK_LOG
Expand All @@ -136,6 +201,18 @@ config SIDEWALK_LOG
help
Sidewalk log module

if SIDEWALK_LOG

config NVS_LOG_LEVEL
depends on NVS
default 2

config ZMS_LOG_LEVEL
depends on ZMS
default 2

endif # SIDEWALK_LOG

config SIDEWALK_MFG_STORAGE
bool
default SIDEWALK && !DEPRECATED_SIDEWALK_MFG_STORAGE
Expand Down Expand Up @@ -170,6 +247,16 @@ config SIDEWALK_STORAGE
help
Sidewalk storage module

if SIDEWALK_STORAGE

config NVS_LOOKUP_CACHE_SIZE
default 256 if NVS

config ZMS_LOOKUP_CACHE_SIZE
default 256 if ZMS

endif # SIDEWALK_STORAGE

config SIDEWALK_TIMER
bool
default SIDEWALK
Expand Down Expand Up @@ -251,6 +338,9 @@ config SIDEWALK_SPI_BUS
help
SPI bus interface for sidewalk

config SPI_NRFX_RAM_BUFFER_SIZE
default 0 if SIDEWALK_SUBGHZ_SUPPORT

# Hidden configuration (experimental)
config SIDEWALK_SWI_PRIORITY
int
Expand Down
21 changes: 19 additions & 2 deletions samples/sid_end_device/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,25 @@ config SID_END_DEVICE_CLI
Enables Sidewalk command line interface.
The interface commands are compatilbe with former dut sample.

if SID_END_DEVICE_CLI

config SHELL_CMD_BUFF_SIZE
default 1024

config SHELL_STACK_SIZE
default 8192

config SHELL_BACKEND_SERIAL_TX_RING_BUFFER_SIZE
default 128

config SHELL_BACKEND_SERIAL_RX_RING_BUFFER_SIZE
default 1024

config LOG_PROCESS_THREAD_STARTUP_DELAY_MS
default 50

endif # SID_END_DEVICE_CLI

config SID_END_DEVICE_AUTO_START
default y
bool "Enable automatic Sidewalk initlization and start"
Expand Down Expand Up @@ -111,6 +130,4 @@ config SBDT_MAX_PARALEL_TRANSFERS

endif # SIDEWALK_FILE_TRANSFER

rsource "Kconfig.defconfig"

source "Kconfig.zephyr"
113 changes: 0 additions & 113 deletions samples/sid_end_device/Kconfig.defconfig

This file was deleted.

5 changes: 5 additions & 0 deletions samples/sid_end_device/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ CONFIG_LOG_BUFFER_SIZE=2048
# Bluetooth
CONFIG_BT_DEVICE_NAME="Nordic"

# Stack and Heap
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
CONFIG_HEAP_MEM_POOL_SIZE=4096
CONFIG_MBEDTLS_HEAP_SIZE=4096

# Power Management
CONFIG_PM_DEVICE=y

Expand Down
5 changes: 5 additions & 0 deletions samples/sid_end_device/prj_release.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ CONFIG_SMF=y
# Bluetooth
CONFIG_BT_DEVICE_NAME="Nordic"

# Stack and Heap
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
CONFIG_HEAP_MEM_POOL_SIZE=4096
CONFIG_MBEDTLS_HEAP_SIZE=4096

# Disable peripherals
CONFIG_LOG=n
CONFIG_SERIAL=n
Expand Down

0 comments on commit 13bfdd0

Please sign in to comment.