Fast flash debugging for coldfire ?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Fast flash debugging for coldfire ?

2,341 Views
lambtron
Contributor I
I am using codewarrior 6.4 build 4 to develop an application for coldfire M52223.  The code size is too large for sram, so I must locate the program in flash and debug it there.
 
For each little code change, I must:
* compile and link
* open Tools | Flash Programmer dialog box
* erase flash
* program flash
* cycle power on target
* start debugger running
* hit F5 to proceed past initial breakpoint
 
With smaller programs, I can debug in ram and the debug cycle is reduced to this:
* compile and link
* hit F5 to start the debugger
 
Is there a faster way to debug in flash?  This lengthly debug cycle is killing my creativity!!!


Message Edited by lambtron on 2007-06-04 08:53 PM
Labels (1)
0 Kudos
Reply
4 Replies

765 Views
sjmelnikoff
Contributor III
For what it's worth, I submitted a SR (#1-355427330) on this very subject a couple of months ago. The response was:
Thank you for you feedback. I understand your feature request and we added it in our system tracking.

For moment an idea is to create a script for Command Window using TCL.

There is an option to start your program running as soon as the debugger starts, which will remove the final step in the sequence. (Project settings -> Debugger settings -> Stop on application launch).
 
Steve.
0 Kudos
Reply

765 Views
lambtron
Contributor I

For moment an idea is to create a script for Command Window using TCL.

That sounds somewhat promising. How would I go about creating such a tcl script, and is it possible to invoke the script from within the codewarrior ide? (I certainly hope so, as I would otherwise not be improving the debug cycle time). Are any examples available that will jumpstart my efforts?
0 Kudos
Reply

765 Views
CrasyCat
Specialist III
Hello
 
You can write a tcl commend file using flash programming commands.
 
You can start a tcl file from CodeWarrior in the following way:
  - Start CodeWarrior
  - Open a command window selecting "View" -> "command Window"
  - Enter command source myscript.tcl.
 
These commands are not visible right out of the box, but you can make them visible using the command:
     cmdwin::setvisible on cmdwin::fl
 
Following commands are then available for flash programming.
 
    blankcheck        Test that the flash device is in the blank state. 
    checksum         Calculate a checksum. 
    device                Define the flash device. 
    erase                 Erase the flash device. 
    image                Define the flash image settings. 
    load                   Load the target, device, and image settings from <file>.
    save                  Save the target, device, and image settings to <file>. 
    target                Define the target configuration settings. 
    verify                 Verify the flash device. 
    write                 Write the flash device.
 
A typical script for flash programming will look as follows:
   cmdwin::fl::load demo.xml   
   cmdwin::fl::device -se all
   cmdwin::fl::erase all
   cmdwin::fl::image project.eld
   cmdwin::fl::write
   cmdwin::fl::verify
 
where
   demo.xls is the name of the flash configuration file you want to use. You find configuration
                   file for typical EVB board at {Install}\bin\Plugins\Support\Flash_Programmer\ColdFire.
   project.eld is the name of the .eld file you want to program.
 
CrasyCat
0 Kudos
Reply

765 Views
CrasyCat
Specialist III
Hello
 
CodeWarrior fore Coldfire does not allow you to program the flash directly when you hit the debug button.
I would recommend you to submit a SR asking for an extension (improvement) in the current tool set.
 
Click here to submit a SR.
Make sure to specify you want to submit a "Change Request" and that you are using CodeWarrior for Coldfire V6.4.
 
CrasyCat
0 Kudos
Reply