Comment by Neywiny

2 days ago

In school we were taught that the OS does the printf. I think the professors were just trying to generalize to not go on tangents. But, once I learned that no embedded libc variants had printf just no output path, it got a lot easier to figure out how to get it working. I wish I knew about SWO and the magic of semihosting back then. I don't think those would be hard to explain and interestingly it's one of the few things students asked about that in the field I'm also asked how to do by coworkers (the setting up _write).

> But, once I learned that no embedded libc variants had printf just no output path

Did you mean "once I learned that no, embedded libc variants have printf"?

To clarify as I had to check, embedded libc variants do indeed have some (possibly stripped-down) implementation of printf and as you say they just lack the output path (hence custom output backends like UART, etc).

  • Sorry yes I had a comma there and then deleted it. I don't remember why but I remember doing it.