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

PCD 5.122 issues with division (revert to 5.118 to fix)

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



Joined: 17 Jun 2019
Posts: 645
Location: Des Moines, Iowa, USA

View user's profile Send private message Visit poster's website

PCD 5.122 issues with division (revert to 5.118 to fix)
PostPosted: Mon Jan 19, 2026 9:27 am     Reply with quote

Just a heads up. We encountered an issue with the 5.122 compiler that caused one of our four PIC24 projects to fail. Reverting to 5.118 worked.

Thanks to the excellent support from CCS, they were able to identify the issue with some division code. I had to do with using U16 integers and U32s, such as when you have something like this:

Code:
uint32_t sum;
uint16_t average;

average = (sum / x);


(I may not fully understand the issue, but it has something to do with how the smaller ints are supposed to expand for the calculation.

We caught this in a 24EP256GP202 and (using an updated DLL they sent me for testing) 24FJ256GA106.

Just a heads up.
_________________
Allen C. Huffman, Sub-Etha Software (est. 1990) http://www.subethasoftware.com
Embedded C, Arduino, MSP430, ESP8266/32, BASIC Stamp and PIC24 programmer.
http://www.whywouldyouwanttodothat.com ?

Using: 24FJ256GA106, 24EP256GP202 and 24FJ64GA002.
Ttelmah



Joined: 11 Mar 2010
Posts: 20019

View user's profile Send private message

PostPosted: Mon Jan 19, 2026 11:12 am     Reply with quote

Try one thing.
Recompile with the new compiler, with the optimisation turned down.
If this fixes it, it sounds as if they may have re-introduced a problem they
has with optimisation a while ago:
[url]
https://www.ccsinfo.com/forum/viewtopic.php?t=59695
[/url]
temtronic



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

View user's profile Send private message

PostPosted: Mon Jan 19, 2026 8:19 pm     Reply with quote

just curious... why did you install the upgrade ? Did it fix a 'bug' for you ?
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