Reply by Paul Curtis February 20, 20072007-02-20
Jan,

If you look at the Philips_LPC210X_Startup.s you will find a definition
SRAM_EXCEPTIONS; define that and your vectors are copied from flash to SRAM
and the memory map set accordingly--no need to mess around with memory maps.
You can define SRAM_EXCEPTIONS in the project file.

--
Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
CrossWorks for ARM, MSP430, AVR, MAXQ, and now Cortex-M3 processors

> -----Original Message-----
> From: l... [mailto:l...] On
> Behalf Of Jan Thogersen
> Sent: 21 February 2007 02:22
> To: l...
> Subject: [lpc2000] Placing interrupt vectors in ram with CrossWorks and
> LPC2XXX
>
> Hi all,
>
> In my project I use a bootloader which forces my user-code to place
> it's
> vectors @ 0x40000000.
> But this is apparently easier said than done... I searched through
> Yahoo's group history and also on Rowley's faq. However, I'm not closer
> to the solution.
>
> I believe that the c runtime initializer would be able to copy my
> vectors to ram, but so far I haven't succeeded.
>
> I changed the flash placement xml file so that the ".vectors" section
> would "runin" the ".vectors_ram" section.
> Se below! (It's only the vector part)
>
>
>
> > name=".vectors" runin=".vectors_ram"/>
>
>
>
>
> Now, I would then believe that the section should be automatically
> copied from flash to ram by the c runtime initializer. But when I debug
> it I see that only vars and zeroed memory is initialized. The area
> 0x40000000 to 0x4000003C where the vectors should be placed is empty.
> Do I have to copy the vectors myself, if not what is the procedure
> then?
> Code snippet?
>
> btw. What is it exactly the "load" keyword does?
>
> Thanks in advance!
>
> Regards
> Jan
>
> Yahoo! Groups Links
>

An Engineer's Guide to the LPC2100 Series

Reply by Jan Thogersen February 20, 20072007-02-20
Hi all,

In my project I use a bootloader which forces my user-code to place it's
vectors @ 0x40000000.
But this is apparently easier said than done... I searched through
Yahoo's group history and also on Rowley's faq. However, I'm not closer
to the solution.

I believe that the c runtime initializer would be able to copy my
vectors to ram, but so far I haven't succeeded.

I changed the flash placement xml file so that the ".vectors" section
would "runin" the ".vectors_ram" section.
Se below! (It's only the vector part)



name=".vectors" runin=".vectors_ram"/>






Now, I would then believe that the section should be automatically
copied from flash to ram by the c runtime initializer. But when I debug
it I see that only vars and zeroed memory is initialized. The area
0x40000000 to 0x4000003C where the vectors should be placed is empty.
Do I have to copy the vectors myself, if not what is the procedure then?
Code snippet?

btw. What is it exactly the "load" keyword does?

Thanks in advance!

Regards
Jan