debug problem

Started by timjenison July 25, 2005
I'm using CodeWarrior and P&E's USB multilink (ML-12) to debug
a 9S12XDT512 system. I'm examining the area at$1000. This should be
ram, but the debugger (True-Time Simulator &Real Time Debugger)is
showing me a ghost of the register area at $0000. There are some funny
things going on with the EEPROM area also. I'm guessing this is a P&E
problem, not CodeWarrior. I get the same results using the onboard USB
BDM on a freescale/axiom DEMO9S12XDT512 system. Any ideas?



Tim,

Check if you have defined RAM, EEPROM regions and the base address for
registers as part of the startup code. If you haven't, define using
INITRM, INITEE and INITRG. This should solve the problem.

Mahesh

-----Original Message-----
From: 68HC12@68HC... [mailto:68HC12@68HC...] On Behalf
Of timjenison
Sent: Tuesday, July 26, 2005 2:47 AM
To: 68HC12@68HC...
Subject: [68HC12] debug problem

I'm using CodeWarrior and P&E's USB multilink (ML-12) to debug a
9S12XDT512 system. I'm examining the area at$1000. This should be ram,
but the debugger (True-Time Simulator &Real Time Debugger)is showing me
a ghost of the register area at $0000. There are some funny things going
on with the EEPROM area also. I'm guessing this is a P&E problem, not
CodeWarrior. I get the same results using the onboard USB BDM on a
freescale/axiom DEMO9S12XDT512 system. Any ideas?

Yahoo! Groups Links ****************************************************************************************

Note: The information contained in this message may be privileged and confidential and thus protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you.

****************************************************************************************



Actually, this is quite explainable. The area $1000..$1FFF is controlled
by the RPAGE register and the address $1000 can be considered as offset
0 into the RPAGE=0 page. With this setup you do actually end up in the
register space.
I think (not sure, I'm not so in hardware), you can setup the debugger
to display the $FC1000 to $FC1FFF RAM area when you are looking at
$1000. Or, more simply, just look at $FC1000 :-).

Daniel

timjenison wrote:
> I'm using CodeWarrior and P&E's USB multilink (ML-12) to debug
> a 9S12XDT512 system. I'm examining the area at$1000. This should be
> ram, but the debugger (True-Time Simulator &Real Time Debugger)is
> showing me a ghost of the register area at $0000. There are some funny
> things going on with the EEPROM area also. I'm guessing this is a P&E
> problem, not CodeWarrior. I get the same results using the onboard USB
> BDM on a freescale/axiom DEMO9S12XDT512 system. Any ideas? >
>
> Yahoo! Groups Links >
>





Hi.

Yes, we intentionally decided to display the logical memory for ram, eeprom
and flash banks.

So at (logical) Memory $1000, you always see the ram of RPAGE=0.
At (logical) Memory $FC1000, you always see the ram of RPAGE=$FC.

At (logical) Memory $8000, you always see the ram of PPAGE=0.
At (logical) Memory $FE8000, you always see the ram of PPAGE=$FE.

This memory display was imported from HCS12 devices support, but we
understand that a real physical vision of the bank is more appropriate for
the S12X series.
The next CodeWarrior release will adopt this display choice for all
HC(S)12(X) parts.

Meanwhile:

The Debugging Memory Map user interface dialog let you change the display
as you want. However, you can change the default settings if you edit the
"hc12.ini" file database stored in the "prog" folder of your CodeWarrior
installation.
Backup your original file, then replace the sections here below.
In your projects, you will have to "Revert to Default" in the Debugging
Memory Map user interface. New projects will use the default anyway from
"hc12.ini".
Of course, we have other methods to upgrade this file in a clean manner,
but I will need more time to give you a solution. Please contact me if you
need more help.

