Skip to content

Conversation

djiatsaf-st
Copy link
Contributor

@djiatsaf-st djiatsaf-st commented Jul 8, 2025

Following discussions in #85368

This PR moves the definitions of MAIN_STACK_SIZE, IDLE_STACK_SIZE, and ISR_STACK_SIZE to a family Kconfig level.

These changes specifically concern the STM32 families boards with low RAM memory (less than 8 KiB).

Copy link
Contributor

@mathieuchopstm mathieuchopstm left a comment

Choose a reason for hiding this comment

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

LGTM functionally.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 8, 2025

mathieuchopstm
mathieuchopstm previously approved these changes Jul 8, 2025
@mathieuchopstm mathieuchopstm added this to the v4.3.0 milestone Jul 9, 2025
FRASTM
FRASTM previously approved these changes Jul 9, 2025
@djiatsaf-st djiatsaf-st marked this pull request as draft August 7, 2025 14:10
@github-actions
Copy link

github-actions bot commented Oct 7, 2025

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

@github-actions github-actions bot added the Stale label Oct 7, 2025
@mathieuchopstm
Copy link
Contributor

@djiatsaf-st @erwango is this intended to ship in 4.3? otherwise, update milestone

@github-actions github-actions bot removed the Stale label Oct 9, 2025
@erwango
Copy link
Member

erwango commented Oct 9, 2025

@djiatsaf-st @erwango is this intended to ship in 4.3? otherwise, update milestone

We have 2 weeks, so it remains doable. Up to @djiatsaf-st to confirm.

@djiatsaf-st
Copy link
Contributor Author

@djiatsaf-st @erwango is this intended to ship in 4.3? otherwise, update milestone

We have 2 weeks, so it remains doable. Up to @djiatsaf-st to confirm.

I plan to resume this next week

@djiatsaf-st djiatsaf-st dismissed stale reviews from FRASTM and mathieuchopstm via 11935ec October 15, 2025 13:01
@djiatsaf-st djiatsaf-st force-pushed the handle_stack branch 2 times, most recently from 11935ec to fea885e Compare October 15, 2025 13:16
@djiatsaf-st djiatsaf-st marked this pull request as ready for review October 15, 2025 13:17
Copy link
Member

@erwango erwango left a comment

Choose a reason for hiding this comment

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

soc: st: stm32: add common kconfig symbols for kernel stack size should be the first commit.
Also:

add common kconfig symbol for main, idle and isr stack sizes,

Please reword the message: You're not adding the Kconfig symbol, as it exists already, but provide default value depending on ...

@djiatsaf-st
Copy link
Contributor Author

Updated

soc: st: stm32: add common kconfig symbols for kernel stack size should be the first commit. Also:

add common kconfig symbol for main, idle and isr stack sizes,

Please reword the message: You're not adding the Kconfig symbol, as it exists already, but provide default value depending on ...

Provide default values for common kconfig symbols for main, idle and
isr stack sizes, which apply on all STM32 MCU families with low RAM
memory(less than 8 KiB).
These kconfig symbols help reduce kernel sizes to fit within
limited RAM.

Signed-off-by: Fabrice DJIATSA <[email protected]>
These kconfig symbols will be handle in family Kconfig
level.

Signed-off-by: Fabrice DJIATSA <[email protected]>
These kconfig symbols will be handle in family Kconfig
level

Signed-off-by: Fabrice DJIATSA <[email protected]>
These kconfig symbols will be handle in family Kconfig
Level

Signed-off-by: Fabrice DJIATSA <[email protected]>
@sonarqubecloud
Copy link


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.

@jhedberg jhedberg merged commit 3574533 into zephyrproject-rtos:main Oct 17, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants