Eric Cina

BDM Flash Erase to Non-Sector Boundary

Discussion created by Eric Cina on Feb 15, 2008
Latest reply on Feb 15, 2008 by Eric Cina
I'm using MC9S12A128 and A256 micros with a USB BDM Multilink.  I recently moved my Bootloader to a non-sector boundary.  I can no longer simply use a sector erase before loading non-bootloader code since this will erase my bootloader.  So I can't figure out how to load my non-bootloader code using the BDM without erasing my Bootloader. 
 
I have tried to use the "copymem" command to try to copy the flash values before erasing and then restore them after erasing but the copymem does not seem to be able to copy back to flash. If I could somehow store values into a variable and then write them back to flash that would work.
 
How can read values into variables using a command script? Any help would be appreciated.
 
Thanks,
Eric
 

Outcomes