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
Option Segment(s) Supported
boot secure general
no_ram ** X X
small_ram X X
medium_ram X X
large_ram X X
no_flash ** X X
small_flash_std X X
medium_flash_std X X
large_flash_std X X
small_flash_high X X
medium_flash_high X X
large_flash_high X X
no_eeprom ** X X
eeprom X
small_eeprom X
medium_eeprom X
large_eeprom X
no_write_protect ** X X X
write_protect X X X
no_code_protect ** X
code_protect_std X
code_protect_high X
** 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