Content originally posted in LPCWare by jojuden on Wed May 11 07:08:25 MST 2011
Quote: gbm
In the demo code pack from CodeRed you will find something called RDB1768cmsis_LedFlash_64k. This shows how to relocate the code to arbitrary address. Modification of linker scripts is required. There is also an article on this topic at CodeRed support site.
Thanks for quick reply. I did not find that demo, but I found out how to edit those linker scripts. I disabled auto management of linker script from project properties -> MCU linker -> target, copied and renamed original .ld files generated by LPCexpresso, defined where to find my own linker scripts. Also edited linker script so that includes refers correctly my newly created copies of _mem.ld and _lib.ld sripts.
I put my own linker scripts to project root /linkscript folder at first it did not work. I found out that it requires that _mem.ld and _lib.ld have to be located at project root. Using <> instead of "" in include clauses seems to work also.