Topic : Matrix elements out of order

Forum : ARM

Original Post
Post Information Post
August 15, 2007 - 7:39pm
Guest

I am running the RIDE with the ARM ToolChain Version 1.1.15, CARM-AS Assemblyer Version 1.00.05, CARM-GCC Compiler Version 1.00.14 (although the installation of GCC thinks that it is 4.1.1), as well as RLink-Pro.

I've defined a matrix for debugging a state machine:

uint32_t StateAndTime[2][INITIALIZE_TRANSMISSION+1]; // DEBUG!!

where INITIALIZE_TRANSMISSION is the last state (#10, 0-origin) in the enumeration. During execution, each state begins with a statement like this one:

case SEND_FIRST_CHARACTER_IN_MESSAGE:
StateAndTime[0][SEND_FIRST_CHARACTER_IN_MESSAGE] = IOMGR_MillisecondTimer(); //DEBUG!!
StateAndTime[1][SEND_FIRST_CHARACTER_IN_MESSAGE] ++; //DEBUG!!

However, when I execute the above, the RIDE debugging Watch window shows two really odd things:

First, the matrix StateAndTime is displayed in the Watch Window with the dimensions in reverse order from the matrix declaration. From the middle, where it's most obvious:

-StateAndTime[7]
StateAndtime[7][0]
StateAndtime[7][1]
-StateAndTime[8]
StateAndtime[8][0]
StateAndtime[8][1]

Second, the variables are not being updated in an order that makes sense. So when the source code is updating StateAndTime[0][3] and StateAndTime[1][3], the Watch Window shows the updates taking place at StateAndTime[1][1] and StateAndTime[7][0], respectively.

ARM assembler code is still pretty obscure for me, so I'm wondering: is this a compiler error or a debugger error? (or my error?!) Has anyone reported it before? Do you have any workaround besides doing my own subscript calculations? Do you have an expected correction?

Replies
Post Information Post
+1
0
-1
November 19, 2007 - 4:53pm
Guest

Hello,

this issue has been solved in the BN747 downloadable on the website.

regards,
Lionel