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 Lewin A.R.W. Edwards

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()

-- Lewin A.R.W. Edwards (http://www.zws.com/)
Learn how to develop high-end embedded systems on a tight budget!
http://www.amazon.com/exec/obidos/ASIN/0750676094/zws-20

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.