Yahoo Groups archive

Lpc2000

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

Thread

newlib usage

newlib usage

2006-03-23 by Pranav Mocha

Hello all,
First of all I would like to thank the moderator for allowing me join this group. Being a newbe, I have some pretty basic questions-
1. To get functions such as printf, sprintf etc., does one have to link newlib? if so how can link newlib?
2. Is newlib to be used as a standard library? and how/where can I get the list of functions and their prototypes?

I am sorry for asking such basic questions, but having worked on Keil and turbo c, i could not really get GCC right. Thank you all in advance.

Regards
Pranav

		
---------------------------------
New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.

[Non-text portions of this message have been removed]

Re: [lpc2000] newlib usage

2006-03-23 by Robert Adsett

Quoting Pranav Mocha <parnay56@...>:
> First of all I would like to thank the moderator for allowing me join 
> this group. Being a newbe, I have some pretty basic questions-
> 1. To get functions such as printf, sprintf etc., does one have to 
> link newlib? if so how can link newlib?

It's one of several libraries that will provide that function.

> 2. Is newlib to be used as a standard library? and how/where can I 
> get the list of functions and their prototypes?

Yes it is meant to be used as a standard libary.  Function Prototypes are
available in any standard C library reference.  Basically it implements the C
standard library functions for ANSI C90.

It does, however, need to have interface functions provided so it can adapt to
different processors and boards.  One example is newlib-lpc
http://www.aeolusdevelopment.com/Articles/download.html

> I am sorry for asking such basic questions, but having worked on Keil 
> and turbo c, i could not really get GCC right. Thank you all in 
> advance.

You might want to start with something like WINARM to limit the number 
of things
you need to learn at one time.

Robert

Another newlib question

2006-03-24 by alex svetek

Hello all,

I am also starting with ARM's (LPC2138) and i would like to know if I can use newlib-lpc for my processor. 

Alex

		
---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2ยข/min or less.

[Non-text portions of this message have been removed]

Re: [lpc2000] Another newlib question

2006-03-24 by Robert Adsett

At 12:41 AM 3/24/2006 -0800, alex svetek wrote:
>I am also starting with ARM's (LPC2138) and i would like to know if I can 
>use newlib-lpc for my processor.

You should be able to.  I haven't seen a 2138 specific link file but it 
shouldn't be too hard to modify an existing one for the different memory 
map.  Newlib-lpc uses a few link time defined symbols to determine  where 
to place the heap among other things.

Robert

" 'Freedom' has no meaning of itself.  There are always restrictions,
be they legal, genetic, or physical.  If you don't believe me, try to chew 
a radio signal. "  -- Kelvin Throop, III
http://www.aeolusdevelopment.com/

Re: [lpc2000] Another newlib question

2006-03-25 by Tom Walsh

alex svetek wrote:

>Hello all,
>
>I am also starting with ARM's (LPC2138) and i would like to know if I can use newlib-lpc for my processor. 
>
>  
>
I use newlib, it drives the RDCF2 FAT filesystem for the SD card, and 
newlib functions are used extensively throughout the code: memcpy, 
strncmp, etc.  I don't use newlib-lpc only out of how I write code, I 
would prefer to write my own extensions to a library so that I can 
quickly fix any problems later rather than spend time learning what 
someone else wrote.

Newlib is essentially a foundational library of common functions: 
memcpy, strcmp, strcpy, etc.  It also embodies higher level code such as 
printf, scanf, etc.  For myself, I use the file streams logic (fopen, 
fread, fputs) to implement a FAT 12/16 filesystem layer.  Rather than 
write my own stream code, it is more convenient to use what is already 
there.

Details on building a set of development tools is at:
http://www.openhardware.net/?title=ARM%20Thumb%20tools%20for%20LPC2000&dir=ArmTools&file=ThumbToolchain.html


newlib is also used with the LPC2106 processor on my board.

TomW


-- 
Tom Walsh - WN3L - Embedded Systems Consultant
http://openhardware.net, http://cyberiansoftware.com
"Windows? No thanks, I have work to do..."
----------------------------------------------------

RE: [lpc2000] Another newlib question

2006-03-25 by Joel Winarske

Hi Alex,

In addition to Tom's info this is a good reference:
http://billgatliff.com/drupal/node/25

Also the Ethernut project has a good number of examples for implementing 
driver stubs that is applicable to implementing newlib.
http://www.ethernut.de/


Joel

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.