Loading...
 
Skip to main content

System Workbench for STM32


Why compiling structure in Keil works, and not in SW?

Hi all,
I tried to build a project in SW. Files were first made in Keil. There it compiles.
But now in SW I get the following error where it complains about that the structure has no members:
Image

I am puzzled, perhaps it has to do something with stdio.h though?
Thank you for your help!

I can't say why it works with Keil, but from what I can see, the fputc() function defines parameter as type FILE, whereas the struct declaration in the header is named __FILE (two leading underscores).

inputFunctionPointer and outputFunction pointers are members of the __FILE struct, but are _not_ members of FILE.

I would also advise that __FILE be declared as a type, like this:

typdef struct
{
...
}
__FILE;