To do Flash programming using the DOS shell:
01############################################################ 02# Standalone.tcl: a script file to flash my application 03############################################################ 04 05# in any case, disconnect an existing debug connection 06fl::disconnect 07 08# set launch configuration: 09fl::target -lc "LC for Simple Flash" 10 11# set Set the target RAM buffer for downloading image data: 12fl::target -b 0x20000000 0xffff 13 14# switch off verify and logging: 15fl::target -v off -l off 16 17# select flash device, organization and memory range: 18cmdwin::fl::device -d "CFM_MCF5225X_512" -o "256Kx16x1" -a 0x0 0x7ffff 19 20# specify target file, auto detect format, range settings on followed by the flash range, offset settings off 21cmdwin::fl::image -f "C:\\tmp\\wsp_StandaloneFlsh\\Application.S19" -t "Auto Detect" -re on -r 0x0 0x7ffff -oe off 22 23# now erase the flash... 24cmdwin::fl::erase image 25 26# ... followed by writing the application to flash: 27cmdwin::fl::write 28 29# disconnect connection 30fl::disconnect 31 32# exit Eclipse IDE 33 quitIDE
"<CWInstallDir>\eclipse\cwide.exe" -data "c:\tmp\wsp_StandaloneFlsh" -vmargsplus -Dcw.script="c:\tmp\wsp_StandaloneFlsh\standalone.tcl"
where,
< CWInstallDir> is the installation directory of your CodeWarrior software,
-data argument specifies the workspace, and
-vmargsplus argument executes the Debugger Shell script from the command-line
The DOS shell launches the CodeWarrior IDE and executes the script file to flash the board.