- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The usual cause are missing "volatile" declarations for global variables that are changed in an interrupt handler.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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