#pragma config keyword=symbol,keyword=symbol,..

This pragma allows to generate a standard CONFIG directive in the output code. It replaces the previous _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 0x10
should be replaced with
#pragma config WDTPS=256,WDT=OFF,BORV=27,BOR=ON,PWRT=ON
You can uses any number of config pragmas. For example, the previous pragma could be replaced with
#pragma config WDTPS=256,WDT=OFF
#pragma config BORV=27,BOR=ON,PWRT=ON

This pragma can be automatically generated by the config word generator of PiKdev V1.4. However, you can write the config parameters by yourself. In this case, you will have to refer to the device documentation. Another option is to read the .inc file specific to your device to know the available keywords and constants names.



Alain Gibaud 2015-07-09