Keil Logo Arm Logo

locating a piece of code

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Details Message
Read-Only
Author
Dimple Bhana
Posted
30-Aug-2007 06:48 GMT
Toolset
ARM
New! locating a piece of code

Hi all,

i am using keil uvision3 with ulink.(mcb2100)
can i locate a piece of code to a specific location in internal rom or in internal ram?

What i want to do is,i want to locate some piece of code in rom and some(frequently changed while developing) in ram. i dont want to reload code in ROM every time (as flash writes are limited).i need to just load code which is located in ram.how would i do this?? I think scatter file may be a solution but how?

Thanks,
Dimple.

Read-Only
Author
Kobi Hayun
Posted
30-Aug-2007 07:46 GMT
Toolset
ARM
New! RE: locating a piece of code

Hi,

Yes you can,

Simply use the __at directive.

For example:

unsigned char Arr[ArrSize] __at (0x7000).

It will locate that array at the internal FLASH at address 0x7000

Read-Only
Author
Dimple Bhana
Posted
30-Aug-2007 09:48 GMT
Toolset
ARM
New! RE: locating a piece of code

Thanks for early reply.

I think you didnt unerstans my question!
i want to locate a piece of CODE not variables.

Read-Only
Author
suvidh k
Posted
30-Aug-2007 14:07 GMT
Toolset
ARM
New! RE: locating a piece of code

Use scatter loading file and define different load regions.
Generate a binary/hex from the axf file using "fromelf" command prompt utility. The output will be two different files for the load regions defined.
Sample scatter loading description and usage of "fromelf" can be found in the realview linker manual.

Suvidh

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.