- 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
Not an optimization result of compiler ? Turn it off in build
settings and see what happens.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Pardon my ignorance, where can I find this option?
Thank you,
Tom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here (build settings) -
http://www.cypress.com/documentation/application-notes/an89610-psoc-4-and-psoc-5lp-arm-cortex-code-o... AN89610 - PSoC® 4 and PSoC 5LP ARM Cortex Code Optimization
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I turned off Arm GCC/Compiler/Optimization/Optimization Level. This seemed to fix the problem. Here are my results with the settings,
None: Enters the if statement correctly
Debug: Enters into if statement even if conditions are not true
Minimal: Enters into if statement even if conditions are not true
High: Does not enter into statement, break points give an error
Speed: Does not enter into statement, break points give an error
Size: Does not enter into statement, break points give an error
See attached project. I have not run into this before - seems strange for a project so simple, I swear I have had similar projects before... Can someone explain why one kind does not allow me to enter into an if statement, and other kinds do it even when they should not?
Regards,
Tom
- 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
My experiences with single-stepping are quite the same. On the other hand I was able to proof that the program flow was quite correct, only the breakpoints were reached or not reached reproducably but not as expected. The real program flow was exactly as expected. So I decided for me to always set the optimization to "none" while debugging.
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
Since the optimization level can be set individually for every file you can save lots of bits and mips when lowering the level only for the files under test.
At the recent Customer Advisory Board (CAB) at Cypress in Portland we suggested to default the optimization level for the generated files to a high level.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Actually the optimization level can be set to the f() level.
Regards, Dana.