org

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

org

1,047件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by blasiis on Tue Jul 20 00:34:22 MST 2010
I work with LPCXPresso and LPC1758.
I need to force many routine to high address (32k sector).
How can I make this ?
In conclusion, how can I insert a ORG (assembler directive) for move the code to high address.

Thanks
0 件の賞賛
返信
4 返答(返信)

1,039件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lucasrangit on Wed Jul 21 13:26:03 MST 2010
I'm using this suggestion but instead of executing from a specific flash location I'd like to use a RAM location. However, I am having issues. See my topic at http://knowledgebase.nxp.com/showthread.php?t=557.
0 件の賞賛
返信

1,039件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue Jul 20 03:32:27 MST 2010
What is it you are trying to achieve? In the vast majority of cases, there should be no need to move the code within flash.
0 件の賞賛
返信

1,039件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by blasiis on Tue Jul 20 02:55:45 MST 2010
If  I need to move all routine except main, i must declare every routine ?

Thanks
0 件の賞賛
返信

1,039件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue Jul 20 02:23:56 MST 2010
The easiest way to do this is probably as follows.

First of all declare the function(s) you want to place at a specific address with the section attribute....

__attribute__ ((__section__(".HighFuncs")))
void HiFunc(void) {
 :
}
For more information on function attributes see:
http://gcc.gnu.org/onlinedocs/gcc-4.3.3/gcc/Function-Attributes.html#Function-Attributes

You will then need to turn off the managed linker script mechanism, and inside your linker script file, include something like:

    .HighFuncs 0x00008000:
    {
    *(.HighFuncs)
    }  > MFlash512
[Note that when doing this, make sure that you ensure that your new sections are aligned with the start of flash sectors to avoid potential issues when the code is programmed into flash].

For more details of creating your own linker script, see the knowledgebase entry "Using your own linker scripts" at:

http://lpcxpresso.code-red-tech.com/LPCXpresso/node/31
[login required]

Regards,
CodeRedSupport
0 件の賞賛
返信