CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Installing compiler updates...

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
JAM2014



Joined: 24 Apr 2014
Posts: 138

View user's profile Send private message

Installing compiler updates...
PostPosted: Wed Jan 28, 2015 11:26 am     Reply with quote

Hi,

I know this has been covered before but I can't seem to find the info I'm looking for in the forum archives. I run several of the command line compilers (PCM & PCH), and I'd like to keep old versions available as I upgrade the compiler. What is the best way to do this, so that reverting to older versions is as seamless as possible?

Jack
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Jan 28, 2015 12:00 pm     Reply with quote

Quote:
I run several of the command line compilers (PCM & PCH)

I keep older command line versions (hundreds of them) in a directory, like this:
Code:

.
.
.
pcm4140.exe
pch4140.exe
pcm4141.exe
pch4141.exe
.
.
.
pcm5037.exe
pch5036.exe
pcm5037.exe
pch5036.exe
pcm5037.exe
pch5036.exe

I don't use the CCS uninstall. I use this batch file to clean out the
installation. I name the batch file "CCS_clean.bat" and keep it on
my desktop. This is on an XP system. This batch file doesn't touch
the registry, but it apparently doesn't matter. I get a clean install
if I do it this way. The only problem is that part of the time, depending
on the compiler version, I must install both PCM and PCH, or MPLAB 8.92
will give me an error. I always install identical version numbers
for PCM and PCH.
Code:

@echo off
cd "c:\Program Files\PICC"
deltree /y DLL
deltree /y Examples
deltree /y Devices
deltree /y Drivers
deltree /y ico
del UNWISE.EXE
del Default.mcp
del Suite_CCSPic.dll
del CCSCON.exe
del Readme.txt
del Ccsc.chm
del Ccsc.exe
del ccsuninstall.exe
del install.log
del Checkgdiplus.exe
del *.dat
del *.pjt
del *.ini
cd "c:\Documents and Settings\***Me***\Application Data\PICC"
del pcw.ini
del ccsc.ini
del dll.ini
cd "c:\Program Files\PICC"
dir
pause

Note: in place of ***Me*** enter your computer name. You can find
your computer name (set by you during Windows installation) by right-
clicking on the My Computer icon and look under "registered to".
These instructions are for Windows XP.

I keep the .CRG files in a folder in MyDocuments, called "CRG files".
If the CCS installer asks for the CRG's, I point it to a file (ex. pch.crg)
in that folder.

XP doesn't come with deltree.exe. You have to download it from
the web. For example, this site has it:
https://www.raymond.cc/blog/download/did/1707/
Put it in the c:\Windows directory. Then the above batch file will work.

Edit:
Added note about ***Me***.
Added del dll.ini to the list of deleted files in the Application Data folder.
Note that the Application Data folder is normally hidden. You have to
select View hidden files in File Options to see it.


Last edited by PCM programmer on Fri Jul 29, 2016 4:37 pm; edited 1 time in total
Ttelmah



Joined: 11 Mar 2010
Posts: 19378

View user's profile Send private message

PostPosted: Wed Jan 28, 2015 4:02 pm     Reply with quote

I have many dozens of different IDE versions also installed in separate directories like this. I install manually to the different directories, and before running, I delete the file that now comes with the compiler to do automatic updating. This way they run as separate compilers. I have probably twenty currently 'in use' available as shortcuts from a single folder.
Then for any code I want to compile, I just delete the CCSPJT file, and PJT file, run the compiler I want to use, open the main file from it's browser and compile. Since there is no project, it pulls the 'local' include files for the compiler version selected, and creates a new CCSPJT/PJT file for this compiler.
All of my code versions have text headers, saying what compilers they have been built with. So I have some going back perhaps a hundred compiler versions. I re-compiling I'll probably try my current favourite version, and if this gives problems switch back to the 'last known good'. Currently I have versions going back to 3.226 'in use'.
So on a current project started when V5 was 'young', the text header says:
Code:

//V1.0 Using 4.141 (interrupt problems V5).
//V1.1. Now fixed V5 problem, using 5.010.
//V1.2 Using 5.019. Linearisation fix for R6 change. #define R6R82 to use.
//V1.3 Using 5.028. New ADC map, now 81264.65 steps/volt.
//V2.0 Added V44 #define to change pin mapping for new V1.2 board
//remove if compiling for old hardware

As you can see, lists compiler versions, hardware changes etc.. Also generally if changing a value for a hardware change, I'll make the changes switchable with a #define so I can always step back by removing these to compile for systems with old hardware.
Being able to instantly compile with the 'known last working' version, is vital.

I also tend not to jump on the 'latest version' bandwagon. Been bitten too many times. I tend to stick with a version I'm finding reliable, until a particular new chip is needed or something similar.
guy



Joined: 21 Oct 2005
Posts: 291

View user's profile Send private message Visit poster's website

PostPosted: Thu Jan 29, 2015 5:36 am     Reply with quote

Quote:
batch files

