[coldfire-gnu-discuss] Sourcery G++ Lite support for m5235evb serial I/F ?
Kazu Hirata
kazu at codesourcery.com
Mon Nov 26 16:14:11 UTC 2007
Hi Christof,
> is there any support from the Lite version for <stdio.h> functions ( in particular printf(); ) to work via the serial communication interface of the M5235BCC evaluation board from Freescale ?
You need to override "write".
ssize_t write(int fd, const void *buf, size_t count);
Your version of write should take COUNT characters from BUF. You can
ignore FD. printf uses the function to write to stdout. You still have to
write the serial port support yourself.
If you would like printf support just for debugging purposes, you can route
stdout to gdb's console just by linking your application with -T
m5235evb-ram-hosted.ld or m5235evb-rom-hosted.ld. In that case, you do not
need to override "write". The default version of "write" knows how to
print characters at gdb's console.
Hope this helps,
Kazu Hirata
More information about the coldfire-gnu-discuss
mailing list