Skip to content

Commit

Permalink
samples: increase heap memory for crypto operation
Browse files Browse the repository at this point in the history
mbedtls heap to 4 kB

Signed-off-by: Krzysztof Taborowski <[email protected]>
  • Loading branch information
ktaborowski authored and RobertGalatNordic committed Feb 23, 2024
1 parent 2141738 commit 1d47f18
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 13 deletions.
8 changes: 5 additions & 3 deletions Kconfig.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,21 @@ if SIDEWALK_CRYPTO

config PSA_WANT_ALG_CHACHA20_POLY1305
default n

config PSA_WANT_ALG_SHA_224
default n

config PSA_WANT_ALG_SHA_384
default n

config PSA_WANT_ALG_CBC_NO_PADDING
default n

config PSA_WANT_ALG_CBC_PKCS7
default n

config PSA_WANT_ALG_HKDF
default n
config MBEDTLS_HEAP_SIZE
default 8192 if SIDEWALK_ON_DEV_CERT
default 1024

endif #SIDEWALK_CRYPTO

Expand Down
6 changes: 4 additions & 2 deletions samples/sid_end_device/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ config SHELL_STACK_SIZE
default 8192 if SID_END_DEVICE_CLI

config HEAP_MEM_POOL_SIZE
default 8192 if SIDEWALK_ON_DEV_CERT
default 1024
default 4096

config MBEDTLS_HEAP_SIZE
default 4096

config SPI_NRFX_RAM_BUFFER_SIZE
default 0
Expand Down
10 changes: 7 additions & 3 deletions tests/functional/crypto/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,22 @@ config SIDEWALK_CRYPTO_LOG_LEVEL

config SIDEWALK_LOG_LEVEL
default 0

# Stacks
config MAIN_STACK_SIZE
default 8192

config ZTEST_STACK_SIZE
default 8192

config HEAP_MEM_POOL_SIZE
default 8192
default 4096

config MBEDTLS_ENABLE_HEAP
default y
config MBEDTLS_HEAP_SIZE
default 8192

config MBEDTLS_HEAP_SIZE
default 4096

source "${ZEPHYR_BASE}/../sidewalk/Kconfig"
source "${ZEPHYR_BASE}/../sidewalk/Kconfig.dependencies"
Expand Down
10 changes: 5 additions & 5 deletions tests/validation/crypto/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ CONFIG_SIDEWALK_LOG_LEVEL_OFF=y
CONFIG_SIDEWALK_CRYPTO_LOG_LEVEL_OFF=y

# Stacks
CONFIG_TEST_EXTRA_STACK_SIZE=2048
CONFIG_ZTEST_STACK_SIZE=8192
CONFIG_MAIN_STACK_SIZE=8192
CONFIG_HEAP_MEM_POOL_SIZE=8192
CONFIG_TEST_EXTRA_STACK_SIZE=4096
CONFIG_ZTEST_STACK_SIZE=4096
CONFIG_MAIN_STACK_SIZE=4096
CONFIG_HEAP_MEM_POOL_SIZE=4096
CONFIG_MBEDTLS_ENABLE_HEAP=y
CONFIG_MBEDTLS_HEAP_SIZE=8192
CONFIG_MBEDTLS_HEAP_SIZE=4096

CONFIG_PSA_WANT_ALG_SHA_512=y

Expand Down

0 comments on commit 1d47f18

Please sign in to comment.