Skip to main content
KSulli
Associate II
October 30, 2020
Solved

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

  • October 30, 2020
  • 2 replies
  • 3123 views

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.
Best answer by Khouloud OTHMAN

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.

2 replies

Khouloud OTHMAN
Associate
November 2, 2020

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
November 2, 2020

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
November 9, 2020

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
November 9, 2020

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
November 10, 2020

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.