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 CCS Technical Support

Strange errors after re-installing CCS c compiler

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



Joined: 11 Jan 2012
Posts: 39

View user's profile Send private message

Strange errors after re-installing CCS c compiler
PostPosted: Wed Feb 22, 2012 8:54 am     Reply with quote

Hello, I had to format my laptop, and after installing CCS c compiler, I'm having compile errors that I don't have before format.

For example here:

Code:
int32 readGyro(){
   int32 gyro;
   int value1;
   int value2;
   i2c_start();
   i2c_write(209);
   value1 = i2c_read(1);
   value2 = i2c_read(0);
   i2c_stop();
   gyro = make16(value2,value1);
   return gyro;

}


I cannot see any syntax error, and there isn't, because I compiled this so many times, now when I try to compile I get errors like this:


I really don't know how to solve syntax errors that don't even exist :P, so I think its some problem with installation, anyone can help me with this??

Thanks,
Chaud
Ttelmah



Joined: 11 Mar 2010
Posts: 19520

View user's profile Send private message

PostPosted: Wed Feb 22, 2012 9:07 am     Reply with quote

First, the error may well exist!....
Unless this is 'untouched' code that has compiled before, with _everything_ unchanged, the commonest cause for this is an error dozens of lines earlier.
CCS, tends to 'plough on' when it meets an error, and flags the error as happening at the first line that it can no longer compile.So an error, can give you an error shown as being somewhere far latter.

Have you rebuilt the project, or did you bring it across from a backup?.
Another typical cause for this, is that the .pjt file is looking in the wrong location for something. So unless the actual directory layout is identical from the old machine, you need to make a new project, or amend the old one.

So, 'step back'. Verify the compiler is actually working by compiling one of the example programs. If you still get an error, try installing the compiler again (you can get odd behaviour like this from a corrupted .dat file).
If it then works, rebuild the project, and see if this solves the problem. Make sure the new project does point to the right sub-directories.

Best Wishes
Linuxbuilders



Joined: 20 Mar 2010
Posts: 193
Location: Auckland NZ

View user's profile Send private message

PostPosted: Thu Feb 23, 2012 3:42 am     Reply with quote

I used to have this problem too, so when I've got stable ccs release for my chips then I do not upgrade it. Second I had problems with code edited in mplab and moved to ccs ide, there were hidden control bits in the code and I had to rewrite all by hand (CCS does not see it, MPLAB puts there things like code warp, etc). Third do not use mplab because it has own brain and tries to fix your errors which leads to odd problems. Since I use CCS IDE no problems anymore.

So first suggestion - get stable ccs (I use 114), second - copy and paste BIG NONO, write your code by hand and try to see it it will work then. If CCS gets corrupted then you have to kill windows, I had to do it too once. So then I was using VM ware to make life simple, in the end I have installed IDE and CCS on my Wx64 machine but once and no upgrades at all after it. Hope this helps
_________________
Help "d" others and then you shell receive some help from "d" others.
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