This message contains an entire topic ported from a separate forum. The original message and all replies are in this single message. We have seeded this new forum with selected information that we expect will be of value to you as you search for answers to your questions.
Posted: Thu Aug 4, 2005 11:53 am
Does anyone know how you stop CodeWarrior (V3.1) from erasing the 4K EEPROM when it loads the application via the Debugger ?
I have moved my EEPROM to live at &H4000 - &H4FFF , and I think I've told CodeWarrior about this in the .prm file, but the debugger always 'blanks' it.
I've just updated CW with the latest update & patches and the problem has happend since then. Prior to this, it didn't wipe it. When I uploaded a new version of code in to the Flash, my 'data' was left intact in the EEPROM.
I don't think I've changed anything, although I can't be certain as I don't know where the setting is that controls this, and the manual is well....... less than useless, as is MetroWerks idea of support !
Any help or ideas anyone has would be great. It's causing be a load of hassle I didn't need this week !
Regards
Posted: Thu Aug 4, 2005 1:11 pm
This had me stumped for a while, but you need to add the following line to the P&E_ICD_Startup.cmd file for the debugger.
FLASH AEFSKIPERASING 0
It is sort of explained in the file Notes_debugger_icd12.txt buried in the Metrowerks Release_Notes folder for Ver 3.1
Cheers
Posted: Fri Aug 5, 2005 12:32 pm
Please read the release note extract here below for ICD-12 Host Target Interface in CW12V31:
"
- The new command AEFSKIPERASING has been created to specify non volatile memory blocks to protect from mass erasing at application loading. The command should be placed in a "Preload" command file of your project.
The command syntax is:
FLASH AEFSKIPERASING <blockNo>
with blockNo = {number["-"number][","]}
For example, "FLASH AEFSKIPERASING 0,2-4" avoids erasing flash blocks 0,2,3,4.
Reminder: Flash (and non volatile memory) modules and numbers can be displayed when typing the "FLASH" command in the Command window. Also the Flash/Non Volatile Memory dialog list displays all modules starting from block number 0.
"
The release note is usually stored in:
"{CodeWarrior Install
Path}\Release_Notes\HC12\CW_Tools\HC12\Notes_debugger_icd12.txt"
If you have CW12V30:
The flash erasing and programming is fully done via Preload and Postload files. In the preload file, "FLASH ERASE" is without option, erasing the entire flash. It is possible to simply specify blocks to erase, like "FLASH ERASE 0,2-4" to erase flash blocks 0,2,3,4.
Regards,