cancel
Showing results for 
Search instead for 
Did you mean: 

Using Newlib in IAR Workbench

sommer
Associate II
Posted on August 18, 2015 at 12:06

I am trying to port a project developed using Eclipse for the STM32 Discovery board into IAR Workbench. While trying to compile the project, I have the following error: ''Error[Pe020]: identifier ''_impure_ptr'' is undefined '', which I have realized is due to the usage of the _impure_ptr from reent.h file in Cygwin. I am not sure if this is only for Eclipse. If this is for Eclipse, where can I find the necessary header files for ensuring that the project compiles in IAR Workbench too. I have already tried setting ''configUSE_NEWLIB_REENTRANT'' to 0 but to no avail. I think that the previous developers have included this in the FreeRTOSConfig.h for some reason and probably I should not mess with it. Could someone help me with this issue.

#stm3 #freertos
2 REPLIES 2
Amel NASRI
ST Employee
Posted on August 18, 2015 at 14:15

Hi lieber.sommer,

Why don't you start with a template project built for IAR that you may find in Standard library or Cube package (depending on the library you are using)?

You can import your source code to this project then compile it with IAR to check if ay other update is needed.

-Mayla-

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.

sommer
Associate II
Posted on August 18, 2015 at 14:36

Hi Mayla,

I have tried to do that. I have a working RTOSDemo which I have done using one of the demos provided by FreeRTOS specific for STM32F4. Now that I have a working demo, I tried to import the source code into this project. The source code has a different FreeRTOSConfig.h file and I am not sure how I should proceed due to the error with the _impure_ptr variable.