How to display pointer as array values in Variables or Expressions panes? (CW 10.7 56F8037)

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

How to display pointer as array values in Variables or Expressions panes? (CW 10.7 56F8037)

1,121 Views
j___
Contributor IV

How can I coerce CW 10.7 to display a pointer as an array?

For example, if I have the following

extern unsigned int IntValues[];

int DoSomethingToArrayOfInts(unsigned int* pInts)

{
    unsigned int* pInts_local;
    code ...
    pInts_local = pInts;
    xyz = pInts_local[5];
}

DoSomethingToArrayOfInts(IntValues);

How can I display pInts and pInts_local as array in the Variables and\or Expressions windows?

Is this possible?

Regards...

0 Kudos
Reply
2 Replies

840 Views
j___
Contributor IV

Hi Erich,

Thanks for the reply. I went to the link\article and tried it. Unfortunately, it does not work on the DSC debugger in CW 10.7, like a lot of other standard debugging features. The issue here is that the DSC implementation on Eclipse has too much Metroworks DNA in it.

The old Metroworks tools (6.x for s08 & 4.x & 8.x for DSC) are terrible tools, missing features like adding symbols, post build steps, requiring the user to choose flash download scheme BEFORE debugging, can't build while debugging because the ELF file is locked, windows popping up on every search, no window docking, a windowing nightmare. Compared to TI's Code Composer 2.2 & 3.3 which are also XP tools of the same vintage, the Metrowerks tools look like a high school project.

Fast-forward to Eclipse, the DSC tool chain is just lipstick-on-a-pig. Pretty sure that it is the Eclipse GUI with the old MW code behind it. It's still feature limited, and buggy. Often, I get errors just adding a global variable to the Expression list, something like "Can't find child." Additionally, the debugger will not stop at breakpoints after a build unless a Clean was done first, a complete rebuild. So, that is just a flavor of why a standard Eclipse feature does not work. No tool improvements or fixes BUT, still $5000 !!!

0 Kudos
Reply

840 Views
BlackNight
NXP Employee
NXP Employee

Hi Jim,

not sure if you are following MCU on Eclipse, but there has been recently an article published about debugging pointers and arrays with Eclipse (which applies to CodeWarrior too):

Eclipse Debugging with Pointers and Arrays | MCU on Eclipse 

It really does not matter if it is an parameter or a local pointer variable: it's all the same. I see that you use a DSC (which I don't have available), but I think this should not make any difference.

I hope this helps,

Erich

0 Kudos
Reply