Hi Boaz What version of CodeWarrior are you using? I think it was version 5.0.2 or 5.0.3 that had problems with pragma interrupt, at least if you checked "deferred inlining" under Language Settings under Target settings. The absence of an RTI at the end of an ISR would make very strange things happen. If I'm right, you should not be using pragma interrupt with the SDK. The SDK does the saving and restoring, and the RTI. You function is just a user callback function when you use the SDK. Could you possibly have more code than really fits in your program RAM? Does the same thing happen if you cut out most of your app code and just run interrupts? I also like to do the following when weird things happen: create a new project in a new directory. Drag in the code files needed. Don't check many checkboxes - start with "factory defaults". Don't optimize. Is the problem still there? If not, check only those checkboxes you really need. Apparently the project files just "get corrupted" occasionally. Conceivably you could re-make the libraries like MSL C 56800.lib and FP56800.lib. That is needed if you upgrade your IDE. There is a project somewhere that will automate that for you. You might test whether the strange things only happen while you are debugging with breakpoints. I occasionally have strange things happen if I put a breakpoint on a line like "if (fubar == 0)". I like to remove all object code periodically. I also Purge debug cache anytime things get strange (Edit | Preferences | Debugger | Purge Cache. If I have more than one copy of a source file anywhere in a directory tree that CodeWarrior ever heard about, I check the properties of the source file in my Project source tree window, to make sure the file I am editing is the same one the compiler is compiling. Good luck! Rick Corey -----Original Message----- From: bmbmz123 [mailto:] Sent: Tuesday, July 15, 2003 6:10 AM To: Subject: [motoroladsp] MORE: '826 - when interrupts are active - Software is loosing it.... Hello, Without interrupts, sw is running ok. When I apply the interrupts (archEnableInt), the sw is doing crazy stuff - some of the data is overrun, code sections are executed even though it is not supposed to. But, the sw is alive, doing other things it is supposed to!! It behaves as if some code lines are ignored! I check the stack: STACK IS OK. (I filled end-of stack with known data, and checked it - it was not overrun -> no stack overflow) - thanks for the suggestion. I'll appriciate more ideas and suggestions. :-) 10x boaz Rick Corey Senior Software Engineer DPC Instrument Systems Division |
|
RE: MORE: '826 - when interrupts are active - Softw are is loosing it....
Started by ●July 15, 2003
Reply by ●July 15, 20032003-07-15
Hi Boaz What version of CodeWarrior are you using? I think it was version 5.0.2 or 5.0.3 that had problems with pragma interrupt, at least if you checked "deferred inlining" under Language Settings under Target settings. The absence of an RTI at the end of an ISR would make very strange things happen. If I'm right, you should not be using pragma interrupt with the SDK. The SDK does the saving and restoring, and the RTI. You function is just a user callback function when you use the SDK. Could you possibly have more code than really fits in your program RAM? Does the same thing happen if you cut out most of your app code and just run interrupts? I also like to do the following when weird things happen: create a new project in a new directory. Drag in the code files needed. Don't check many checkboxes - start with "factory defaults". Don't optimize. Is the problem still there? If not, check only those checkboxes you really need. Apparently the project files just "get corrupted" occasionally. Conceivably you could re-make the libraries like MSL C 56800.lib and FP56800.lib. That is needed if you upgrade your IDE. There is a project somewhere that will automate that for you. You might test whether the strange things only happen while you are debugging with breakpoints. I occasionally have strange things happen if I put a breakpoint on a line like "if (fubar == 0)". I like to remove all object code periodically. I also Purge debug cache anytime things get strange (Edit | Preferences | Debugger | Purge Cache. If I have more than one copy of a source file anywhere in a directory tree that CodeWarrior ever heard about, I check the properties of the source file in my Project source tree window, to make sure the file I am editing is the same one the compiler is compiling. Good luck! Rick Corey -----Original Message----- From: bmbmz123 [mailto:] Sent: Tuesday, July 15, 2003 6:10 AM To: Subject: [motoroladsp] MORE: '826 - when interrupts are active - Software is loosing it.... Hello, Without interrupts, sw is running ok. When I apply the interrupts (archEnableInt), the sw is doing crazy stuff - some of the data is overrun, code sections are executed even though it is not supposed to. But, the sw is alive, doing other things it is supposed to!! It behaves as if some code lines are ignored! I check the stack: STACK IS OK. (I filled end-of stack with known data, and checked it - it was not overrun -> no stack overflow) - thanks for the suggestion. I'll appriciate more ideas and suggestions. :-) 10x boaz Rick Corey Senior Software Engineer DPC Instrument Systems Division |