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

new install of PCM 3.245: unknown version number?

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



Joined: 15 Feb 2007
Posts: 17

View user's profile Send private message

new install of PCM 3.245: unknown version number?
PostPosted: Sat Feb 17, 2007 12:16 am     Reply with quote

I've just done a clean install of PCM 3.245 and MPLAB 7.50 after removing MPLAB 6.40 and PCM 3.098. Whether I run ccsc.exe via the MPLAB IDE or from the command line, I get an "Access violation at address 00000000. Read of address 00000000."

Running from MPLAB results in the following output after the Access violation:

Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\Program Files\PICC\Ccsc.exe" "i_you.c" +FM +DF +LN +T -A +M -Z +Y=9 +EA
Error: The selected compiler: "PCM" is not installed on this PC
Halting build on first failure as requested.
BUILD FAILED: Sat Feb 17 00:52:30 2007

Here's a screen shot: http://tarsas.uwaterloo.ca/rbgorbet/pic_code/screenshot.jpg

The PCM dialog window has a title bar which shows "Version ???", and the registration information shows as ???, ???. I've looked at the .crg file (that came with the install CD) and it contains my "reference number", P328682895.

Also open in the screen shot is the little "version number" dialog which comes up when you run ccsc.exe +V. Notice it's empty.

What you can't see in the screen shot is that the little listing "ticker" keeps on tickering (it's still animated), but it will just sit there forever doing that until closed.

I'm assuming the access violation and empty registration/version info are related. Any thoughts are greatly appreciated.

Rob.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Feb 17, 2007 1:31 am     Reply with quote

I don't have your exact environment, but I tried to emulate it as closely
as I could.

1. I don't have MPLAB 7.50 here. I do have 7.41. I installed it in
Windows 2000. This is a fresh install. It's never been on that
drive before. I let be installed in the default directory, which is
c:\Program Files\Microchip

2. I installed the PCM compiler, vs. 3.245. I installed it in the default
directory of c:\Program Files\Picc
The installation program installed the PCM.CRG license file into that
same directory, at the time of the installation.

3. I downloaded the latest CCS "plugin" program from the CCS website:
http://www.ccsinfo.com/downloads/setup_mplab_plugin.exe
I installed it, and let it use the default directory given in item #2.

4. I started MPLAB and created a new project.
One important thing -- I normally put my projects in the compiler
directory of c:\Program Files\Picc\Projects. Then within that directory,
I have my individual folders for each project. You're using the
"My Documents" folder, which gives you a very long path.
Maybe it will work, but I wouldn't do it that way right now.
Do it the way I did it.

5. In this thread, I give the steps to setup a project in MPLAB.
In this particular case, the project is based on a CCS example file,
so I use c:\Program Files\Picc\Examples as the directory.
http://www.ccsinfo.com/forum/viewtopic.php?t=22956

Make sure you do everything in the correct order, as shown above.

This thread talks about the Access Violation problem.
http://www.ccsinfo.com/forum/viewtopic.php?t=27344

I don't recognize the format of that number in your .CRG file at all.
My PCM.CRG file doesn't have a number of that length, with a letter
stuck in front of it. Is this CD-ROM from some special version of
the compiler, that came with a book ? That might explain it.
But then, it should work.
rbgorbet



Joined: 15 Feb 2007
Posts: 17

View user's profile Send private message

I will try...
PostPosted: Sat Feb 17, 2007 8:31 am     Reply with quote

Thanks, PCM Programmer. I will try what you suggest with the shorter filenames.

The compiler was purchased through Microchip. It came shrink-wrapped with the PIC MCU C Compiler Reference Manual, and had a sticker on it with CCS's logo which says "PCM v3.245 Licensed to: Reference Number P328682895."

I suppose it is possible that they "pre-license" a bunch of copies for resale through distributors, but then these copies need to be "registered" before they can be used. So I went through the "compiler registration" process on the CCS website just now, although that appears to be only for updates. Of course, I won't get the files until Monday at the earliest. :-(

The link you sent about the Acces Violation was no good ("The topic or post you requested does not exist"). I do know there are a bunch of threads on an access violation in the *.DLL when the wrong compiler type or device type is selected. I think this one is different (because of the zero address) and I tried searching the forums but didn't find anything, so if you have found something please send a working link.

