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

Compiler version issue!

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



Joined: 14 Jun 2006
Posts: 31

View user's profile Send private message

Compiler version issue!
PostPosted: Wed Oct 01, 2008 3:50 pm     Reply with quote

Hello,

I have been always using PCWH versions 4.010 all the way up to versions 4.078 and my code always compiled free from errors and always got my hardware to work properly. I am using the PIC18f4685 MCU. Yesterday I upgraded compiler versions from 4.078 to 4.080 and the same program compiles without errors but the hardware is a disaster... my lcd displays junk, buzzers go on and off at the wrong time and the logic is completely disoriented. So I uninstalled version 4.080 and re-installed version 4.078 and everything was back to normal!

I then uninstalled once more version 4.078 and re-installed version 4.080 and it was again a total fiasco. It compiles without errors though, but the hardware doesn't react the way it should.

Could CCS have changed the way they compile C code in the 4.080 version rendering a different result when my code is compiled as compared to what the older compiler version's would generate ?

Has anyone had this problem and if so, can someone please get back to me with this. All feedback is desperately appreciated!

With regards
Robert
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Oct 01, 2008 3:56 pm     Reply with quote

Post a small test program that shows the problem. The program should
be only 10 lines of code, maximum. The program must be complete
and it must compile with no errors.

For example, post a "Hello World" program that uses the LCD.
Explain how it fails with the new version.
Indy31
Guest







PostPosted: Thu Oct 02, 2008 1:10 am     Reply with quote

If It's Not Broken, Don't Fix It!

Upgrading a compiler always comes with the risk that new bugs are introduced. Only upgrade if you have a good reason to do so.
That said, we like to see bugs fixed so if you can post a small test program demonstrating the error we can have a look.
Guest








Doing the best I can!
PostPosted: Thu Oct 02, 2008 10:46 pm     Reply with quote

Hello,

You would not know how hard I am trying to water down my code from the 20,000 some lines! Every time I remove code, at a certain point "unexplainably" the array of pointers to structs has a valid value other that a 0. The code that I removed has no relevance what so ever!

I put the code back, and ooops all the pointers in the array are "0" ????

Its now been 26 hours straight that I am plugging, removing, modifying and testing code. I am almost ready to throw in the towel!

Very discouraging!

As soon as I can get a small version of the problem, I will let you know.

Thankyou for your concern and feedback!

Regards
robert!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Oct 02, 2008 11:04 pm     Reply with quote

Download a file comparison utility such as ExamDiff (the free version)
and compare the .LST files made with each version of CCS.
http://www.prestosoft.com/edp_examdiff.asp
n-squared



Joined: 03 Oct 2006
Posts: 99

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Fri Oct 03, 2008 5:06 am     Reply with quote

I have the same problem with V4.080.
Code that works perfectly with V4.079 stops working with V4.080.
I will wait for V4.081 before complaining to CCS.

BR
Noam
_________________
Every solution has a problem.
Guest








Solved it!
PostPosted: Fri Oct 03, 2008 11:21 am     Reply with quote

Hello,

After 30 hours of trying everything under the sun, I realized that in previous versions of PCWH (4.078 and before) allowed an array to memorize any modifications regardless where they were done. Mind you my array was an array of pointers of a certain struct type. I don't know if this was the case with normal arrays?

Anyways, my array was declared global in a header, then it was passed in a function where the modifications to the array's data were done. When I returned from that function (which had a void return type), the array modifications were memorized anyways and I continued passing this array to yet another function which would use the modified data in the array done in the previous function and no problem everything worked.

However, taking a closer look at this, I think, that when I returned from the first function the data that was modified in the array was not supposed to be remembered when I got out of this function. right?

Anyways when I was removing code to try to isolate the problem, I was getting inconsistent behaviour in the data contents of my array?????

Anyhow I now left the array global and did not pass it in any functions at all. I just modified the array's data by accessing it globally while in my functions. Later I will try to pass it in and return it from the functions as required, but for now everything works. Thank god.

n-squared, I don't know if this could be your issue, but if you are passing arrays to functions and not returning the array back to the calling function *and* continued to use the arrays data down stream of your code.... this worked up to v. 78 from my experience. This will crash in v. 080. I don't know about v 0.79 I never used it!

I hope you resolve your issue soon!

Best regards to everyone!
Roberto
Steve H
Guest







PostPosted: Fri Oct 03, 2008 1:44 pm     Reply with quote

Wow - nasty problem. Well if it were easy anybody would be coding uP's!

;-)

That said - your explanation is very good - please email this to CCS support so that they know what they have done.

Regards,

Steve H.
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