Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: can't get printf() to print on UART0 with GNU

2005-02-24 by ntfreak2000

--- In lpc2000@yahoogroups.com, "tiogate" <gate@t...> wrote:
> 
> --- In lpc2000@yahoogroups.com, "ntfreak2000" <ntfreak2@h...> wrote:
> >> 
> > All depends on what c library you are using, with  newlib you 
need 
> to 
> > override _write or _write_r (reentrant version) eg.
> > 
> > Spen
> 
> I am not sure, but I think I am not using newlib. The hint is: 
there 
> is no reent.h available. The package I installed was GCCARM331 
> downloaded from Keil Evaluation 
> (http://www.keil.com/demo/evaldl.asp). The Manuals mention "GNUPro 
> Tools" and there is not one occurrence of the word "newlib" in them.
> 
> Does anybody know what libs are these, and which function(s) I 
> should override?
> 
> Fernando

Keil gcc uses uclibc, the version you require is:

int write (int file, char * ptr, int len)
{
    return len;
}
All the system functions are just non reentrant versions.

Be careful of uisng uclibc as a clib, even though it is a better lib 
for smaller devices it comes under lgpl rather than gpl. This is only 
really a problem if you are statically linking with the libs.

Regards
Spen

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.