cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE + FreeRTOS + LWIP

spoatech
Associate II

Does anyone know what is causing this error and how to fix it in STMCubeIDE?

 

spoatech_0-1709573051963.png

 

As shown, this is specific to STM32F107VCT as it may be that STM32F4 does not see this. Buildable code cannot be generated.

Thanks!

@Amel NASRI 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @spoatech 

Have you tried to change the value in red here :

STTwo32_0-1709638196309.png

to 1 on the .IOC file and then regenerate the code. That should work.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

9 REPLIES 9
STTwo-32
ST Employee

Hello @spoatech 

Could you please share your.ioc file?

Best Regards.

STTwo-32 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hi @STTwo-32 STTwo-32,

Thanks for the quick replay. The ioc file is attached.

Cheers

The RTOS_NEWLIB_REENTRANT (FREERTOS USE_NEWLIB_REENTRANT 1) is linked to FREERTOS API CMSIS version parameter. It should be set to 1 so a newlib reent structure will be allocated for each created task wish allow. This parameter takes 0 or 1 to eliminate the warning message. More details on the MACRO available in this link.

Best Regards.

STTwo-32

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hi @STTwo-32 

So, I went into the FreeRTOSConfig.h file and found this already set to 1.

 

/* The following flag must be enabled only when using newlib */

#define configUSE_NEWLIB_REENTRANT 1

 

Then found this in the FreeRTOS.h file:

 

/* Must be defaulted before configUSE_NEWLIB_REENTRANT is used below. */

#ifndef configUSE_NEWLIB_REENTRANT

#define configUSE_NEWLIB_REENTRANT 1

#endif

 

... and set that to 1. The error in the .ioc does not clear and the code still won't build.

It looks like this is not an easy solution. I get the impression that I need to download newlib

from github and add it to the build. Is that correct? This seems to be a nightmare. Perhaps I could use

FreeRTOS + TCP and dump LWIP ... which may turn out to be a nightmare also. What do you recommend?

 

Cheers

 

 

Hello @spoatech 

Have you tried to change the value in red here :

STTwo32_0-1709638196309.png

to 1 on the .IOC file and then regenerate the code. That should work.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hi @STTwo-32 

Yes, that was the first thing I tried before opening this post. This field does not accept changes.

Is newlib already tucked into this tree? Even if I were able to change that field, which I can't, does this project still need newlib added to the build tree?

Cheers

 

Hi @STTwo-32 ,

Correction ... it did accept a change to 1. It builds now without errors!!

I've been able to change this value on my side using CubeIDE 1.14.1 and everything works fine for me with no need to add any newlib:

STTwo32_0-1709638886583.png

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

spoatech
Associate II

@STTwo-32 

That works after all. The code builds without errors.

Thanks for your help!!