Regards,
Gilles [MCUID03F0]
;0x03F0=MC9S12XDP512
DMM_MODULE0=globalmemory1 0x0 0x100000 11 14 0 2 1 1
DMM_MODULE1=globaleeprom 0x100000 0x40000 12 14 1 2 1 1
DMM_MODULE2=globalmemory2 0x140000 0x2c0000 13 14 0 2 1 1
DMM_MODULE3=globalflash 0x400000 0x400000 14 14 1 2 1 1
DMM_MODULE4=Registers 0x0 0x800 1 5 0 2 1 1
DMM_MODULE5rom 0xc00 0x400 100 5 1 2 1 1
DMM_MODULE6=flash4000 0x4000 0x4000 103 5 1 2 1 1
DMM_MODULE7=flashC000 0xc000 0x4000 104 5 1 2 1 1
DMM_MODULE8=xgatememory 0x0 0x10000 16 15 0 2 1 1
DMM_MODULE9TBH-DBGTBLfiforegisters 0x24 0x2 4 1 0 1 1 1
DMM_MODULE10=ram 0x1000 0x3000 102 5 0 2 1 1
DMM_MODULE11nkedram 0x11000 0xfe1000 107 12 0 2 1 0
DMM_MODULE12nkedeeprom 0x10800 0xfe0400 106 13 1 2 1 0
DMM_MODULE13romwindow 0x800 0x400 9999 5 0 2 1 0
DMM_MODULE14nkedflash 0x18000 0xfe4000 105 11 1 2 1 0
DMM_MODULE15=flashwindow 0x8000 0x4000 9998 5 0 2 1 0
HASDBGMODULE=0
DBGMODULEADR=0x0020
VECTORMINADR=0xFF00
S12XDEVICE=1
XGATEMODULEADR=0x380
XGATE_RAM_SIZE=0x8000
HCS12X_FLASH_SIZE=0x80000
FLASHERASEDVALUE=0xFF
BANKWINDOW0NKWINDOW PPAGE ON 0x8000..0xBFFF 0x30 32 0xE0
BANKWINDOW1NKWINDOW DPAGE ON 0x1000..0x1FFF 0x16 5 0xFB
BANKWINDOW2NKWINDOW EPAGE ON 0x0800..0x0BFF 0x17 4 0xFC
RANGE0=HWBPM REMAP_22BITS RANGE 0x4000 0x7FFF 0xFD
RANGE1=HWBPM REMAP_22BITS RANGE 0xC000 0xFFFF 0xFF
BDIK_AEF_ARMING_CMD0=reset
BDIK_AEF_ARMING_CMD1i flash.erase addr000
BDIK_AEF_ARMING_CMD2i flash.erase addr000
BDIK_AEF_ARMING_CMD3i flash.erase addr000
BDIK_AEF_ARMING_CMD4i flash.erase addr000
BDIK_AEF_ARMING_CMD5i flash.load
BDIK_AEF_DISARMING_CMD0i flash.idle
BDIK_AEF_DISARMING_CMD1=reset
SDI_AEF_ARMING_CMD0=TARGETRESET
SDI_AEF_ARMING_CMD1=FLASH
SDI_AEF_ARMING_CMD2=FLASH SELECT
SDI_AEF_ARMING_CMD3=FLASH UNPROTECT
SDI_AEF_ARMING_CMD4=FLASH ERASE
SDI_AEF_ARMING_CMD5=FLASH ARM
SDI_AEF_DISARMING_CMD0=FLASH UNSELECT
SDI_AEF_DISARMING_CMD1=FLASH DISARM
SDI_AEF_DISARMING_CMD2=TARGETRESET
FCS=mc9s12xdp512.fcs [MCUID03F1]
;0x03F1=MC9S12XDT512
DMM_MODULE0=globalmemory1 0x0 0x100000 11 14 0 2 1 1
DMM_MODULE1=globaleeprom 0x100000 0x40000 12 14 1 2 1 1
DMM_MODULE2=globalmemory2 0x140000 0x2c0000 13 14 0 2 1 1
DMM_MODULE3=globalflash 0x400000 0x400000 14 14 1 2 1 1
DMM_MODULE4=Registers 0x0 0x800 1 5 0 2 1 1
DMM_MODULE5rom 0xc00 0x400 100 5 1 2 1 1
DMM_MODULE6=flash4000 0x4000 0x4000 103 5 1 2 1 1
DMM_MODULE7=flashC000 0xc000 0x4000 104 5 1 2 1 1
DMM_MODULE8=xgatememory 0x0 0x10000 16 15 0 2 1 1
DMM_MODULE9TBH-DBGTBLfiforegisters 0x24 0x2 4 1 0 1 1 1
DMM_MODULE10=ram 0x1000 0x3000 102 5 0 2 1 1
DMM_MODULE11nkedram 0x11000 0xfe1000 107 12 0 2 1 0
DMM_MODULE12nkedeeprom 0x10800 0xfe0400 106 13 1 2 1 0
DMM_MODULE13romwindow 0x800 0x400 9999 5 0 2 1 0
DMM_MODULE14nkedflash 0x18000 0xfe4000 105 11 1 2 1 0
DMM_MODULE15=flashwindow 0x8000 0x4000 9998 5 0 2 1 0
HASDBGMODULE=0
DBGMODULEADR=0x0020
VECTORMINADR=0xFF00
S12XDEVICE=1
XGATEMODULEADR=0x380
XGATE_RAM_SIZE=0x5000
HCS12X_FLASH_SIZE=0x80000
FLASHERASEDVALUE=0xFF
BANKWINDOW0NKWINDOW PPAGE ON 0x8000..0xBFFF 0x30 32 0xE0
BANKWINDOW1NKWINDOW DPAGE ON 0x1000..0x1FFF 0x16 5 0xFB
BANKWINDOW2NKWINDOW EPAGE ON 0x0800..0x0BFF 0x17 4 0xFC
RANGE0=HWBPM REMAP_22BITS RANGE 0x4000 0x7FFF 0xFD
RANGE1=HWBPM REMAP_22BITS RANGE 0xC000 0xFFFF 0xFF
BDIK_AEF_ARMING_CMD0=reset
BDIK_AEF_ARMING_CMD1i flash.erase addr000
BDIK_AEF_ARMING_CMD2i flash.erase addr000
BDIK_AEF_ARMING_CMD3i flash.erase addr000
BDIK_AEF_ARMING_CMD4i flash.erase addr000
BDIK_AEF_ARMING_CMD5i flash.load
BDIK_AEF_DISARMING_CMD0i flash.idle
BDIK_AEF_DISARMING_CMD1=reset
SDI_AEF_ARMING_CMD0=TARGETRESET
SDI_AEF_ARMING_CMD1=FLASH
SDI_AEF_ARMING_CMD2=FLASH SELECT
SDI_AEF_ARMING_CMD3=FLASH UNPROTECT
SDI_AEF_ARMING_CMD4=FLASH ERASE
SDI_AEF_ARMING_CMD5=FLASH ARM
SDI_AEF_DISARMING_CMD0=FLASH UNSELECT
SDI_AEF_DISARMING_CMD1=FLASH DISARM
SDI_AEF_DISARMING_CMD2=TARGETRESET
FCS=mc9s12xdp512.fcs
At 11:17 PM 7/25/2005, timjenison wrote:
>I'm using CodeWarrior and P&E's USB multilink (ML-12) to debug
>a 9S12XDT512 system. I'm examining the area at$1000. This should be
>ram, but the debugger (True-Time Simulator &Real Time Debugger)is
>showing me a ghost of the register area at $0000. There are some funny
>things going on with the EEPROM area also. I'm guessing this is a P&E
>problem, not CodeWarrior. I get the same results using the onboard USB
>BDM on a freescale/axiom DEMO9S12XDT512 system. Any ideas? >
>
>Yahoo! Groups Links >
>





