Loading Multiple Programs

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

Loading Multiple Programs

Jump to solution
1,768 Views
Mattguy30
Contributor I
Hello.  I'm agoningly new to Codewarrior and the HCS12 uProcessor.  I have two different code segments (not written by me) that are programmed to be flashed to differrent sections in the flash memory so they won't conflict.  Using Codewarrior, I'm able to successfuly download (using a P&E multilink) one of the two programs.  But when I try to download the second program, it mass erases the flash and the first program alltogether.  Is there a way to turn off the mass erase of flash before I try downloading the second program (maybe in the configure menu?)??? 
 
HELP!!!
 
Thanks.
 
-Matt
Labels (1)
Tags (1)
0 Kudos
1 Solution
752 Views
CrasyCat
Specialist III
Hello
 
You can ask the debugger to preserve content of some FLASH or EEPROM memory using FLASH AEFSKIPERASE command.
 
This command is explained in the {Install}\Help\PDF\Debugger_HC12.pdf manual, chapter "Book IV Commands and Environment Variables" section "Connection Specific Commands" -> "NVMC Commands" -> FLASH
 
You can also find some information in the {Install}\Release_Notes\HC12\Notes_debugger_P&E_Multilink_Cyclone_Pro.txt file.
 
Be careful, there are only a couple of flash block that can be programmed/erased separately. THe debugger flash programmer does not allow you to arbitrary erase/program any block of memory.
 
Please use command FLASH to see a list of the blocks that can be programmed/erased separately.
 
Another approach to do so is to merge the second application code inside of the code from the first application and program both applications at once.
 
This can be done using the command HEXFILE in your linker parameter file. Please refer to the Build_Tools_Utilities.pdf manual for information on this command.
 
CrasyCat

View solution in original post

0 Kudos
2 Replies
752 Views
J2MEJediMaster
Specialist I
In the True-Time Debugger, you can set sections of memory to be protected. Start by downloading the first file. Now pick MultilinkCyclonePro > Debugging Memory Map. Select those sections of memory that have the first program and click on Modify/Details.  Go to the protection item and set that memory to write protected. I think that should work; I haven't had a chance to test it.

---Tom

753 Views
CrasyCat
Specialist III
Hello
 
You can ask the debugger to preserve content of some FLASH or EEPROM memory using FLASH AEFSKIPERASE command.
 
This command is explained in the {Install}\Help\PDF\Debugger_HC12.pdf manual, chapter "Book IV Commands and Environment Variables" section "Connection Specific Commands" -> "NVMC Commands" -> FLASH
 
You can also find some information in the {Install}\Release_Notes\HC12\Notes_debugger_P&E_Multilink_Cyclone_Pro.txt file.
 
Be careful, there are only a couple of flash block that can be programmed/erased separately. THe debugger flash programmer does not allow you to arbitrary erase/program any block of memory.
 
Please use command FLASH to see a list of the blocks that can be programmed/erased separately.
 
Another approach to do so is to merge the second application code inside of the code from the first application and program both applications at once.
 
This can be done using the command HEXFILE in your linker parameter file. Please refer to the Build_Tools_Utilities.pdf manual for information on this command.
 
CrasyCat
0 Kudos