Customizing linker options | Cypress Semiconductor
Support & Community
Customizing linker options
Is it possible to customize the actions of the Linker when a PSoC Designer build does not provide the user interface to support these actions?
A file called custom.lkp can be created in the root folder of the project, which can contain Linker commands (see the Command Line Compiler Overview section in PSoC Designer: C Language Compiler User Guide).
The file name must be custom.lkp. Be aware that in some cases, creating a text file and renaming it will still preserve the .txt file extension (e.g. custom.lkp.txt). If this occurs, custom commands will not be used. The make file process, reads the contents of custom.lkp and amends those commands to the Linker action.
A typical use for employing the custom.lkp capability would be to define a custom relocatable code AREA. Using a custom AREA and the custom.lkp file allows setting a specific starting address for this AREA.