Skip to content

Commit f836eef

Browse files
committed
soc: st: stm32l0x: Move stack definitions to the correct place
Move CONFIG_MAIN_STACK_SIZE to be the default in the Kconfig.defconfig files and avoid code duplication in each related soc. SOC_STM32L011XX has its own configuration so keep it in its soc file. Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
1 parent bb51722 commit f836eef

File tree

5 files changed

+20
-15
lines changed

5 files changed

+20
-15
lines changed

boards/st/nucleo_l011k4/nucleo_l011k4_defconfig

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
# SPDX-License-Identifier: Apache-2.0
22

3-
# Kernel Options due to Low Memory (2k)
4-
CONFIG_MAIN_STACK_SIZE=320
5-
CONFIG_IDLE_STACK_SIZE=100
6-
CONFIG_ISR_STACK_SIZE=256
7-
83
# Serial Drivers
94
CONFIG_SERIAL=y
105
CONFIG_UART_INTERRUPT_DRIVEN=y

boards/st/nucleo_l031k6/nucleo_l031k6_defconfig

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
# SPDX-License-Identifier: Apache-2.0
22

3-
# Kernel Options due to Low Memory (8k)
4-
CONFIG_MAIN_STACK_SIZE=640
5-
CONFIG_IDLE_STACK_SIZE=200
6-
CONFIG_ISR_STACK_SIZE=512
7-
83
# Serial Drivers
94
CONFIG_SERIAL=y
105
CONFIG_UART_INTERRUPT_DRIVEN=y

boards/st/nucleo_l053r8/nucleo_l053r8_defconfig

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@
33
# Enable MPU
44
CONFIG_ARM_MPU=y
55

6-
# Kernel Options due to Low Memory (8k)
7-
CONFIG_MAIN_STACK_SIZE=640
8-
CONFIG_IDLE_STACK_SIZE=200
9-
CONFIG_ISR_STACK_SIZE=512
10-
116
# Serial Drivers
127
CONFIG_SERIAL=y
138
CONFIG_UART_INTERRUPT_DRIVEN=y

soc/st/stm32/stm32l0x/Kconfig.defconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,14 @@ config TASK_WDT_HW_FALLBACK_DELAY
1414
depends on TASK_WDT_HW_FALLBACK
1515
default 200
1616

17+
# Kernel Options due to Low Memory (8k)
18+
config MAIN_STACK_SIZE
19+
default 640 if SOC_STM32L053XX || SOC_STM32L031XX
20+
21+
config IDLE_STACK_SIZE
22+
default 200 if SOC_STM32L053XX || SOC_STM32L031XX
23+
24+
config ISR_STACK_SIZE
25+
default 512 if SOC_STM32L053XX || SOC_STM32L031XX
26+
1727
endif # SOC_SERIES_STM32L0X

soc/st/stm32/stm32l0x/Kconfig.defconfig.stm32l011xx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,14 @@ if SOC_STM32L011XX
88
config NUM_IRQS
99
default 32
1010

11+
# Kernel Options due to Low Memory (2k)
12+
config MAIN_STACK_SIZE
13+
default 320
14+
15+
config IDLE_STACK_SIZE
16+
default 100
17+
18+
config ISR_STACK_SIZE
19+
default 256
20+
1121
endif # SOC_STM32L011XX

0 commit comments

Comments
 (0)