#pragma processor device_name
This pragma has the same effect as the -p option in the link command. device name, must be a string like p18f2550. A program containing more than one processor pragma with different device names will have an unpredictable behaviour.
#pragma _CONFIGxy value
Note: This pragma is deprecated. Please use the «config» pragma, which is described in next section.
This pragma allows to specify the device configuration bits.
must be a configuration register number (
) and
must be either H or L.
Config bits values are not processed by compiler, but directly passed to assembler, so you can use here constants not
defined at C level, but defined in the <processor>.inc
file. For this reason, you cannot use here the '_
' character
as field separator.
A program containing more than one _CONFIGxy
pragma with different
values will have an unpredictable behaviour.
#pragma config keyword=symbol,keyword=symbol,..
This pragma allows to generate a standard CONFIG directive, instead of the old _CONFIGxy
directive. I recommend to switch to the new pragma, because some devices cannot be configured with the old _CONFIGxy
directive. Moreover, the old directive provokes a warning from gpasm.
for example,
#pragma _CONFIG2L 0x0A #pragma _CONFIG2H 0x10should be replaced with
#pragma config WDTPS=256,WDT=OFF,BORV=27,BOR=ON,PWRT=ON
The keywords and symbols are automatically generated by the config word generator of PiKdev V1.4.
If you prefer to write the config parameters by yourself, you can refer to the device documentation. Another option is to read the .inc file specific to your device to know the available keywords and symbols.
#pragma _IDLOCx value
This pragma allows to specify ID data.
is the id location number (
).
Values are directly passed to assembler, so you can use here constants not defined at C level.
A program containing more than one _IDLOCx
pragma with different
values will have an unpredictable behaviour.
AG 2013-04-10