Skip to main content
KSulli
Associate II
Oct 30, 2020 9:56 AM UTC
Solved

Any option in CubeMX that allows for changing the stack size of the "Ethif" task ( INTERFACE_THREAD_STACK_SIZE)?

Hello, The stack size is defined by a macro definition, INTERFACE_THREAD_STACK_SIZE inside the "ethernetif.c" file located under: LWIP/Target.

I had to manually increase the size due to stack overflow and any new code generation via CubeMX overwrites those changes. Since code generation always defaults the size of INTERFACE_THREAD_STACK_SIZE to 350, I would hope that there would be a way to adjust it via CubeMX?

This topic has been closed for replies.
Khouloud OTHMAN
Khouloud OTHMANBest answer
Associate
Nov 9, 2020 4:28 PM UTC

Hi KSulli,

Backing to this problem, and since INTERFACE_THREAD_STACK_SIZE value is handled in the "ethernetif.c" file, STM32CubeMX later version doesn't overwrite the manual changes made by the user.

The .ioc file you have attached is created with an old 5.4.0 CubeMX version and that's why overwriting problem occurs . Please try newer version, that may be a workaround for your problem.

You will find linked STM32CubeMX version 6.0.1: https://www.st.com/en/development-tools/stm32cubemx.html

Regards,

Khouloud.

7 replies

Khouloud OTHMAN
Associate
Nov 2, 2020 3:27 PM UTC

Hello KSulli,

Could you please attach your .ioc file or precise which MCU are you using ?

Thanks in advance,

Reagards,

Khouloud.

KSulli
KSulliAuthor
Associate II
Nov 2, 2020 4:59 PM UTC

Hello Khouloud,

Please see the attached copy of my .ioc file for the STM32F765IIKx MCU.

Thanks very much for looking into it for me.

Best regards,

Kevin

Khouloud OTHMAN
Khouloud OTHMANBest answer
Associate
Nov 9, 2020 4:28 PM UTC

Hi KSulli,

Backing to this problem, and since INTERFACE_THREAD_STACK_SIZE value is handled in the "ethernetif.c" file, STM32CubeMX later version doesn't overwrite the manual changes made by the user.

The .ioc file you have attached is created with an old 5.4.0 CubeMX version and that's why overwriting problem occurs . Please try newer version, that may be a workaround for your problem.

You will find linked STM32CubeMX version 6.0.1: https://www.st.com/en/development-tools/stm32cubemx.html

Regards,

Khouloud.

KSulli
KSulliAuthor
Associate II
Nov 9, 2020 6:45 PM UTC

Hi Khouloud,

Many thanks for getting back to me with a potential workaround for this. I will give the newer version a try.

All the best,

Kevin

Khouloud OTHMAN
Associate
Nov 10, 2020 10:56 AM UTC

Hello KSulli,

Thank you for your feedback. Glad to know we are able to resolve the issue in a way that is satisfactory.

You're welcome anytime.

Regards,

Khouloud.