Yahoo Groups archive

Lpc2000

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

Message

Re: LPC2106 IAP

2004-03-25 by Peter

--- In lpc2000@yahoogroups.com, David Bermingham <crwpulsar@y...> 
wrote:
> Thanks for the reply, Im using ARM ADS 1.2 to compile the code! 
Does anybody know how or if I have to turn on interworking for ADS?

Hi David, yes you need to turn on interworking, however this is done 
for you automatically if you create an application using the 
Thumb/ARM interworking template. This is convenient as you simply 
place source files to be built as ARM code in the ARM subproject, 
and the IDE takes care of all the other details.

Alternatively, you'll find the interworking tickbox in the project 
settings dialog, under the ATPCS tab when you select the assembler, 
ARM C compiler or Thumb C compiler. A major irritation (for me 
anyway) is that you have to set this for each subproject (Thumb and 
ARM), each target (Debug, DebugRel, Release) and each tool (asm, C, 
C++) that you use.

>  
> Also, I have a routine which has to be executed out of RAM instead 
of Flash to operate properly. When I change the scatterloading file 
so that aes.o is loaded in RAM the program never branches to 
it...its like its not there!!
> When I check the map file generated by ADS it says the code is 
located in RAM.
>  
> Is there a way to set up the scatterloading file so that the 
routine is copied from Flash to RAM and executed from RAM?

Can I ask first if you have a main() function in your project? If 
you have, then the linker pulls in some C-startup code, which 
includes a section to move code and initialised data from their load 
positions (in Flash) to their execute positions in RAM.

If not, you have to write your own code snippets in the reset 
handler to move the code and data around. Conveniently, the linker 
will generate symbols giving you the load address, execution 
address, and length of each region to be moved. See page 4-2 of the 
Linker and Utilities guide, for a description of the format for 
these symbols.

HTH, Peter.

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.