LOL! The good ol' days...
Is that deltree.exe or deltree.com ? Laughing
JAM2014



Joined: 24 Apr 2014
Posts: 138

View user's profile Send private message

PostPosted: Thu Jan 29, 2015 2:27 pm     Reply with quote

Hi All,

Thanks for all the help and suggestions! Unfortunately, I'm not quite out of the woods just yet!

I've run the CCS-supplied updater to update my v4.121 PCH compiler to the latest PCH version, v5.039, and now I can no longer invoke the compiler using MPLAB.... When I click the 'Build All' button, the compiler is invoked, but immediately shows a error dialog indicating that the Source file can't be found.

Here is the compiler output:
Quote:

Executing: "C:\Program Files\PICC\Ccsc.exe" +FH "Remote_BlinkLED1.c" +DF +LN +T +A +M +Z +Y=9 +EA #__18F25K50=TRUE


Note that there is no full path name to the Source file. I don't think there ever was before the update, but I'm not really sure. Clearly, if it's needed, it's not there now.

I don't see an obvious setting in MPLAB v8.90 that allows me to change this. I've also created a completely new project using the 'Project Wizard', and the problem remains. I've also re-run the CCS MPLAB Plugin code, and the problem remains.

So far, CCS support hasn't been able to help with this issue. Does anyone have any ideas to try?

Thanks,

Jack
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Jan 29, 2015 4:15 pm     Reply with quote

Quote:
I've run the CCS-supplied updater

I have never used that thing. I just download the command line updates
manually and rename them from pchupd and pcmupd to something useful
such as pch5040.exe and pcm5040.exe.

- Can you post the full path to your file ? We need to check it.

See these threads that relate to your problem:

In this one, I say that wiping the compiler installation and re-installing,
fixed it:
http://www.ccsinfo.com/forum/viewtopic.php?t=52768

Ttelmah and Jeremiah have thoughts on this:
http://www.ccsinfo.com/forum/viewtopic.php?t=47705

Notice that in this one, he also used "the installer and did the latest
updates". That may be the problem.
http://www.ccsinfo.com/forum/viewtopic.php?t=50326
JAM2014



Joined: 24 Apr 2014
Posts: 138

View user's profile Send private message

PostPosted: Thu Jan 29, 2015 4:49 pm     Reply with quote

Hi,

It's some kind of a Windows 7 issue. CCS sent me a version of the compiler that shows the full path where the compiler is expecting the Source file to be located. That path is: 'C:\Program Files\PICC\PIC Projects\Remote OnOff\Remote_BlinkLED1.c'. This is where MPLAB thinks the file is located - if I do a 'Save As', that's the location it opens. But, if I use the Explorer to see if the file exists, it's actually *not* there! Searching the HDD, I find that the actual file location is 'Admin\AppData\Local\VirtualStore\Program Files\PICC\PIC Projects\Remote OnOff'.

So, it appears that the full path that MPLAB is displaying is just an alias, but that the compiler seems to be taking it literally...... This didn't happen before with the older compiler version.

The problem is now known, but I'm not sure I see a solution yet? Ideas?

Jack
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Jan 29, 2015 5:11 pm     Reply with quote

http://www.microchip.com/forums/m763150.aspx

See the last post in this thread:
http://www.microchip.com/forums/m545290.aspx

Read threads about virtualstore in the CCS forum archives:
http://www.ccsinfo.com/forum/viewtopic.php?t=51993&highlight=virtualstore

http://www.interworks.com/blogs/dsmith/2011/09/21/disabling-windows-7-virtual-store
gpsmikey



Joined: 16 Nov 2010
Posts: 588
Location: Kirkland, WA

View user's profile Send private message

PostPosted: Thu Jan 29, 2015 8:51 pm     Reply with quote

Yes, "virtual store" is another case of M$ knows what is best for you and no need to bother you with the details. Got bitten with that a while ago installing my key direct from the email from CCS. There some days I like to go over and play on the command line of my Linux system just for the shear pleasure of having things do just what they are told to do without "helping" me !!! Evil or Very Mad

mikey
_________________
mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3
JAM2014



Joined: 24 Apr 2014
Posts: 138

View user's profile Send private message

PostPosted: Mon Feb 02, 2015 10:17 am     Reply with quote

Hi All,

I've finally sorted out my compiler issues with the help posted here, and with some suggestions from CCS support! Thanks to all!!

My *basic* problem is that all my development was being done in the 'C:\Program Files\PICC' directory. That was fine for older versions of Windows, such as Windows XP, but Windows 7 is decidedly NOT happy about that. Windows 7 will actually give the appearance that files are going there, but in fact they are relocated to the 'VirtualStore' directory. My development stuff was simply recreated in the same file locations when we migrated to Windows 7, and that was the 'gotcha'! For some reason the v4 compiler was OK with this, but the v5 version was not!

The solution was to move all my development files to a folder in 'My Document' (the compiler itself stays in the original location), and recreate the MPLAB project files to specify the new locations!

Thanks again!

Jack
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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