kprintf is GPL
magcius opened this issue · 6 comments
libogc includes a copy of kprintf, which was distributed under the GPL, despite libogc having a license most closely matching MIT.
https://github.com/devkitPro/libogc/blob/master/libogc/kprintf.c
This could easily be rectified by just removing kvsprintf and using vsprintf instead, since that's in newlib
I seem to be having memory corruption issues using printf rather than kprintf, but that's probably something else.
fwiw, kprintf is here for low footprint debug usage. It wasn't intended as a general print function and shouldn't be linked under normal use. Can have a look at replacing with newlib function but it was rather intended to avoid linking in a lot of newlib machinery in particular scenarios so I'd prefer a lightweight replacement.
You might be able to replace it with nano-vfprintf from newlib then: https://github.com/devkitPro/newlib/blob/e928275566ab8168c078eadee2043a002bd9352d/newlib/libc/stdio/nano-vfprintf.c
Been a while since this was discussed, but has anyone considered mpaland's implementation? It's MIT licensed, doesn't depend on floating point, and seems very lightweight (only 600 LOC and intended for embedded systems).
Been a while since this was discussed, but has anyone considered mpaland's implementation? It's MIT licensed, doesn't depend on floating point, and seems very lightweight (only 600 LOC and intended for embedded systems).
i took a look at this, and its more active fork @ https://github.com/eyalroz/printf, and in essence it looks good but my problem with this is that it looks to be more complex and exports the functions as printf
which we already have thanks to newlib and would cause some conflicts. however, it is +/- what we need. a printf implementation that is simple, stand alone and can work even if the whole program has crashed/caused an exception as this is where kprintf is used.