Skip to content

boards: Increase esp32h2-devkit:efuse IDLETHREAD stack to 3072#18750

Merged
simbit18 merged 1 commit intoapache:masterfrom
tmedicci:bugfix/esp32h2_efuse
Apr 17, 2026
Merged

boards: Increase esp32h2-devkit:efuse IDLETHREAD stack to 3072#18750
simbit18 merged 1 commit intoapache:masterfrom
tmedicci:bugfix/esp32h2_efuse

Conversation

@tmedicci
Copy link
Copy Markdown
Contributor

Summary

The idle task is used during initialization and its stack size is operating near the boundaries of a stack overflow, causing occasional crashes during board's bringup. This PR increases the idle task stack size to solve such an issue.

Impact

Impact on user: Yes. It prevents occasional crashes during board's bringup.

Impact on build: No.

Impact on hardware: No.

Impact on documentation: No.

Impact on security: No.

Impact on compatibility: No.

Testing

Build esp32h2-devkit:efuse defconfig with CONFIG_STACK_COLORATION to check Idle task stack usage.

Building

make -j distclean
./tools/configure.sh -S esp32h2-devkit:efuse
kconfig-tweak -e STACK_COLORATION && make olddefconfig
make flash ESPTOOL_PORT=/dev/ttyUSB0
picocom -b 115200 /dev/ttyUSB0

Running

Run ps command on NSH to check how much of the Idle task's stack is being used.

Results

nsh> ps
  TID   PID  PPID PRI POLICY   TYPE    NPX STATE    EVENT     SIGMASK            STACK    USED FILLED COMMAND
    0     0     0   0 FIFO     Kthread   - Ready              0000000000000000 0003040 0002148  70.6%  Idle_Task
    1     1     0 100 RR       Task      - Running            0000000000000000 0004032 0002020  50.0%  nsh_main

As can be seen, after increasing Idle task stack size to 3072, 70.6% of it is being used, which clearly indicates that the old value (2048) was expected to generate a stack overflow crash.

The idle task is used during initialization and its stack size is
operating near the boundaries of a stack overflow, causing
occasional crashes during board's bringup. This commit increases
the idle task stack size to solve such an issue.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
@github-actions github-actions bot added Size: XS The size of the change in this PR is very small Board: risc-v labels Apr 16, 2026
@simbit18 simbit18 merged commit 27ae597 into apache:master Apr 17, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Board: risc-v Size: XS The size of the change in this PR is very small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants