Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
minimal-printf should not bypass the retargetting code #11235
kjbracey-arm left a comment
If making this change, it can be pared back more.
If print character is just fputc, then the "enable file" option is no longer needed - you can just always do fputc, and get rid of that option. (But you need to pass
The "enable file" option can later be a thing that actually cuts that out at the retargetting layer, so fputc ignores its FILE parameter and just does a console write. Done there, it should be a bigger saving.
The enable file option wraps fprintf & vfprintf so it is still useful.
Okay, the enable file thing also controls "do we also send fprintf via minimal printf".
Turning that on then activated the
One different potential saving I could see is eliminating the
My last commit simpifies the logic around fputc.
I agree that we can remove the fputc dependency in mbed_minimal_putchar if only sprintf is called by the application but I would rather leave this for a different PR.