How do you set Configuration bit by using pragma ?

General discussion on mikroC PRO for PIC32.
Post Reply
Author
Message
pic32boy
Posts: 11
Joined: 06 Feb 2019 03:02

How do you set Configuration bit by using pragma ?

#1 Post by pic32boy » 17 Feb 2019 09:11

Dear All

I know how to set Configuration bit by using the IDE project settings of MikroC PRO for PIC32, namely after selecting Menu[Project] --> [Project Edit] and the setting dialogue appears. (Please see attached screen shot) Also I use Microchip MPLAB Harmony of XC32 compiler. As you know I can set Configuration bit in source of XC32, by using below codes.


//*** DEVCFG0 ***

#pragma config DEBUG = OFF
#pragma config JTAGEN = OFF
#pragma config ICESEL = ICS_PGx1
#pragma config TRCEN = OFF
#pragma config BOOTISA = MIPS32
#pragma config FECCCON = OFF_UNLOCKED
#pragma config FSLEEP = OFF
#pragma config DBGPER = PG_ALL
#pragma config SMCLR = MCLR_NORM
#pragma config SOSCGAIN = GAIN_LEVEL_3
#pragma config SOSCBOOST = ON
#pragma config POSCGAIN = GAIN_LEVEL_3
#pragma config POSCBOOST = ON
#pragma config EJTAGBEN = NORMAL
#pragma config CP = OFF

//*** DEVCFG1 ***

#pragma config FNOSC = SPLL
#pragma config DMTINTV = WIN_127_128
#pragma config FSOSCEN = OFF
#pragma config IESO = OFF
#pragma config POSCMOD = EC
#pragma config OSCIOFNC = OFF
#pragma config FCKSM = CSECME
#pragma config WDTPS = PS1048576
#pragma config WDTSPGM = STOP

...
...

The IDE project settings of MikroC PRO for PIC32 is rough and cursory.

How do you set Configuration bit by using pragma in souce ?
How do you modify above pragma sentence ?
or
Are there any way which does not need IDE dialogue settings, which I attached ?


Any advice make me pleased ?


Best Regards

pic32boy
Attachments
Configuration setting.jpg
Configuration setting.jpg (66.02 KiB) Viewed 1275 times

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: How do you set Configuration bit by using pragma ?

#2 Post by filip » 27 Feb 2019 09:14

Hi,

You can only set the the configuration bits in the Edit Project, there is no pragma for this.

Regards,
Filip.

Post Reply

Return to “mikroC PRO for PIC32 General”