How to exclude code from flash space? LPC1114

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

How to exclude code from flash space? LPC1114

695件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by JSalisbury on Tue Aug 23 04:06:45 MST 2011
Hi,
I would like to use the upper 2 flash sectors for use as flash based non-volatile storage as per AN11008. What is the best way to arrange the linker script for this, it is posiable to use cr_section_macros.h or do I have to manualy edit the linker script?

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

676件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Tue Aug 23 06:22:49 MST 2011
This is described here:
http://support.code-red-tech.com/CodeRedWiki/OwnLinkScripts
0 件の賞賛
返信

676件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Rob65 on Tue Aug 23 05:08:01 MST 2011
You have to change the linker script.
But do remember that you should not change the default linked script as that one can/will be overwritten by the LPCXpresso tools.

The best way to do this is to create a new directory called linkscripts and copy the linker script file to that directory.
The RDB1768cmsis2_usb_bootloader example contains a section called 'Modifying your linker scripts' that contains a step by step instruction on how to do this.

When changing the linker script you have two options: The first (and easiest one) is to just change the length of the Flash section to exclude the last two sectors. Your software will have to hard code the addresses of these sectors.
The second is to add separate sections for both sectors and use the _SECTION macro from cr_section_macros.h to place two arrays in these sections.

I'd go for the easy solution and just change the end address of the Flash section.

Rob
0 件の賞賛
返信