7.3.1 Syntax

The following shows the meta syntax notation for the different forms the pragma may take.

pragma-config-directive:
     # pragma config setting-list
setting-list:
     setting
   | setting-list, setting
setting:
     setting-name = value-name

The setting-name and value-name are device specific and can be determined by using the PIC32ConfigSet.html document located in the installation directory, docs folder.

All #pragma config directives should be placed outside of a function definition as they do not define executable code.

PIC32MZ config pragmas include config_alt, config_bf1, config_abf1, config_bf2, and config_abf2 pragmas to support placing configuration bit values in the alternate, boot flash 1, alternate boot flash 1, boot flash 2, and alternate boot flash 2 PIC32MZ memory regions, respectively. (Example: #pragma config_bf2 FWDTEN=off)

Integer values for config pragmas can be set using the config and config_region pragmas. (Examples: #pragma config_bf2 TSEQ = 1 and #pragma config USERID = 0x1234u)