RedAlert
Member level 1
- Joined
- Oct 13, 2001
- Messages
- 38
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,286
- Location
- Somewhere in Israel
- Activity points
- 176
Hi,
I am using MPLAB version 8.86, PIC18F452, XC8 compiler and PICkit 3 Debugger/Programmer and have the following questions -
1) What is the difference between Debug and Release when I compile ?
2) I need to protect Block 0 code so I use CP0 in configuration to ON (#pragma config CP0 = ON), but the problem is that this cannot be ON while debugging so I need to automate this in code (rather manually doing it) that when in Debugger mode CP0 will be OFF and when in Programming mode CP0 will be ON; Can someone purpose a solution to that ?
(I tried #ifdef __DEBUG but this seem to work only on the Debug/Release selection in the toolbar but not on Debugger -> Select Tool -> PICkit 3)
Thanks in advance.
I am using MPLAB version 8.86, PIC18F452, XC8 compiler and PICkit 3 Debugger/Programmer and have the following questions -
1) What is the difference between Debug and Release when I compile ?
2) I need to protect Block 0 code so I use CP0 in configuration to ON (#pragma config CP0 = ON), but the problem is that this cannot be ON while debugging so I need to automate this in code (rather manually doing it) that when in Debugger mode CP0 will be OFF and when in Programming mode CP0 will be ON; Can someone purpose a solution to that ?
(I tried #ifdef __DEBUG but this seem to work only on the Debug/Release selection in the toolbar but not on Debugger -> Select Tool -> PICkit 3)
Thanks in advance.