Why does my code run in DEBUG but not 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

I've developed my code in the DEBUG configuration.  It runs and works well on my target.  When I try to run the RELEASE version it does all sorts of craziness and just doesn't work right.  I've been through the project settings and can't find any differences between the two configurations. Can someone look at my project and help me out?

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

Probably something gets optimized-out (I see some variables in the CAN that are not declared as volatile).

Try setting the optimization level to "debug" or "none" in your project build settings for release and see if that changes something.

Bob

View solution in original post

0 Likes
2 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Probably something gets optimized-out (I see some variables in the CAN that are not declared as volatile).

Try setting the optimization level to "debug" or "none" in your project build settings for release and see if that changes something.

Bob

0 Likes
jofic_334026
Level 3
Level 3
First like received

By changing the optimization level to "None" my project works in RELEASE mode!

0 Likes