Psoc Creator 4.0  - Release build setting

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

cross mob
AlVa_264671
Level 5
Level 5
25 sign-ins First like given First like received

Hi everyone

   

 

   

I would like to know which can be the reason a project work OK with debug  build setting  but fail when release option. is set.

   

Thank you for any help.

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

The usual cause are missing "volatile" declarations for global variables that are changed in an interrupt handler.

   

 

   

Bob

0 Likes
AlVa_264671
Level 5
Level 5
25 sign-ins First like given First like received
        Thank you Bob!   
0 Likes
lock attach
Attachments are accessible only for community members.
AlVa_264671
Level 5
Level 5
25 sign-ins First like given First like received

Hi Bob

   

Which are the unusual cases ?

   

I have 3 ISR  on each of the two project included in the workspace.

   

I check all the volatile variable declaration out and them are OK and declared with "extern" on each  .c file where they need to be used.

   

I  have already posted to you this workspace in  a previous post.

   

I set the release build setting for each of two project.

   

I verified that the sensor project work OK with Release set.

   

"The Gateway project does not."

   

But the funny or not funny thing is  that the  Gateway project  with debug set work OK with the Sensor project with release set.

   

Please see attached project.

   

 

   

Thank you for your help Bob

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

The difference between debug and release modes is mainly the optimization level. Release mode is usually smaller and runs faster than debug mode. This can lead to race conditions.

   

You can set the optimization for every file separately: right click on the file in workspace explorer and select build properties, so you may find the file in error.

   

 

   

Bob

0 Likes