|
|
View previous topic :: View next topic |
Author |
Message |
jlucas
Joined: 08 May 2011 Posts: 41 Location: Carthage, MO
|
MPLAB IDE only allows one build per session |
Posted: Mon Mar 04, 2013 10:21 pm |
|
|
I don't have a code problem. This is a problem using MPLAB IDE with an ICD2 programmer. Microchip's support leaves much to be desired, so I'm hoping one of you guys can help.
I actually got all my code working! I haven't used the programmer in a month while I've been testing, and everything works fine. However, I wanted to write some new code for our next turn which will have some slightly different hardware and thus will require some slight modifications to the code.
I hooked up my ICD 2 and fired up MPLAB IDE v.8.80, and in the month or so since I've used it, it's learned a new trick: it will only allow one build per session. After the first build, the entire Project menu is grayed out. If I edit and save my source file, I have to close the program and restart it in order to build it.
I have absolutely no idea what's going on here or what I may have done to deserve this. Any ideas? _________________ Always remember, things are never so bad that they can't get worse. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon Mar 04, 2013 11:34 pm |
|
|
1. Post your PIC, #device statements, #fuses, and #use delay().
2. Post a description of your external oscillator or crystal circuit, if any.
3. Do you have 100 nF (0.1 uF) caps on all Vdd pins (and Avdd, if any) ?
4. Are you using the PGC and PGD pins (used by ICD2) for anything
else other than programming ? If so, describe the circuits connected
to those pins in detail.
5. Describe your MCLR circuit.
6. What's your CCS compiler version ?
7. What's the Vdd voltage for the PIC ?
8. Does the board provide power for the PIC, or do you have the
ICD2 configured to power the board ?
9. Are you running MPLAB and the ICD2 on a laptop, or on a desktop PC ?
10. What operating system is running on your laptop or PC ?
11. Have you installed the latest CCS MPLAB Plugin from the CCS
download page ?
12. Is the drop-down box at the top of MPLAB set for "Debug" or
for "Release" ? |
|
|
jlucas
Joined: 08 May 2011 Posts: 41 Location: Carthage, MO
|
|
Posted: Tue Mar 05, 2013 1:05 am |
|
|
Quote: | 1. Post your PIC, #fuses, and #use delay(). |
Code: | #fuses HS,NOPROTECT,BROWNOUT,NOWDT,WDT32768,NOPUT,NOCPD,STVREN,NOLVP,BORV27
#fuses NOWRT,NOIESO,NOFCMEN,NOPBADEN,CCP2C1,NOWRTC,NOWRTB,NOEBTR,NOEBTRB,NOCPB
#fuses NOLPT1OSC,MCLR
#use delay(clock=20000000) // Clock set to 20 MHz
#use rs232(baud=57600, xmit=PIN_C5, rcv=PIN_C2, stream=ac)
#use rs232(baud=9600, xmit=PIN_B3, stream=mc)
#use rs232(baud=19600, xmit=PIN_C7, rcv=PIN_D7, stream=gps) <<This last one is new. |
Quote: | 2. Post a description of your external oscillator or crystal circuit, if any. |
Here's a pic:
Code: | http://tinyurl.com/a32n5vt |
Quote: | 3. Do you have 100 nF (0.1 uF) caps on all Vdd pins (and Avdd, if any)? |
Yes.
Quote: | 4. Are you using the PGC and PGD pins (used by ICD2) for anything else other than programming? |
No.
Quote: | 5. Describe your MCLR circuit. |
The pin MCLR/VPP/RE3 is connected to +5 V thru a 10k resistor (Vpp).
Quote: | 6. What's your CCS compiler version? |
3.249
Quote: | 7. What's the Vdd voltage for the PIC? |
+5V
Quote: | 8. Does the board provide power for the PIC, or do you have the ICD2 configured to power the board ? |
The power comes from the ICD2 with a 9 V, 800 mA wall cube.
Quote: | 9. Are you running MPLAB and the ICD2 on a laptop, or on a desktop PC ? |
Desktop
Quote: | 10. What operating system is running on your laptop or PC? |
XP SP3.
The problem is, NOTHING has changed over the past month to have caused this. I even went back to the original code that was working perfectly before. I made some insignificant changes to it -- e.g., switching the order of a couple of lines to initialize variables -- and it built just fine. However, when I switched them back and saved the file, would not build a second time until I closed MPLAB and restarted it.
Everything still works. It's just a pain to have to close and reopen the program every single time I do a build. _________________ Always remember, things are never so bad that they can't get worse. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19538
|
|
Posted: Tue Mar 05, 2013 4:19 am |
|
|
I think it is switching you to debug mode.
The compiler defaults to building the code for debug, and can be set to automatically go to the debugger. If this is running, you can't compile again, till you halt debugging.
Hit F5, and see if the options re-appear.
Best Wishes |
|
|
jlucas
Joined: 08 May 2011 Posts: 41 Location: Carthage, MO
|
|
Posted: Tue Mar 05, 2013 12:44 pm |
|
|
Thanks, Ttelmah, but this doesn't seem to be what's going on. F5 does nothing at all. Under the Debugger menu, Select Tool is still None, and under the Programmer menu, Select Programmer is still MPLAB ICD 2.
I've noticed another problem. When the Build function stops working, the right-click function to add or remove files from the project also stops working. I think the MPLAB IDE program has become corrupted. I'm going to uninstall and reinstall it. I'll report back with the results.
>>> Edit <<<
Well, that did nothing to fix the problem. I guess I'll try Microchip and see if they have any ideas.
>>> Update <<<
I'm still waiting to hear back from Microchip, but here's some more info. My radio has two PIC MCUs -- an 18F 4520 and a 16F 685. I haven't had to change anything in the 16F for a long time, but when I connected to it and tried to build the code, I got the exact same result: only one build per session.
All this tells me it's not in the code, and it's not in the device or the peripheral hardware. Also, it's not in the version of MPLAB IDE, because I uninstalled v.8.80 and installed v.8.84, and that didn't fix it, although Add/Remove Programs didn't really do a complete uninstall -- I didn't have to set up the the USB driver, and I still had all my MRUDs.
This one's got me completely stumped.
>>> Edit <<<
There, I fixed it! Under Configure > Settings > Program Loading, I changed the selection from "Clear memory before building a project" to "Clear memory after successfully building a project."
I have no idea why this worked, but I was trying everything I could think of, and for some reason, it started working again. I swear I never changed this setting before now. I have no idea if the setting somehow changed by itself and I put it back the way it was supposed to be, or if the old setting simply stopped working. Whatever, it's working now.
Thanks for helping, guys. _________________ Always remember, things are never so bad that they can't get worse. |
|
|
jlucas
Joined: 08 May 2011 Posts: 41 Location: Carthage, MO
|
|
Posted: Tue Mar 05, 2013 4:37 pm |
|
|
Well, it looks like I spoke too soon. After I changed that setting, it worked maybe 8 or 10 times, and now it's back to its old trick -- one build per session -- and changing that setting either way has no effect whatsoever.
Any more ideas? _________________ Always remember, things are never so bad that they can't get worse. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9241 Location: Greensville,Ontario
|
|
Posted: Tue Mar 05, 2013 6:09 pm |
|
|
First, I'd backup any source code you want to keep... then...
I'd 'uninstall' whatever version of MPLAB you're using. Be sure to
delete all the folders (usually under Program Files/Microchip/MPLAB).
From your description, 'some' of the files + folders are still on your PC.
If you've installed MPLAB at a location other than the default...be sure to delete them as well. Use the Windows 'search' to locate any 'mplab*.*' files. After you've 'deleted' everything, defrag the drive.
I currently run XPP SP3 MPLAB V8.86 and have not had any problems interfacing to a PICKit3 blasting 18F4550, 18F46k22, 16F877 and others.
hth
jay |
|
|
jlucas
Joined: 08 May 2011 Posts: 41 Location: Carthage, MO
|
|
Posted: Tue Mar 05, 2013 9:56 pm |
|
|
Thanks Jay, I tried all that, and I can still only do one build per session. After that, the Project menu is completely grayed out till I restart the program.
If you think of anything else, please let me know. _________________ Always remember, things are never so bad that they can't get worse. |
|
|
|
|
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
|