$SCRIPT – Define the linker script to use

Language reference ›› Directives ››
Parent Previous Next

script-directive = $SCRIPT file-path .


Defines (overrides) the linker script file to use.


<file-path>:

Quoted string that specifies the file name to use, without character wild-cards.

It may contain a full path. If there is no extension .lkr is assumed.

This directive had been added to make it possible to use special case scripts (user modified linker scripts), for using a boot loader for example.

This directive must be used BEFORE any other processor's characteristics-related directive except $PROCESSOR.

This directive overrides the script that may be defined in the project's options.



{$IFDEF BOOT_LOADER}
 {$SCRIPT 'P18_BOOT_g.LKR'}
{$ENDIF}