FreeRTOS task how to use the stack? #9414
Replies: 4 comments 1 reply
-
Such questions will best be explained by our experts in the ESP-IDF repo. You have access to plenty or RAM, so that 2/4K stacks are not an issue. You could run a small stack, just make sure you are not printing inside or do other things that would use the stack. |
Beta Was this translation helpful? Give feedback.
-
Note that this is architecture dependent. This code only uses 232 bytes on a -C3, and over 728 on an -S3. Are you testing this on a dual-core STM32? |
Beta Was this translation helpful? Give feedback.
-
Hello, I would like to know if there is any clear information or documentation that can explain the difference between the resource consumption of ESP32 dual-core architecture and single-core when running RTOS, or the details of dual-core architecture? Because from the experience of single-core development, it is estimated that the resources of an empty task are too large.In fact, I found that the Bluetooth and Wi-Fi resources consumed in the program are more than 100K, but I don't know enough about these 2 parts and how to optimize the resources, even if the menuconfig chooses to prioritize the allocation of WiFi Bluetooth resources to the PSRAM, but it doesn't work. So I focused on other seemingly simple tasks. |
Beta Was this translation helpful? Give feedback.
-
This forum is for fixing issues with the code contained in the the repo. For general discussion and questions, please use https://esp32.com |
Beta Was this translation helpful? Give feedback.
-
Board
ESP32-S3-WROOM-1U
Device Description
I create a task in my app,the task just have a single loop,but when I check it's space used,it used 576 Byte stack ? I want to konw more detils about the situation for optmize source used. The idf version: V4.4.1

Hardware Configuration
when I set the same situation in helloworld example,also used may by 618 Byte.
Version
other
IDE Name
esp-idf V4.4.1
Operating System
Window 10
Flash frequency
80MHz
PSRAM enabled
yes
Upload speed
115200
Description
I want to use resources more economically, because it is possible to run a stack task with a size of only 128 bytes on STM32, why does ESP32 use hundreds of bytes?
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
Beta Was this translation helpful? Give feedback.
All reactions