Debugging Memory Map Changes Lead to NVM Error

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Debugging Memory Map Changes Lead to NVM Error

跳至解决方案
1,300 次查看
drewrainwater
Contributor I

I'm trying to debug memory locations in an MC9S12A32 using CodeWarrior and a PE Micro USB Multilink.

 

When I change the debugging memory map locations from default, I get the following error on the next debugging session:

 

"Error while loading diagnostics algorithm for target..."  in a Non Volatile Memory error box.

 

The device still programs, and the RAM contents do seem to update properly, but I'm not able to launch the "Flash..." dialog box from the toolbar.

 

Here are my updated memory map locations:

 

Registers $7000 - $73FF

RAM $0000 - $07FF

EEPROM $2000 - $27FF

Unbanked Flash 4000 $4000 - $7FFF

Flash Window $8000 - $BFFF

Unbanked Flash C000 $C000 - $FFFF

Banked Flash $3E8000 - $3FBFFF

Banked Memory $18000 - $3DBFFF

 

I'm only using Registers, RAM, and EEPROM, and I'm not sure if the fact that Registers overlap Unbanked Flash 4000 might cause a problem.   I tried disabling the Unbanked Flash 4000, but that didn't seem to help.

 

Any suggestions on what to change in the memory map to make the error go away?

 

Thanks in advance.

Drew

标签 (1)
0 项奖励
1 解答
561 次查看
kef
Specialist I

You should not change Registers and RAM settings in debugger memory map. Warning "This is a debugger predefined module. Deleting or changing this module might lead to debugging missing information" should not be ignored!

 

Debugger is smart enough to detect you changed INITRM, INITRG or INITEE registers settings.You shouldn't remap them.

 

Debugging flash or EEPROM write/erase routines you may need to check "referesh memory when halting" checkbox in corresponding flash/EEPROM memory. Most likely everything else should be kept not touched. 

 

I tried to check if registers are visible @0x7000 after INITRG=0x70. It seems debugger has a bug and doesn't refresh registers at 0x7000 while nonpaged flash @0x4000 is not refreshed. You need to check "refresh memory when halting" for nonpaged flash 0x4000-0x7FFF.

在原帖中查看解决方案

0 项奖励
2 回复数
562 次查看
kef
Specialist I

You should not change Registers and RAM settings in debugger memory map. Warning "This is a debugger predefined module. Deleting or changing this module might lead to debugging missing information" should not be ignored!

 

Debugger is smart enough to detect you changed INITRM, INITRG or INITEE registers settings.You shouldn't remap them.

 

Debugging flash or EEPROM write/erase routines you may need to check "referesh memory when halting" checkbox in corresponding flash/EEPROM memory. Most likely everything else should be kept not touched. 

 

I tried to check if registers are visible @0x7000 after INITRG=0x70. It seems debugger has a bug and doesn't refresh registers at 0x7000 while nonpaged flash @0x4000 is not refreshed. You need to check "refresh memory when halting" for nonpaged flash 0x4000-0x7FFF.

0 项奖励
561 次查看
drewrainwater
Contributor I

Thanks, Kef.  That bug was what caused me to think I needed to update the Debugging Memory Mapping.

 

Everything seems to update correctly now.

0 项奖励