I get it. Thanks. Is this in the documentation somewhere? > Hi.
>
> Yes, we intentionally decided to display the logical memory for ram,
eeprom
> and flash banks.
>
> So at (logical) Memory $1000, you always see the ram of RPAGE=0.
> At (logical) Memory $FC1000, you always see the ram of RPAGE=$FC.
>
> At (logical) Memory $8000, you always see the ram of PPAGE=0.
> At (logical) Memory $FE8000, you always see the ram of PPAGE=$FE.
>




One more thing. I can get the debugger to display ram page $fb1000,
which shows me the ram that gets mapped to $1000 in the CPU's space.
However, the little automatic symbol window says "core ram page fb".
It does not display the actual symbols for the ram variables.
However, if I point the debugger's memory window at $1000, I get the
automatic symbol names for the variables (handy!), but the actual
data is a ghost of the IO registers at $0000 (worthless).
Is that really the way you intended it to work??? > > Yes, we intentionally decided to display the logical memory for
ram,
> eeprom
> > and flash banks.
> >
> > So at (logical) Memory $1000, you always see the ram of RPAGE=0.
> > At (logical) Memory $FC1000, you always see the ram of RPAGE=$FC.
> >
> > At (logical) Memory $8000, you always see the ram of PPAGE=0.
> > At (logical) Memory $FE8000, you always see the ram of PPAGE=$FE.
> >


Hi.
This was a "convention" in the debugger.
Since CW12V40 (and one P&E Multilink USB20 service pack for CW12V31), the
new Debugging Memory Map GUI/Manager gives the possibility to display as
you want. The GUI has a report window giving live details about the way the
chip memory is accessed.
Regards,
Gilles At 04:33 AM 7/27/2005, you wrote:

>I get it. Thanks. Is this in the documentation somewhere? > > Hi.
> >
> > Yes, we intentionally decided to display the logical memory for ram,
>eeprom
> > and flash banks.
> >
> > So at (logical) Memory $1000, you always see the ram of RPAGE=0.
> > At (logical) Memory $FC1000, you always see the ram of RPAGE=$FC.
> >
> > At (logical) Memory $8000, you always see the ram of PPAGE=0.
> > At (logical) Memory $FE8000, you always see the ram of PPAGE=$FE.
> >
>Yahoo! Groups Links >
>