Yahoo Groups archive

Lpc2000

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

Message

Re: [lpc2100] Many thanks to ariusdsp -> how to build application ?

2003-12-16 by Robert Adsett

At 03:57 PM 12/16/03 -0500, you wrote:
>Hello,
>
> > I think i remember to read something the program start was 0x8000,
> > and when i call gdb i see that start is 0x8000. But for LPC210x this
>
>You need to use a linker script.
>
>I have made the example programs from my getting-started-with-ARM book
>available for download from my web site :
><http://www.zws.com/publications/downloads/sourcecode.tar.gz> (If you
>are downloading with certain versions of Internet Explorer, you may have
>to correct the filename - MSIE will try to save it as "sourcecode.tar.tar").
>
>These will show you how to link applications for various startup
>methods. I suggest you look at the rom-blinker example. These code
>snippets are actually for Atmel AT91R40807, but the makefiles and linker
>scripts are what you want to look at. The startup code could be of
>interest too.
>
> > Must i have the startup stub or why can't i directly jump to main ?
> > Is the stub for initializing the variable & other things ?
>
>The minimum startup code must:
>
>* contain the ARM exception vector table (which lives at 0x0000)
>* copy initialized variables from ROM to RAM
>* set up stack(s)
>* zero out the heap (optional but STRONGLY RECOMMENDED)
>* jump to main()

Also set uninitialized globals to 0.  That way you get a fairly standard C 
run-time environment.

I've never bothered zeroing the heap since after the first free it's not 
zeroed anyway so why bother?


" '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

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.