Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4906

SDK • Re: Need help with SDK and newlib.

$
0
0

Code:

int _write(int fd, void* buf, size_t cnt) {  Printf("_WRITE %u:%s, %d\n\r");
Is it good form to have printf call itself? Normally there is an independent subsystem which handles this. This subsystem is verified manually.
but why do I need to do this ?
Note C has a few translation layers. One of them is a IO/File system layer on top of the operators layers.

The SDK uses a custom printf which bypasses the IO/File stream layer. Technically the printf implementation is capable of being compliant.
I'm trying to fill in the stub functions in newlib and the SDK so that I can define custom I/O streams.
In summary hooking the C operator subsystem will not work. Want to file a bug for this?

Statistics: Posted by dthacher — Tue Dec 10, 2024 3:08 pm



Viewing all articles
Browse latest Browse all 4906

Trending Articles