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

Missing or Invalid crg file.

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



Joined: 09 Feb 2021
Posts: 7

View user's profile Send private message

Missing or Invalid crg file.
PostPosted: Tue Feb 09, 2021 9:23 am     Reply with quote

I looked through the forums and have called tech support to try to figure this issue out. Apologies if I missed it somewhere, but I am a bit stumped as to what is going on.

I installed PCH command line compiler yesterday. I was switching from a pic 16 to a pic18f26k42. I needed to increase due to program size overflowing the pic16.

The PCH seems to be downloaded and working but it does not seem to be finding its pch.crg file. This file does exist in %appdata%\PICC which per tech support is where the program expects it.

I am running mplab X ide v5.35 and ccs c compiler v5.097.

The exact error given in the output window of mplab X is

"C:\Program Files (x86)\PICC\CCSCON.exe" out="build/default/production\_ext\1987827118" ../../BM4469/BM4469.c +FH +EX +DF +CC +Y=9 -E -EW +DF +LN +T +A +M +J +Z -P #__18F26K42=1
Compiling C:\Users\***\Desktop\program folder\BM4469\BM4469 on 08-Feb-21 at 16:22:
*** Error 120 "C:\Users\***\Desktop\program folder\BM4469\BM4469.c" Line 0(0,0): Missing or invalid .CRG file:
1 Errors, 0 Warnings.:
Build Failed.:

The file path above in the error messages is not where the pch.crg file is. Is this the problem?
I do not think that I have edited where it looks for those files, and pre switching boards it found the other crg files in the same location as the new one without a problem.
Is there a way to tell it where to look for these files? Just to be sure its looking in the right place.

Any advice would be greatly appreciated. Thanks.
temtronic



Joined: 01 Jul 2010
Posts: 7975
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Feb 09, 2021 9:51 am     Reply with quote

It might be a Windows 'permissions' error..
seen that come up before...
dyeatman



Joined: 06 Sep 2003
Posts: 1817
Location: Norman, OK

View user's profile Send private message

PostPosted: Tue Feb 09, 2021 10:42 am     Reply with quote

I make sure my CRG file(s) always reside in the compiler directory.

If it is already there the CRG file is invalid for that version and
you will have to contact CCS for a new one.

This has happened to me a few times after a new version download. They
always send me an updated one pretty quickly (typically within a few hours).
_________________
Google and Forum Search are some of your best tools!!!!
Ttelmah



Joined: 11 Mar 2010
Posts: 16935

View user's profile Send private message

PostPosted: Tue Feb 09, 2021 10:46 am     Reply with quote

I'd have said a path problem.
Add the directory where the .crg file is stored to the Windows path.
Or in MPLAB, make sure that the 'base directory' for the .crg is set
in the build tools (Tools, Options, Build tools, and ensure this points
to where the file is).
matthewmilford



Joined: 09 Feb 2021
Posts: 7

View user's profile Send private message

PostPosted: Tue Feb 09, 2021 2:10 pm     Reply with quote

So if anyone else has this issue, I will post what resolved it for me.
It was finding the path correctly although thank you to those that suggested that. It was not that simple.
I had previously installed a demo of all versions pch, pcm etc. It was picking up that I still had a demo version even though pch (the one that I am using) was not a demo and had a good active crg key. Renaming the keys for the demo files to essentially hide them made it find the correct crg key and work properly.
temtronic



Joined: 01 Jul 2010
Posts: 7975
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Feb 09, 2021 2:21 pm     Reply with quote

Sigh.....
close but no cigar....

when CCS asked me to do a survey last month, I suggested it'd be nice if versions would be automatically installed into separate folders, say PCM51234, PCM1235, PCD4012, PCD4013.
Then allow us to choose which we wanted to use. Since I use MPLAB8v92, when a project is created, I could choose which compiler to use (it becomes the default).

In my mind, this would work very well.... past projects use older compiler, yet I could open a project, choose the newer, try it..if OK, it's NOW the default, otherwise go back to what DID work...
Ttelmah



Joined: 11 Mar 2010
Posts: 16935

View user's profile Send private message

PostPosted: Wed Feb 10, 2021 2:36 am     Reply with quote

Unfortunately here, this is caused by the way the NetBeans stuff behind
MPLAB works. It insists on 'finding things', and not allowing you to
override where it 'thinks' things should be.
I've had to move my multiple copies of CCS onto another drive and exclude
this from the NetBeans search, or it insists on thinking I have about 70 copies
of CCS C all available for it to use, but then find the registration from one
almost at random from these (have not worked out how it decides which
one to use for this).
Compared to the old MPLAB, where you could tell it what tools to use, it
is a real pain... Sad
rnielsen



Joined: 23 Sep 2003
Posts: 851
Location: Utah

View user's profile Send private message

PostPosted: Sat Feb 13, 2021 1:02 pm     Reply with quote

I've had problems, in the past, if I installed the compiler in the Program Files (x86) folder the compiler would not read the .crg file. But, when I re-installed the compiler in the Program Files folder, then it worked just fine.
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