Hello,
I'm having an issue with re-targeting the C library.
I'm using RL-Flash + RL-TCP + RTX.
I have (want) my printf etc (stdin, stdout stderr) erdirected to a UART.
While reading the documentation I saw that to re-target printf you must re-define fputc.
But when I do this it causes problems with fread/fwrite...
So if I only re-target the _sys_ functions everything seems to work BUT I can not use putchar, etc...
So I tried a combination similar to this: my.st.com/.../Retarget.c
Still does not work.
How do correctly re-target the ARM C library such that:
Also as a follow up can somebody explain:
#pragma import(_main_redirection)
Thanks.
M
Hi Franc,
Thanks for your help and info.
Do you know the library call order for fputc -> _sys_write?
Also, I noticed in the SD_File example in the getline functtion they did not use getchar but rather getkey (a custom function)
Is this because there is no way to have getchar return after a single character?
Thanks again.