Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 0 additions & 4 deletions boards/others/stm32f030_demo/stm32f030_demo_defconfig
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# SPDX-License-Identifier: Apache-2.0

# Kernel Options due to Low Memory (4k)
CONFIG_MAIN_STACK_SIZE=640
CONFIG_IDLE_STACK_SIZE=200
CONFIG_ISR_STACK_SIZE=512
# Prevent Interrupt Vector Table in RAM
CONFIG_SRAM_VECTOR_TABLE=n

Expand Down
4 changes: 0 additions & 4 deletions boards/st/nucleo_f030r8/nucleo_f030r8_defconfig
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# SPDX-License-Identifier: Apache-2.0

# Kernel Options due to Low Memory (8k)
CONFIG_MAIN_STACK_SIZE=640
CONFIG_IDLE_STACK_SIZE=200
CONFIG_ISR_STACK_SIZE=512
# Prevent Interrupt Vector Table in RAM
CONFIG_SRAM_VECTOR_TABLE=n

Expand Down
4 changes: 0 additions & 4 deletions boards/st/nucleo_f031k6/nucleo_f031k6_defconfig
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# SPDX-License-Identifier: Apache-2.0

# Kernel Options due to Low Memory (4k)
CONFIG_MAIN_STACK_SIZE=512
CONFIG_IDLE_STACK_SIZE=150
CONFIG_ISR_STACK_SIZE=512
CONFIG_LOG_BUFFER_SIZE=256
# Prevent Interrupt Vector Table in RAM
CONFIG_SRAM_VECTOR_TABLE=n
Expand Down
5 changes: 0 additions & 5 deletions boards/st/nucleo_g031k8/nucleo_g031k8_defconfig
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# SPDX-License-Identifier: Apache-2.0

# Kernel Options due to Low Memory (8k)
CONFIG_MAIN_STACK_SIZE=640
CONFIG_IDLE_STACK_SIZE=200
CONFIG_ISR_STACK_SIZE=512

# Serial Drivers
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
Expand Down
5 changes: 0 additions & 5 deletions boards/st/nucleo_l011k4/nucleo_l011k4_defconfig
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# SPDX-License-Identifier: Apache-2.0

# Kernel Options due to Low Memory (2k)
CONFIG_MAIN_STACK_SIZE=320
CONFIG_IDLE_STACK_SIZE=100
CONFIG_ISR_STACK_SIZE=256

# Serial Drivers
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
Expand Down
5 changes: 0 additions & 5 deletions boards/st/nucleo_l031k6/nucleo_l031k6_defconfig
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# SPDX-License-Identifier: Apache-2.0

# Kernel Options due to Low Memory (8k)
CONFIG_MAIN_STACK_SIZE=640
CONFIG_IDLE_STACK_SIZE=200
CONFIG_ISR_STACK_SIZE=512

# Serial Drivers
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
Expand Down
5 changes: 0 additions & 5 deletions boards/st/nucleo_l053r8/nucleo_l053r8_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
# Enable MPU
CONFIG_ARM_MPU=y

# Kernel Options due to Low Memory (8k)
CONFIG_MAIN_STACK_SIZE=640
CONFIG_IDLE_STACK_SIZE=200
CONFIG_ISR_STACK_SIZE=512

# Serial Drivers
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
Expand Down
4 changes: 0 additions & 4 deletions boards/st/stm32f0_disco/stm32f0_disco_defconfig
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# SPDX-License-Identifier: Apache-2.0

# Kernel Options due to Low Memory (8k)
CONFIG_MAIN_STACK_SIZE=640
CONFIG_IDLE_STACK_SIZE=200
CONFIG_ISR_STACK_SIZE=512
# Prevent Interrupt Vector Table in RAM
CONFIG_SRAM_VECTOR_TABLE=n

Expand Down
5 changes: 0 additions & 5 deletions boards/st/stm32g0316_disco/stm32g0316_disco_defconfig
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# Kernel Options due to Low Memory (8k)
CONFIG_MAIN_STACK_SIZE=640
CONFIG_IDLE_STACK_SIZE=200
CONFIG_ISR_STACK_SIZE=512

# Serial Drivers
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
Expand Down
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