Keil™, An ARM® Company

Discussion Forum

how to specify a function to a fixed address

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

DetailsMessage
Read-Only
Author
lilian yao
Posted
2-Jan-2007 22:53
Toolset
C51
New! how to specify a function to a fixed address

i use keil's uVison IDE to develop my code banking project. when i change VM to replace new programe space, i encounter a problem. in order to setup the "synchronized code" throught out the change process of my program space, i need to specify this function in a fixed address. how can i implement it in uVision's linker tool?

Read-Only
Author
Drew Davis
Posted
3-Jan-2007 11:08
Toolset
C51
New! RE: how to specify a function to a fixed address

See the CODE (BL51) or SEGMENTS (LX51) directives.

It's often useful to store entry points in a vector table. This means you only have one well-known address that has to be fixed in place, and allows you to update the code more easily. Fixed addresses tend to become problems when the size of the functions change. The drawback to the vector table is of course the extra level of indirection.

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