HCS12 Unable to Single Step through EEPROM write +

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

HCS12 Unable to Single Step through EEPROM write +

ソリューションへジャンプ
2,108件の閲覧回数
YeOldeBDM
Contributor III
Hi. I just inherited a project from an outside consultant and his notes give the following limitations-
-Cannot single step through routines which write to the onchip EEPROM
-Cannot break/resume with WDT enabled (most of the time).
-EEPROM does not retain contents between BDM debug loads (of course the entire memory is flashed from debug session to debug session)
 
 
I have verified the  limitations, and the consultant did spend some time trying to resolve them last year with freescale tech support. Now the project is alive again.
 
 
I am using Codewarrior 3.1 for HCS12. We are using an external oscillator, so there are no PLL issues.
 
Does anyone have any pointers to documentation on these limitations? I googled but did not find anything. I just want to know if these are known issues or if there are any work-arounds.
 
I read somewhere on this board that Codewarrior 4.5 may allow the EEPROM to be preserved between ICD debug sessions, but at this point I don't have time to upgrade
Thanks!
ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
740件の閲覧回数
Lundin
Senior Contributor IV
-Cannot single step through routines which write to the onchip EEPROM

That's right. The manual, chapter "4.1.4 Illegal EEPROM Operations":

"The part enters STOP mode and a program or erase command is in progress. The command is aborted and any pending command is killed."



-Cannot break/resume with WDT enabled (most of the time).

Of course not. Don't debug with the wdog enabled and you'll be fine.




-EEPROM does not retain contents between BDM debug loads (of course the entire memory is flashed from debug session to debug session)

That one is trickier. You can do it in Codewarrior if you use the old "cmd"-files. In preload.cmd, write:

reset
FLASH
FLASH SELECT
FLASH UNPROTECT
FLASH ERASE 1-8
FLASH ARM


1-8 is the page numbers, for an HCS12 with 8 pages of flash (128k). If you just write FLASH ERASE without any numbers it will erase the whole memory, including the EEPROM which is page 0 if I remember correctly. By adding 1-8 it will only erase the flash.
That's the only way I know of. You might have to set the debugger to "load code + symbols" instead of "load code to nvm" for it to work, since the latter is the new feature introduced in CW3.0 and not compatible with cmd-files. Or so did Metrowerks tell me back then.

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
740件の閲覧回数
YeOldeBDM
Contributor III
Thanks for the info!
0 件の賞賛
返信
741件の閲覧回数
Lundin
Senior Contributor IV
-Cannot single step through routines which write to the onchip EEPROM

That's right. The manual, chapter "4.1.4 Illegal EEPROM Operations":

"The part enters STOP mode and a program or erase command is in progress. The command is aborted and any pending command is killed."



-Cannot break/resume with WDT enabled (most of the time).

Of course not. Don't debug with the wdog enabled and you'll be fine.




-EEPROM does not retain contents between BDM debug loads (of course the entire memory is flashed from debug session to debug session)

That one is trickier. You can do it in Codewarrior if you use the old "cmd"-files. In preload.cmd, write:

reset
FLASH
FLASH SELECT
FLASH UNPROTECT
FLASH ERASE 1-8
FLASH ARM


1-8 is the page numbers, for an HCS12 with 8 pages of flash (128k). If you just write FLASH ERASE without any numbers it will erase the whole memory, including the EEPROM which is page 0 if I remember correctly. By adding 1-8 it will only erase the flash.
That's the only way I know of. You might have to set the debugger to "load code + symbols" instead of "load code to nvm" for it to work, since the latter is the new feature introduced in CW3.0 and not compatible with cmd-files. Or so did Metrowerks tell me back then.
0 件の賞賛
返信