printf(), outbyte(), ...

Jeff Johnston jjohnstn@redhat.com
Fri Jun 2 18:56:00 GMT 2006


Torsten Mohr wrote:
> Hi,
> 
> to use printf() in own programs i added the function 
> void outbyte(char c).
> 
> But i don't get no output when i use printf().
> 
> I run newlib-1.14 on an NEC V850.
> 
> I wonder how i could track this problem down a bit closer.
> 
> To my understanding i need to just implement void outbyte(char c);
> Do i need more?
> 
> 
> Best regards,
> Torsten.

I don't know where you got the idea from, but there is no call from 
printf to a function called outbyte.  Printf sits atop the write syscall 
which for your platform is found in newlib/libc/sys/sysnecv850/write.c. 
  In this particular case it is causing a trap to occur.  I am not at 
all familiar with the platform, but it is possible that this code was 
set up to run exclusively with a simulator.  A simulator sometimes 
translates a magic trap value to appropriate syscalls on the platform 
running the simulator.

-- Jeff J.



More information about the Newlib mailing list