RE: Sensitivity to code changes in CW
"Dobbin Allan-r11834" <[email protected]>
| Newsgroups | gmane.comp.hardware.motorola.microcontrollers |
|---|---|
| Message-ID | <4147ED8B92A864498825C07E53594E4A753D02@az33exm20.fsl.freescale.net> |
I've never ran from external FLASH before - presumably you're programming that correctly? CW has an option under debugger settings to 'verify memory writes' - I was going to suggest you use this to ensure the FLASH has been programmed correctly, but if you're runnng from FLASH, I expect the program download options for executable are unchecked, so the tool wouldn't be writing and therefor wouldn't check, so that probably doesn't help you. At least run a verify from your FLASH programmer. I've had some problems with FLASH before when I had initialised strings in the wrong place - make sure all your constant and initialised data are in the correct place i.e. FLASH or RAM as appropriate. You're not changing the chip select registers are you? You're not supposed to change the CS registers while you're running from external memory which is using that same CS region. If you want to do this, you copy the instructions to internal RAM and execute from there. Last suggestion as this one gave me similar types of issues. If you write the SCI baud rate register, the upper 3 bits should be 0. I had code that was writing non-0 to those bits and my program would crash at different places depending what other code around it was doing. - Allan -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of [email protected] Sent: Thursday, December 22, 2005 9:40 AM To: [email protected] Subject: [MPC500] Sensitivity to code changes in CW I'm having a heck of a time debugging a problem in which I'm seeing extreme sensitivity to code changes in an application developed under CW8.1. Starting from a fully functional build, the addition of a single new line of application code can sometimes cause the program to immediately exit. My inexperience with the CW debugger and the fact that I'm running from external flash are combining to make this a tough problem to solve. It appears that the program exits before main is called, i.e. the programs exits during the startup phase. It does not appear to be getting to the newly added line and the behavior is not sensitive to what operations are done on the new line. It does not appear that code size is an issue since I have experienced the problem with various major code elements removed and present. The problem can usually be relieved by making even a minor change in some other area of the program. The fact that its repeatable, not associated with the details of the particular change, and fixable by making some other change raises the question of some type of alignment issue but I'm interested in comments or ideas to try. I realize that asking for debugging help without many details like this is not bound to net concrete answers but I wonder if anyone has experienced this sort of issue either with CW or any other toolset. TIA [Non-text portions of this message have been removed] ----------------------------------------------------------- To learn more about Freescale Microcontrollers, please visit http://www.freescale.com/mcu Yahoo! Groups Links ------------------------ Yahoo! Groups Sponsor --------------------~--> Fair play? Video games influencing politics. Click and talk back! http://us.click.yahoo.com/u8TY5A/tzNLAA/yQLSAA/dN_tlB/TM --------------------------------------------------------------------~-> ----------------------------------------------------------- To learn more about Freescale Microcontrollers, please visit http://www.freescale.com/mcu Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/MPC500/ <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/