I want use the function printf
to print character on the serial port. I have read these 2 posts 1 and 2, But I'am not sure to understand the manip:
in the 1st link it's said:
To enable printf functionality, first you need to create a new __FILE
struct. This struct is then called with FILE struct.
Why I have to create __FILE
struct I didn't realy undrestand this sentence.
In the 2nd link it's said
To complete the separation from the standard I/O library we also have had to redefine __stdout
and __stdin
. These can be found inside the retarget.c file below the declaration of the __FILE
structure.
If I redefine these 2 variables isn't that a compilation error I mean a redefinition.