Content originally posted in LPCWare by blasiis on Mon Feb 07 02:02:03 MST 2011 LPC1758 with LCPXPresso. I need to place a array in a fixed flash address.
like this __attribute__ ((section(".??????????"))) const char Driver[20] ;
I think I need to change the .ld linker file, but how can I do this ? Ther'is a simple way to force only 20 byte ?
Content originally posted in LPCWare by CodeRedSupport on Mon Feb 07 04:34:04 MST 2011 You can do this in a similar way to the CRP mechanism that is provided as part of the enhanced managed linker script mechanism provided in LPCXpresso 3.6.x, which is described in:
[LIST] [*] Create a subdirectory called "linkscripts" within your project [/LIST]
[LIST] [*] Copy the file "link_template.ld" from Wizards directory into the "linkscripts" subdirectory (as per above FAQ). [/LIST] [LIST] [*] Assuming that the address you want to place the array into is at, say, 0x2E8 (immediately before the CRP word), then modify the link_template.ld in your linkscripts subdirectory such that you change the portion from the .text section from: [/LIST]