Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kprintf is GPL #75

Open
magcius opened this issue Feb 14, 2020 · 6 comments
Open

kprintf is GPL #75

magcius opened this issue Feb 14, 2020 · 6 comments

Comments

@magcius
Copy link
Contributor

magcius commented Feb 14, 2020

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

@endrift
Copy link
Contributor

endrift commented Feb 14, 2020

This could easily be rectified by just removing kvsprintf and using vsprintf instead, since that's in newlib

@magcius
Copy link
Contributor Author

magcius commented Feb 14, 2020

I seem to be having memory corruption issues using printf rather than kprintf, but that's probably something else.

@WinterMute
Copy link
Member

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.

@endrift
Copy link
Contributor

endrift commented Nov 29, 2020

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

@HTV04
Copy link
Contributor

HTV04 commented Jul 16, 2023

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).

@DacoTaco
Copy link
Member

DacoTaco commented Apr 21, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants