Debugging flash writer code on MC9S12A256 using Cyclone Pro

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

Debugging flash writer code on MC9S12A256 using Cyclone Pro

Jump to solution
1,676 Views
Stephen
Contributor III
I have an application where I can download a data table via the serial port, and it is then written to Flash.
The flash writing code is copied into RAM and run from there. (it is compiled as position independent code?)
If I program this application onto the target, disconnect the BDM, then switch it on again, I can download the table and it is successfully stored to flash memory. I can view the memory via the serial port commands, or I can reconnect the BDM device and inspect the memory in the debugger, and it has been updated successfully :smileyhappy:
 
Now for the strange part: if I leave the BDM connected and run the program under control of the debugger, the flash memory is not altered. But neither protection violation nor access error flags are set either. But I can step through the assembler code in RAM and it is running as it should. :smileysad:
 
I am guessing that there is a setting in the debugger that I should set but I have tried looking and even checked the help files, but cannot work out what I have done wrong.
 
Any suggestions please? 
Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
679 Views
CrasyCat
Specialist III
Hello
 
Not sure this is the problem, but I know there is a Debugging Memory Map associated with the debugger.
 
You can see the current Debugging memory MAP selecting MultilinkCyclonePro -> "Debugging MemoryMap"
 
Make sure the "Refresh memory when halting" is checked for the flash area you are programming.
Per default, FLASH memory are not refreshed when debugger is halted (As far as I know).
 
I hope this helps.
 
CrasyCat

View solution in original post

0 Kudos
Reply
2 Replies
679 Views
Stephen
Contributor III
Sorry - forgot to mention - True Time simulator and real time debugger is version 6.1, build 6037.
The cyclone pro is the earlier model without the LCD screen on the front.
0 Kudos
Reply
680 Views
CrasyCat
Specialist III
Hello
 
Not sure this is the problem, but I know there is a Debugging Memory Map associated with the debugger.
 
You can see the current Debugging memory MAP selecting MultilinkCyclonePro -> "Debugging MemoryMap"
 
Make sure the "Refresh memory when halting" is checked for the flash area you are programming.
Per default, FLASH memory are not refreshed when debugger is halted (As far as I know).
 
I hope this helps.
 
CrasyCat
0 Kudos
Reply