Task stacks in the latest esp-idf version are much smaller

CharlesSeartech
Posts: 19
Joined: Fri Oct 06, 2017 10:27 am

Task stacks in the latest esp-idf version are much smaller

Postby CharlesSeartech » Fri Jun 08, 2018 11:44 am

Hello,

I updated esp-idf on 4 June 2018 from a version on the 22 March 2018 and found the tasks I start the stacks are much smaller. I have seen this before but can't remember between which versions.

Why would the EPS tasks like esp_timer or wifi not be affected but my initiated task stacks are 800 bytes or more smaller. I got stack overflow detection's and had to increase the stack sizes across most of my tasks.
For example the first decode_thread was from esp-idf 22/3/2018 and the second from 4/6/2018:

Code: Select all

Name            State   Priority Stack  Num
22/3/2018
decode_thread   R       5       2268    14
esp_timer          B       22      1972    1
wifi                   B       23      1912    21

Code: Select all

4/6/2018
decode_thread   R       5       220     14
esp_timer          B       22      1892    1
wifi                   B       23      1884    21
These are the only changes in sdkconfig:
CONFIG_BOOTLOADER_FACTORY_RESET=
CONFIG_BOOTLOADER_APP_TEST=
CONFIG_WARN_WRITE_STRINGS=
CONFIG_ADC_FORCE_XPD_FSM=
CONFIG_ADC2_DISABLE_DAC=y
CONFIG_ESP32_DEBUG_STUBS_ENABLE=
CONFIG_ESP_ERR_TO_NAME_LOOKUP=
CONFIG_ESP32_WIFI_CSI_ENABLED=
CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_0=y
CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_1=
CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=
CONFIG_FATFS_API_ENCODING_ANSI_OEM=y
CONFIG_FATFS_API_ENCODING_UTF_16=
CONFIG_FATFS_API_ENCODING_UTF_8=
CONFIG_USE_ONLY_LWIP_SELECT=

Any help will be appreciated.

Regards,
Charles

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Task stacks in the latest esp-idf version are much smaller

Postby WiFive » Sat Jun 09, 2018 5:54 am

You are printing the minimum recorded amount of free stack so what you mean is "why is my task using more of its stack"?

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: Task stacks in the latest esp-idf version are much smaller

Postby fly135 » Sat Jun 09, 2018 3:14 pm

If you weren't printing debug info from that thread and later did, then the stack low water mark will be reduced. Not sure if this is what happened, but thought I'd throw it out just in case.

John A

Who is online

Users browsing this forum: No registered users and 108 guests