Datasheet

106 PSoC Designer IDE Guide, Document # 001-42655 Rev *B
Build Manager
6.3.1 ImageCraft Specific Linker Options
Configuration options of imagecraft specific linker are as follows:
Relocatable code start address specifies the first Flash address for the linker to start placing relo-
catable code areas. This address may be entered in decimal or hexadecimal but is displayed in
decimal.
Object/library modules specifies a list of libraries to link in addition to the default library.
Additional library path specifies a library path alternative to the default.
Refer to the ImageCraft C Compiler Guide for more information.
6.3.2 HI-TECH Specific Linker Configuration Options
Configuration options of Hi-tech specific linker are as follows:
Warning Level specifies the minimum warning message level allowed for output.
Options allows you to enter any command line linker options
Refer to the HI-TECH C
(R)
PRO for the PSoC
(R)
Mixed-Signal Array Pro guide for more information.
6.3.3 Customizing Linker Actions
To customize the actions of the Linker, create a file called custom.lkp in the root folder of the project
(see the Command Line Compiler Overview section in the PSoC Designer C Language Compiler
User Guide).
Be aware that in some cases, creating a text file and renaming it preserves the .txt file extension
(e.g., custom.lkp.txt). If this occurs, you cannot use custom commands. The make reads the con-
tents of custom.lkp and appends these commands to the Linker action.
A typical use for the custom.lkp capability is to define a custom relocatable code AREA. For exam-
ple, to create code in a separate code AREA that should be located in the upper 2K of the Flash, use
this feature. For this example, the custom code AREA is called ‘BootLoader. If you were developing
code in C for the BootLoader AREA, use this pragma in your C source file:
#pragma text:BootLoader// switch the code below from
// AREA text to BootLoader
// ... Add your Code ...
#pragma text:text // switch back to the text
// AREA
If you develop code in assembly, use the AREA directive in this manner:
AREA BootLoader(rom,rel)
; ... Add your Code ...
AREA text ; reset the code AREA
Now that you have code that should be located in the BootLoader AREA, you can add your custom
Linker commands to custom.lkp. For this example, type this line in the custom.lkp file:
-bBootLoader:0x3800.0x3FFF
You can verify that your custom Linker settings were used by checking the Use verbose build mes-
sages field in the Tools > Options > Builder tab. Build the project, then view the Linker settings in the
Build tab of the Output Status window (or check the location of the BootLoader AREA in the .mp file).