BDM Tracing XGATE in CodeWarrior HC12 V4.5

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

BDM Tracing XGATE in CodeWarrior HC12 V4.5

9,083 Views
xguser
Contributor I
Is there a way to get the XGATE trace to act like the S12X CORE trace (like the XGATE simulator) when using BDM? I can watch the XGATE single step through memory in the dissasembly window, but the code is displayed as FFFF for every instruction. The source window doesn't ever highlight the current line. The memory window only shows FF for every byte in XGATE RAM. The BDM correctly triggers the XGATE breakpoints and the XGATE is single stepping correctly and executing the code correctly.
Labels (1)
0 Kudos
9 Replies

831 Views
CrasyCat
Specialist III
Hello
 
I do not have a HCS12X connected right now, but if I remember well, you can configure what you want to record in the Trace window.
 
Just click with the right mouse button in the Trace window and open the Configuration dialog.
You should be able to tell that you want to record XGATE code trace there.
 
I hope this helps.
 
CrasyCat
0 Kudos

831 Views
xguser
Contributor I

Thanks,

I didn't find that particular dialog, but I can modify trace modes. The issue isn't that it won't trace, because it does.

One issue is that it won't show the content of XGATE ram (which the BDM must read from the processor chip in order to display). The flash image can be viewed in the disassembly window, but that is in the global space that is not part of the XGATE space and it was probably loaded directly from the *.abs file and not fetched from the processor.

The other issue is that it wont highlight the current line in the XGATE assembly window.

0 Kudos

831 Views
CrasyCat
Specialist III
Hello
 Which version of CodeWarrior for HC12 are you using?
 To retrieve that info:
         - Start CodeWarrior
         - Select "Help" -> "About Metrowerks CodeWarrior" or "About
             Freescale CodeWarrior"
         - Click on Installed Product.
         - You should see the installed products and installation version number
             there.
 
CrasyCat?
0 Kudos

831 Views
xguser
Contributor I

Hi,

I'm now using HC12 V4.5 build 6037.

I previously used HC12X 4.1, build 5051 with Service pack XDP512 build 050705. It didn't work there either. That was the first tool I used for this.

0 Kudos

831 Views
CrasyCat
Specialist III

Hello

If you are using CodeWarrior HC12 V4.5, you have to enable trace for XGATE in the following way:

 - Select "MultilinkCyclonePro" -> "Bus Trace"
 - Click with the right mouse button in the Trace window
 - In the drop down menu select "Open Trigger Settings Dialog ..."
 - In the "Trigger Settings" Tab make sure the top combo box is set to
    "Automatic (breakpoints, watchpoints, and trace possible)" 
 - In the combo box on the left change "Trace HCS12X only" to
   "Trace both cores" or "Trace XGATE only" depending on what you
    want to trace.
This is working for me.

I am using V4.5 build 6037.

CrasyCat

0 Kudos

831 Views
xguser
Contributor I

Thank you. Your instructions do result in trace information in the TRACE window, however that wasn't my problem.

Perhaps my use of the word "Trace" is incorrect. Are you able to follow XGATE execution in the XGATE source and assembly windows?

I wish to set a breakpoint in the XGATE (which I can) and then run until the breakpoint triggers (which I can) and then I'd like to single step and follow the code execution in the source:2 and Assembly:2 windows (which I can't).

The current line is not highlited in the XGATE source window (like happens in the CORE source window). When I single step the source window does not change or follow the execution.

The current line IS highlited in the XGATE assembly window and it also steps, but the address is E28xxx instead of 8xxx and the data is always FFFF and the instruction displayed is always LDH R7,#0xFF corresponding to the FFFF data.

The XGATE register window works correctly.

If I use the software simulator instead of the BDM then the XGATE assembly and source windows behave as expected. This is useful for code that doesn't require hardware, but I need to debug the code through the BDM attached to the hardware.

0 Kudos

831 Views
CrasyCat
Specialist III

Hello

This should work. Did you try with a project created from a stationery?

I would suggest you to submit a service request around that one through our online support web interface.

Go to http://www.freescale.com/webapp/sps/site/homepage.jsp?nodeId=054670 log in and click on "Submit a service request".

CrasyCat

 

0 Kudos

831 Views
xguser
Contributor I

Hi,

I got it working. My vendor had to substitute a S12XDT512 for my requested S12XA512. In the confusion I didn't tell all of the tools (linker and emulator) the exact same target. Since they all use the same die I didn't catch that the DT part would have 32K ram but the tool would support only 20K for the DT part. Once I lied to the emulator and told it that it was an S12XA512 then things all worked together.

Thanks, and sorry for the trouble.

0 Kudos

831 Views
CrasyCat
Specialist III
Hello
 I am glad you finally figured that out :smileywink:. Was getting really confused.
CrasyCat.
0 Kudos