|
|
View previous topic :: View next topic |
Author |
Message |
aopg64
Joined: 17 Oct 2005 Posts: 28 Location: Hampshire, UK
|
Legacy Compiler 2.315 Help Required |
Posted: Thu Apr 19, 2012 4:08 am |
|
|
Hi folks,
I've been stitched up to add a mod to 10yr old code that was built with CCS 2.315
We have the compiler in our archives, but the earliest I've ever used was 3.212 and 2.315 is completely different. Of course any one here at work that used it has left a long time ago.
I tried compiling it with 3.212 and it complains too much. I could 'fix' those parts to use 3.212 but for legacy build reasons - i.e. I don't want to introduce bugs by using a vastly different compiler - I would rather use the old compiler. This will also help me confirm my base code is in fact that which is in the product at the moment if I can regenerate the current hex
It looks to be command-line driven.
The supplied help file "PC_HELP.HLP" doesn't open any more - presumably this is a really old Windows 3/3.1 style help file? Any one got any idea on how to open these?
If not, then can anyone just write a few example command lines to give me an idea of the format of a typical command-line?
Thanks in anticipation,
Nigel _________________ No comment! (Can't think of anything interesting to say!) |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19516
|
|
Posted: Thu Apr 19, 2012 4:34 am |
|
|
Do a search online for WinHlp32.exe
This is the original Windows help file reader, and is not included with Windows after Vista. It is included with XP though, so if you can find an XP machine it should be able to read the help file.
So long as you save the original stuff though, I really would suggest trying to get it to work with something like 3.249. The best thing to do would be to search here for posts about problems when switching from V2 to V3, which should describe the likely changes. I don't remember too many things that were that difficult, and realistically a know pretty solid compiler like 3.249, will be much easier to work with than the old one, and less likely to introduce new bugs as you work.... I'd suspect the compiler was old, even when the code was written, since it is ten years since the V3 compiler launched.
Unfortunately, I think most of the problems with this upgrade, 'predate' this group. My memory was that this launched at about the same time as the V3 compiler, so there may not be much help here. However If I remember 'right', in CCS V3 compilers, there is an option:
#DEVICE CCS2
Which makes them 99% reverse compatible. Might be worth just trying this!....
Have a look at this file:
<www.datadynamics.co.jp/ccsc/downloads/v3.to.v4.pdf>
Best Wishes |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Thu Apr 19, 2012 6:38 am |
|
|
I have my CCS 2.201 compiler manual from 1996. Page 2 has the following:
Invoking the compiler
The DOS compiler is started by entering PCB or PCM depending on the desired compiler. The command may optionally be followed by a filename of a file to open. Multiple files may be specified separated by spaces. To compile a file without the IDE place a -C before the filename.
Examples
PCB
PCB EXAMPLE.C
PCM EXAMPLE.C HW.H
PCM -C EXAMPLE.C
I can scan a few pages if you tell me what you want. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
aopg64
Joined: 17 Oct 2005 Posts: 28 Location: Hampshire, UK
|
|
Posted: Thu Apr 19, 2012 8:10 am |
|
|
Hi guys,
Great responses as ever!
To cut to the chase, I've managed to compile the code with 2.315!
Wahoo!
I had to drag some batch file memories in my brain out from the 90's and a colleague of mine 'scared' the batch file into working when I asked him to come over and see if he could see why it wasn't working. As soon as he stood there it went into 'reverse demo mode' when something miraculously works when it's most embarassing to make you look incompetent in front of your peers!
Anway, I used:
PCML -C Filename.c
And had to put the device file 16C64A.H in the project directory as no doubt the 2.315 installation probably modified the nowadays defunct (?) config.sys and autoexec.bat and so the devices file wasn't visible in a 'modern' installation(?)
I am using XP at work as that was standard ~3yrs ago when I last had a PC upgrade so I did have win32hlp.exe
It just must be that the help file really is corrupted! I might be able to find another on our server archives somewhere! Fingers crossed!
I tried:
#DEVICE CCS2
but that didn't work. V3.212 complained about redefining the device type and so on if it came after the normal #device and about an unsupported device if it was before. So I suspect the "#..." keyword is something different, but not 'device'
Now all I have to worry about is:
the fact that there is 98% code use,
I need to add extra features
the base code in source-control is several one-offs and the original version was pre-source-control so I don't have it. Gulp!
I already had several projects on the go before my boss dumped this one on me late yesterday!
LOL (more a hysterical madman laugh actually)
Thanks again guys, much appreciated!
Nigel _________________ No comment! (Can't think of anything interesting to say!) |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19516
|
|
Posted: Thu Apr 19, 2012 9:00 am |
|
|
Have just had a play, and the #device CCS2 option appears to only have been added with the launch of the V4 compiler. However with a current V4 compiler, I selected this, and have just compiled a 2001 CCS2 project, without any complaints!...
Whether the code works is then open to argument of course....
Realistically, if the chip is 90+% full, then you are going to have to see if you can get it to compile on 'your terms', preferably with a latter compiler, since then you could switch to something like the 16F874, and double your RAM and ROM in one go....
Best Wishes |
|
|
aopg64
Joined: 17 Oct 2005 Posts: 28 Location: Hampshire, UK
|
|
Posted: Fri Apr 20, 2012 3:09 am |
|
|
Hi Ttelmah,
We have various flavours of CCS V3 and V4. It's interesting that the option exists in V4 to do this, but as mentioned earlier we should try and compile with a newer compiler anyway and try and get any benefits from that.
The chip is 'full', so the next choice was 'which PIC'. The current one is a 44-pin PLCC and so the next choice looked to be the 16F74. This doubles ROM and almost doubles RAM.
The new code will have to do some 48-bit and 32-bit calculations. In the old code each build was custom to a particular user. In the new code the config will be sent in and the dependant values calculated on the fly so this will definitely require more room!
I shall look at the 16F874 to see how that compares to the 16F74.
Thanks once again for your help/advice,
Nigel _________________ No comment! (Can't think of anything interesting to say!) |
|
|
|
|
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
|