You are here

Psoc Creator 4.0 - Release build setting | Cypress Semiconductor

Psoc Creator 4.0 - Release build setting

Summary: 4 Replies, Latest post by Bob Marlowe on 15 Nov 2016 08:25 AM PST
Verified Answers: 2
Last post
Log in to post new comments.
Alex101's picture
User
131 posts

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.

user_1377889's picture
User
9583 posts

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

 

Bob

Alex101's picture
User
131 posts

Thank you Bob!

Alex101's picture
User
131 posts

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

user_1377889's picture
User
9583 posts

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

Log in to post new comments.