fixed location for const

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

fixed location for const

934件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Jarda on Thu Oct 13 23:00:10 MST 2011
Hi,
is there any possibility to locate constant on given address in LPCXpresso? I need to put serial number to known position for automatically updating it in production.
Thank you for your tips.
Jarda
0 件の賞賛
返信
4 返答(返信)

919件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Mon Oct 17 14:20:45 MST 2011
The syntax you are trying to use, "__attribute__((at(" looks like it is taken from some code written for the Keil/RealView ARM compiler. It is not supported by GCC (as used by LPCXpresso), so I'm a little surprised that you say that it works under Rowley, (as that uses GCC too).

Thus as already pointed out, with LPCXpresso, you will need to modify the linker script.

Regards,
CodeRedSupport.
0 件の賞賛
返信

919件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Jarda on Sun Oct 16 23:28:41 MST 2011
Thank you for your answers, but it is a little bit complicated. I wish something like:
const unsigned long serial_num __attribute__((at(0x1F18))) = SER_NUM;
it works in Rowley's CrossStudio.
Is it such a possibility in LPCXpressou too, or only way is through modify linker script to define memory region?
Jarda
0 件の賞賛
返信

919件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Fri Oct 14 11:13:26 MST 2011
http://knowledgebase.nxp.com/showthread.php?t=1537
0 件の賞賛
返信

919件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Fri Oct 14 01:46:58 MST 2011
Did you search the FAQs?

http://support.code-red-tech.com/CodeRedWiki/PlacingData
0 件の賞賛
返信