Yahoo Groups archive

Lpc2000

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

Message

Re: [lpc2000] Re: _start code crashes

2006-03-14 by Robert Adsett

At 12:49 AM 3/14/2006 +0000, Rebekah Moser wrote:
>--- In lpc2000@yahoogroups.com, "Rebekah Moser" <moserr@...> wrote:
> > I disassembled the code it jumps to for _start,
> > which looks like so:
> >
> > 0x00000258  E3A00016  MOV       R0,#0x00000016
> > 0x0000025C  E28F10E8  ADD       R1,PC,#0x000000E8
> > 0x00000260  EF123456  SWI       0x00123456
>
>More info on this - this code comes from crt0.o.  It appears that gcc
>version 4.0.2 has several crt0 options:  crt0.o, rdimon-crt0.o,
>rdpmon-crt0.o, and redboot-crt0.o.  Not all of them have the offending
>SWI instruction in them.  What is the difference between these?

Those are all for different boards (some with built-in monitors) and since 
you are asking in an LPC group it's likely that none are appropriate.  You 
need startup specific to the LPC to deal with its memory map and any other 
init you want to occur before the main C code, just as you would for any 
other microcontroller.

There are multiple examples around.  I think there are some in the groups 
files section.  Also take a look at the newlib-lpc stuff at 
http://www.aeolusdevelopment.com/Articles/download.html although that's set 
up for newlib and the distribution you are using appears to be using a 
different library. You might also want to take a look at the WINARM 
distribution which includes the newlib-lpc stuff. There is also the 
Crossworks distribution which includes a number of other items.

Robert

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.