Skip to content
Merged
Changes from 1 commit
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
15 changes: 15 additions & 0 deletions soc/st/stm32/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,21 @@ config CLOCK_CONTROL
config CORTEX_M_SYSTICK
default n if STM32_LPTIM_TIMER

# Reduce kernel stack sizes to fit MCUs with 8 KiB RAM or less
config MAIN_STACK_SIZE
default 320 if SRAM_SIZE <= 2
default 512 if SRAM_SIZE <= 4
default 640 if SRAM_SIZE <= 8

config IDLE_STACK_SIZE
default 100 if SRAM_SIZE <= 2
default 150 if SRAM_SIZE <= 4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Despite this change is synced with the value previosly used in applicable SoCs, I find it strange the stack size is not a multiple of a 32bit word size.
This comment is outside the scope of this P-R, not blocking.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Zephyr aligns the size internally.

default 200 if SRAM_SIZE <= 8

config ISR_STACK_SIZE
default 256 if SRAM_SIZE <= 2
default 512 if SRAM_SIZE <= 8

DT_STM32_RCC_PATH := $(dt_nodelabel_path,rcc)
DT_STM32_RCC_CLOCK_FREQ := $(dt_node_int_prop_int,$(DT_STM32_RCC_PATH),clock-frequency)

Expand Down