Thanks again. I have to go out for an hour but will try later this AM.

Rob.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Feb 17, 2007 8:57 am     Reply with quote

I just clicked on all the links in my post. They all work.
rbgorbet



Joined: 15 Feb 2007
Posts: 17

View user's profile Send private message

odd...
PostPosted: Sat Feb 17, 2007 11:55 am     Reply with quote

PCM programmer wrote:
I just clicked on all the links in my post. They all work.


That is really odd, because I just tried them all again and the one with topic id 27344 gives me "The topic or post you requested does not exist".
The one with topic id 22956 does work.

Perhaps if you find the topic you could send the ID number?

Sorry, it really doesn't work for me.

Rob.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Feb 17, 2007 12:05 pm     Reply with quote

Here's a thread where they say the problem is the registration file:
http://www.ccsinfo.com/forum/viewtopic.php?t=26155
rbgorbet



Joined: 15 Feb 2007
Posts: 17

View user's profile Send private message

Thanks
PostPosted: Sat Feb 17, 2007 12:49 pm     Reply with quote

Thanks PCM Programmer. I need to get better at finding keywords that work! I honestly did what I thought was a good search but I guess I missed that one; it is exactly my problem. I strongly suspect that compilers sold through distributors are "pre-licenced" but need to have the registration files "verified" when installed. I expect on Monday that I will get working registration files.

For now, I'm learning about PCL and PCLATH and going to have a look at what might be a workaround that will allow me to test over the (rest of) the weekend.

Thanks again! The speed and quality of response in this forum is excellent, and I suspect that's entirely due to you. You're the only one who picked up my posts, then monitored them religiously and put up with my (somewhat panicked) rambling. Normally I'm more level-headed. If there is a forum award, I nominate you!

Rob.
rbgorbet



Joined: 15 Feb 2007
Posts: 17

View user's profile Send private message

Found it?
PostPosted: Sat Feb 17, 2007 3:15 pm     Reply with quote

I've traced through the LST file after reading about PCLATH and memory paging in the 16F87xA datasheet. Here is what I've found (comments added):

Code:

0000:  MOVLW  08
0001:  MOVWF  0A
0002:  GOTO   000    // goto 800h, where main starts, no paging problem here...
...
// first, initialize a bunch of variables
0800:  CLRF   04
0801:  BCF    03.7
0802:  MOVLW  1F
...
// then, the first jump to a function call:
....................   init_PIC(); 
*
083B:  BCF    0A.3
083C:  BCF    03.5
083D:  GOTO   290   // goto 290h, where init_PIC is stored (looks fine)
083E:  BSF    0A.3
...
// starting at 290h, do a bunch of initialization, followed by the return:
02A9:  BSF    0A.3
02AA:  BSF    0A.4
02AB:  BCF    03.5
02AC:  GOTO   03E (RETURN)



Now I think that the return is pointed at 183Eh rather than 083E (see original branch from main to init_PIC).

The return from init_SW, which is called just after init_PIC in main, looks like this:

Code:

030C:  BSF    0A.3
030D:  BCF    0A.4
030E:  GOTO   041 (RETURN)


And the smaller version of the code, which has nothing above 800h and works, doesn' t have any BSF 0A.3's in it, just BCF 0A.3's.

Now, how do I work around this?

Rob.
rbgorbet



Joined: 15 Feb 2007
Posts: 17

View user's profile Send private message

PostPosted: Sat Feb 17, 2007 11:16 pm     Reply with quote

I found the opcode in the hex and modified it to BCF A.4 instead of BSF A.4, and fixed the checksum in the hex file. The code got further, but didn't run properly still. Must be something else somewhere...
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Feb 17, 2007 11:29 pm     Reply with quote

Vs. 3.098 has got bank select bugs. This affects the RAM banks.
The bug that you found affects the Program Address Counter.
Based on this post (previously referenced), the compiled code likely
has bank select bugs as well:
http://www.ccsinfo.com/forum/viewtopic.php?t=27813
rbgorbet



Joined: 15 Feb 2007
Posts: 17

View user's profile Send private message

PostPosted: Sun Feb 18, 2007 11:22 am     Reply with quote

CCS sent me the new registration files for 3.245 this morning and things appear to be resolved. Now I just need to finish the code. Thanks again for all your help.

Rob.
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