[coldfire-gnu-discuss] Sourcery G++ Lite support for m5235evb serial I/F ?

Christof Frey Christof.Frey at varian.com
Mon Nov 26 16:24:24 UTC 2007


Thank you very much for this quick support

Christof

-----Original Message-----
From: Kazu Hirata [mailto:kazu at codesourcery.com]
Sent: Monday, November 26, 2007 5:14 PM
To: Christof Frey
Cc: coldfire-gnu-discuss at codesourcery.com
Subject: Re: [coldfire-gnu-discuss] Sourcery G++ Lite support for m5235evb serial I/F ?

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