CW displaying flash memory on Star12

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

CW displaying flash memory on Star12

Jump to solution
3,993 Views
mke_et
Contributor IV
I'm using CW 3.1 SE to do a Star12 project.  This is not my first project, but it's the first one that uses paged flash.
 
I'm having trouble getting some flash stuff to work.
 
What's not helping is I can't get the memory window to display the flash. 
 
At first I thought it was just that the debugger won't display paged flash.  But then I set the memory window up to 388000h.  I can see the flash image that I'm loading by default up there.  But when I run and stop the CPU, that window will NOT update.
 
It just won't.  It STAYS locked on what I programmed in when I built the code.  I can add data to the the window, and it never shows. 
 
I was seeing the same thing with the EEPROM for a while.  And I wrote a small routine that just 'snapshot' the EEPROM to SRAM (I only needed about 100 bytes of it) on every timer tick just to see it, and then suddenly the memory window started working direct to the EEPROM. 
 
Is this a known bug in CodeWarrior?  Pretty serious if it is.  Any workarounds?
 
Mike
 

Message Edited by mke_et on 02-21-200602:22 PM

Labels (1)
Tags (1)
0 Kudos
1 Solution
671 Views
marc_paquette
Contributor V
With great help from my colleagues, I think I understand the problem. The debugger's window won't update when you stop your program in the debugger because the debugger is caching target memory on the host. The debugger uses this cache to speed up the debugging process but doesn't show a real-time view of target memory.
 
At the risk of slowing down the debugger, turn on the "Refresh memory when halting" option for the appropriate item in the Debugging Memory Map window.
 
To manually change the contents of flash memory through the debugger, use the debugger's command window to enter these commands:
 
FLASH
FLASH SELECT
FLASH ARM
 
You can then edit in the Word and Long display format. HCS12(X) targets do not allow byte editing.
 
To close the edit session, following commands should be typed in the Command window:
 
FLASH DISARM
FLASH UNSELECT

The HC(S)12(X) Debugger Manual describes these features more fully.

Marc.

View solution in original post

0 Kudos
3 Replies
671 Views
mke_et
Contributor IV

Boy, give a guy a little info and he becomes VERY dangerous!

I can now look at the FLASH, but if I leave it I can't program it.  It tells me 'Error while loading diagnostics. and then won't run.  I take it the values have to exactly match what you're setting the chip up for?

I'm gonna have to play with this, because in my configuration I've moved the SRAM to 2000-3FFF and the EEPROM to 8000-FFF

Mike

 

0 Kudos
671 Views
mke_et
Contributor IV

Thank you very much!!  I've been fighting that one for some time. 

 

I'm glad these forums are up and finally seeing some activity!

Mike

 

0 Kudos
672 Views
marc_paquette
Contributor V
With great help from my colleagues, I think I understand the problem. The debugger's window won't update when you stop your program in the debugger because the debugger is caching target memory on the host. The debugger uses this cache to speed up the debugging process but doesn't show a real-time view of target memory.
 
At the risk of slowing down the debugger, turn on the "Refresh memory when halting" option for the appropriate item in the Debugging Memory Map window.
 
To manually change the contents of flash memory through the debugger, use the debugger's command window to enter these commands:
 
FLASH
FLASH SELECT
FLASH ARM
 
You can then edit in the Word and Long display format. HCS12(X) targets do not allow byte editing.
 
To close the edit session, following commands should be typed in the Command window:
 
FLASH DISARM
FLASH UNSELECT

The HC(S)12(X) Debugger Manual describes these features more fully.

Marc.
0 Kudos