9.6.1 CodeGuard Security Segment Options

The following segment options correspond to specific CodeGuard Security settings as described in the CodeGuard Security documentation. The linker will validate that any CodeGuard Security option(s) specified are supported by the target device. An error will be reported if the target device does not support a particular option. Valid options settings will be encoded as configuration words for the target device.

For MPLAB® X IDE, these options will appear in the Project Properties window under xc-dsc-ldoptions. They will be passed to the linker via command line.

Table 9-1. CodeGuard Security Segment Options
OptionSegment(s) Supported
bootsecuregeneral
no_ram **XX
small_ramXX
medium_ramXX
large_ramXX
no_flash **XX
small_flash_stdXX
medium_flash_stdXX
large_flash_stdXX
small_flash_highXX
medium_flash_highXX
large_flash_highXX
no_eeprom **XX
eepromX
small_eepromX
medium_eepromX
large_eepromX
no_write_protect **XXX
write_protectXXX
no_code_protect **X
code_protect_stdX
code_protect_highX
** default setting

CodeGuard Security segment options

--boot small_flash_std
--boot=small_ram:medium_flash_std:eeprom

--secure no_ram:small_flash_std
--secure=medium_ram:large_flash_high

--general write_protect
--general=no_write_protect:code_protect_high