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

"Compress" optimization level - Difficulties debug

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



Joined: 24 Apr 2025
Posts: 6

View user's profile Send private message

"Compress" optimization level - Difficulties debug
PostPosted: Wed May 07, 2025 8:47 am     Reply with quote

Today I learned of #opt compress.
But the compiler manual says "Debugging with this level may be more difficult."

Difficult in what way? It doesn't elaborate on that.
So if I'd be using MPLAB X with CCS' C compiler and a Real Ice or ICD4 for debugging, is it going to maybe not step-through properly, or is it just going to be a bit sluggish? (not to say that MPLAB is anything approaching fast...) Or is it only difficult to debug if I'm working with assembly code?
Ttelmah



Joined: 11 Mar 2010
Posts: 19826

View user's profile Send private message

PostPosted: Wed May 07, 2025 11:04 am     Reply with quote

The point is that with high opt levels parts of routines may be reused
inside other routines. So the debug will suddenly jump into parts of code
that are nothing to do with what you are trying to debug. You can always
switch to debugging at the assembler level, and then things are OK, but
stepping through C code may be very random, when hish levels are used.
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