Debug vs. Release

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
jofic_334026
Level 3
Level 3
First like received

When I run my project with the .hex that gets generated with the build setting set to "Debug" everything works great.  However, when I run with the .hex generated with the build setting set to "Release" it does not work so well.  I've seen this sort of thing before.  It's usually related to the debugger slowing things down a bit.  In this case, I am not running in the debugger.  That is, I simply program the PSoC with either version and let it run. 

   

The problem manifests itself as a "FAIL: CAN Srvc Mode" error (see attached project).  It seems that while running with release code the very first CAN message fails.  I put a long delay in prior to sending it but that didn't work.

   

I know this kind of thing is hard to troubleshoot without actually having hardware but any help would be much appreciated! 

0 Likes
1 Reply
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Check your COMM_ISR interrupt handler (and others if there are:

   

Every global variable that is changed in an interrupt handler MUST be declared as volatile

   

See here for a brief explanation.

   

 

   

Bob

0 Likes