|
|
View previous topic :: View next topic |
Author |
Message |
jimmya Guest
|
ICD2, 18F452, MPLAB6.10, and PCH 3.127 |
Posted: Wed Nov 27, 2002 3:46 am |
|
|
I tried a related posting by Samir Berjaoui
Re: ICD2, 18F452, MPLAB6.02, and PCH compiler
operation: Is working | Samir Berjaoui
I followed the instructions in the posting. MPLAB would program the device after i cleared the "background debugging" config-bit letting MPLAB set this config-bit. But then MPLAB reports an error when i try to run the program - something about the target not being in debug mode. This leads me to suspect the config-bits. ... but a few questions, first.
- has anyone upgraded to mplab 6.10 ?
- what version of the CCS PCH-compiler are you using ?
- what is the full command-line you use to compile your source ? Which flags, etc.
- what configuration bits do you have set up in MPLAB ?
thanks,
- jim
___________________________
This message was ported from CCS's old forum
Original Post ID: 9499 |
|
|
Samir Berjaoui Guest
|
Re: ICD2, 18F452, MPLAB6.10, and PCH 3.127 |
Posted: Mon Dec 02, 2002 2:33 pm |
|
|
Hi Jim,
Sorry for taking so long to get back w/ you I was out of town and just got back.
I did play with the new MPLAB 6.10 this weekend and discovered a hope -- an easier way to compile CCS projects! but it's still not perfect.
I found a plug in on the download page of CCS that allows the MPLAB IDE to compile w/ CCS compiler.
Here are my findings:
Uninstall the previous version of MPLAB IDE 6.xx and install the latest version 6.10.
Run the CCS plug in.
Select CCS in Project|Select Language Toolsuite
In Project|Build Options|Project CCS C Compiler TAB, select the proper Compiler for your family,e.g. PIC 18, and Expanded COD format for Debug. Warning: COFF Format does not work with CCS 3.123 I am running now -- It won't generate any debug file w/ that option selected. a cof file was supposed to be generated. And it will still load the cod file generated by the last compile that generated it.
In each of your C files under Project|Build Options|..., turn off if already on and back on the inherit global settings
If you are using #rom in your C code make sure you select EEPROM in addition to program, Configuration, and Erase all before Program in Debugger|Settings Program TAB. I recommend to select the full range if you don't to make sure the range you manually set covers your program size as explained in my previous posting. Reducing the range speeds up programming but with USB connection full range is a breeze compared to RS232.
Make sure #device ICD=TRUE is placed after #include <18f452.h> (or any other microcontroller you are using).
MPLAP IDE 6.10 comes with a new firmware (operating system) for ICD 2 so I let it update it. If the ICD was not connected properly download it from Debugger|Download ICD2 Operating System.
Now we get to the tricky part, the configuration bits:
Since I use the MPLAB IDE to flash my UC and found a bug in CCS config constants (probably fixed by now) and that I switch off the debugging bit and turn on the watch dog bit after I testing I prefer to set these bits in MPLAB.
These are my setting while debugging (Beware the Osc setting maybe diff in your case):
Osc HS-PLL Enabled
Osc sw dis
Power up Timer en
Brwn out Detect en
Brwn Volt 4.5V
Watchdog dis
Wtchdg Pstscal 1:128
CCP2 MUX RC1
Low volt Prgm dis
Backgrnd Debug en
stack overflow Rst en
when finished debugging:
Watchdog en
Low volt Prgm en
Backgrnd Debug dis
Make or build your project (did not notice a diff between the 2!).
I also discovered a bug in the download process. The EEPROM setting don't get downloaded after compilation. I still have to manually import from File|import the hex file.
Save your project and work space
Good luck in finishing your project(s)!
Best regards,
Samir Berjaoui
P.S I'll be posting this message on CCS forum so others can benefit from it.
----- Original Message -----
From: "Jim Alexander" <[email protected]>
To: <[email protected]>
Sent: Wednesday, November 27, 2002 3:49 AM
Subject: Re: ICD2, 18F452, MPLAB6.02, and PCH compiler operation
> Hi Samir,
>
> I saw your posting on the CCS bbs. may i ask a few question ?
>
> I followed your instructions in the posting. MPLAB would program the device
> after i cleared the "background debugging" config-bit letting MPLAB set
> this config-bit. But then MPLAB reports an error when i try to run the
> program - something about the target not being in debug mode. This leads me
> to suspect the config-bits. ... but a few questions, first.
>
> - have you upgraded to mplab 6.10 ?
> - what version of the CCS PCH-compiler are you using ?
>
> - what is the full command-line you use to compile your source ? Which
> flags, etc.
>
> - what configuration bits do you have set up in MPLAB ?
>
> thanks,
>
> - jim
>
> _
> \ Jim Alexander [email protected]
> \ Aesthetic Software <a href="http://www.aestheticsoftware.com" TARGET="_blank">http://www.aestheticsoftware.com</a>
>
___________________________
This message was ported from CCS's old forum
Original Post ID: 9702 |
|
|
Marc-Andre Filion Guest
|
Re: ICD2, 18F452, MPLAB6.10, and PCH 3.127 |
Posted: Wed Dec 04, 2002 10:02 am |
|
|
:=Hi Jim,
:=
:=Sorry for taking so long to get back w/ you I was out of town and just got back.
:=
:=I did play with the new MPLAB 6.10 this weekend and discovered a hope -- an easier way to compile CCS projects! but it's still not perfect.
:=
:=I found a plug in on the download page of CCS that allows the MPLAB IDE to compile w/ CCS compiler.
:=
I didn't found the CCS plug in on the CCS download page...
Can you give me the link because I have a major problem of debuging with the ICD2 (doesn't work at all). I'm looking for a miracle...
thank
M_A
:=Here are my findings:
:=
:=Uninstall the previous version of MPLAB IDE 6.xx and install the latest version 6.10.
:=
:=Run the CCS plug in.
:=
:=Select CCS in Project|Select Language Toolsuite
:=
:=In Project|Build Options|Project CCS C Compiler TAB, select the proper Compiler for your family,e.g. PIC 18, and Expanded COD format for Debug. Warning: COFF Format does not work with CCS 3.123 I am running now -- It won't generate any debug file w/ that option selected. a cof file was supposed to be generated. And it will still load the cod file generated by the last compile that generated it.
:=
:=In each of your C files under Project|Build Options|..., turn off if already on and back on the inherit global settings
:=
:=If you are using #rom in your C code make sure you select EEPROM in addition to program, Configuration, and Erase all before Program in Debugger|Settings Program TAB. I recommend to select the full range if you don't to make sure the range you manually set covers your program size as explained in my previous posting. Reducing the range speeds up programming but with USB connection full range is a breeze compared to RS232.
:=
:=Make sure #device ICD=TRUE is placed after #include <18f452.h> (or any other microcontroller you are using).
:=
:=MPLAP IDE 6.10 comes with a new firmware (operating system) for ICD 2 so I let it update it. If the ICD was not connected properly download it from Debugger|Download ICD2 Operating System.
:=
:=Now we get to the tricky part, the configuration bits:
:=Since I use the MPLAB IDE to flash my UC and found a bug in CCS config constants (probably fixed by now) and that I switch off the debugging bit and turn on the watch dog bit after I testing I prefer to set these bits in MPLAB.
:=
:=These are my setting while debugging (Beware the Osc setting maybe diff in your case):
:=Osc HS-PLL Enabled
:=Osc sw dis
:=Power up Timer en
:=Brwn out Detect en
:=Brwn Volt 4.5V
:=Watchdog dis
:=Wtchdg Pstscal 1:128
:=CCP2 MUX RC1
:=Low volt Prgm dis
:=Backgrnd Debug en
:=stack overflow Rst en
:=
:=when finished debugging:
:=Watchdog en
:=Low volt Prgm en
:=Backgrnd Debug dis
:=
:=Make or build your project (did not notice a diff between the 2!).
:=
:=I also discovered a bug in the download process. The EEPROM setting don't get downloaded after compilation. I still have to manually import from File|import the hex file.
:=
:=Save your project and work space
:=
:=Good luck in finishing your project(s)!
:=
:=Best regards,
:=
:=Samir Berjaoui
:=
:=P.S I'll be posting this message on CCS forum so others can benefit from it.
:=
:=
:=----- Original Message -----
:=From: "Jim Alexander" <[email protected]>
:=To: <[email protected]>
:=Sent: Wednesday, November 27, 2002 3:49 AM
:=Subject: Re: ICD2, 18F452, MPLAB6.02, and PCH compiler operation
:=
:=
:=> Hi Samir,
:=>
:=> I saw your posting on the CCS bbs. may i ask a few question ?
:=>
:=> I followed your instructions in the posting. MPLAB would program the device
:=> after i cleared the "background debugging" config-bit letting MPLAB set
:=> this config-bit. But then MPLAB reports an error when i try to run the
:=> program - something about the target not being in debug mode. This leads me
:=> to suspect the config-bits. ... but a few questions, first.
:=>
:=> - have you upgraded to mplab 6.10 ?
:=> - what version of the CCS PCH-compiler are you using ?
:=>
:=> - what is the full command-line you use to compile your source ? Which
:=> flags, etc.
:=>
:=> - what configuration bits do you have set up in MPLAB ?
:=>
:=> thanks,
:=>
:=> - jim
:=>
:=> _
:=> \ Jim Alexander [email protected]
:=> \ Aesthetic Software <a href="http://www.aestheticsoftware.com" TARGET="_blank"> <a href="http://www.aestheticsoftware.com" TARGET="_blank">http://www.aestheticsoftware.com</a></a>
:=>
___________________________
This message was ported from CCS's old forum
Original Post ID: 9766 |
|
|
Samir Berjaoui Guest
|
Re: ICD2, 18F452, MPLAB6.10, and PCH 3.127 |
Posted: Wed Dec 04, 2002 1:15 pm |
|
|
Hi everybody,
CCS pulled out the plug for MPLAB 6.x from their download page without any explanation! This is unacceptable in my book.
Probably because it's still buggy or they are ready to lunch their own debugger. Until they have solution ready, we will be dealing with a higher level of stress, I guess! (what's new?)
Since I can't attach a file with this reply, I am willing to send the file by email to anyone who would send me a personal email at [email protected]
Regards,
Samir
___________________________
This message was ported from CCS's old forum
Original Post ID: 9770 |
|
|
Wei Deng Guest
|
Re: ICD2, 18F452, MPLAB6.10, and PCH 3.127 |
Posted: Wed Dec 04, 2002 4:33 pm |
|
|
:=Hi everybody,
:=
:=CCS pulled out the plug for MPLAB 6.x from their download page without any explanation! This is unacceptable in my book.
:=
:=Probably because it's still buggy or they are ready to lunch their own debugger. Until they have solution ready, we will be dealing with a higher level of stress, I guess! (what's new?)
:=
:=Since I can't attach a file with this reply, I am willing to send the file by email to anyone who would send me a personal email at [email protected]
:=
:=Regards,
:=
:=Samir
Hi,
I just found out that it's still downloadable through their old download page <a href="http://www.ccsinfo.com/olddownload.html" TARGET="_blank">http://www.ccsinfo.com/olddownload.html</a>. Click the last button named "MPLAB INTERFACE" to download.
___________________________
This message was ported from CCS's old forum
Original Post ID: 9781 |
|
|
Samir Berjaoui Guest
|
Re: ICD2, 18F452, MPLAB6.10, and PCH 3.127 |
Posted: Wed Dec 04, 2002 10:55 pm |
|
|
>Hi,
>I just found out that it's still downloadable through their >old download page <a href="http://www.ccsinfo.com/olddownload.html" TARGET="_blank">http://www.ccsinfo.com/olddownload.html</a>. >Click the last button named "MPLAB INTERFACE" to download.
I just verified that the above link does not lead you to the actual MPLAB IDE 6.x plug-in that I have already downloaded last week.
Regards,
Samir
___________________________
This message was ported from CCS's old forum
Original Post ID: 9787 |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|