STM8A checksum calculation error with COSMIC C-Compiler
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2009-12-22 8:18 PM
Posted on December 23, 2009 at 05:18
STM8A checksum calculation error with COSMIC C-Compiler
This discussion is locked. Please start a new topic to ask your question.
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 6:06 AM
Posted on May 17, 2011 at 15:06
Hi,
I like to find out how long the COSMIC _checksum() and _checksum16() routine takes for 32k code. To figure out I made a test project but I struggled already at the beginning. Even an empty project caused a checksum error because the calculated checksum at runtime does not match with the one calculated by the compiler at compile time. Has anybody ran successful the COSMIC checksum calculations? Thanks for your hints!Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 6:06 AM
Posted on May 17, 2011 at 15:06
Problem solved!
It's simply a debugging problem but different than expected! Working with the debugger (SWIM mode) I put a breakpoint somewhere in my code but doing it with the debug module on the silicon it generates a SW breakpoint => so the code is changed on this specific address and the checksum calculation at runtime if different. Doing the same with all breakpoints removed => it works as expected! With the simulator and with the STICE Emulator mode also everything is fine because the breakpoints are implemented in a different way in that case. So we have to keep in mind: no SW breakpoints when checksum calculation is done! ;)