Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

DAVE™ Forum Discussions

dguevaravu
Level 1
Level 1
First reply posted First like given First question asked
Hello,
 
I have been trying to initialize a 512 by 512 int Matrix (matA) but have been getting the following error code: 
 
Failed to execute MI command:
-data-evaluate-expression matA
Error message from debugger back end:
Cannot access memory at address 0x1ffffd00
 
When trying to initialize a smaller matrix of 4x4 it works and can accurately initialize and update values within the matrix. I have tried doing a single array of an equivalent size to the matA[512][512] matrix instead and still get an error. It seems as if the memory addresses within the matrix are out of bounds or I do not have enough memory space. However, since the matrix is of type “int” the sizes I have tried should be within the bounds. 
 
Any ideas or advice as to what to try? 
 
Using a XMC1100-Q024F0064
0 Likes
1 Solution
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hi,

This looks like a overflow issue. Can you check whether the variable address from map file and check going to that address ? Additionally as this overflow could happen in run-time we  are unable to track that.

Best Regards,
Vasanth

View solution in original post

0 Likes
3 Replies
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hi,

To understand the question more, are you facing the issue only when you try to see the variable on debug ? Is the project building without any problem ? Also could you kindly provide a screenshot on what you see at your end and the pseudo code to recreate the issue ?

Best Regards,
Vasanth

Sure, I am facing the issue when trying to see the variable on debug. The project is building without any problems

int matA[512][512];

for(int i = 0; i <= 512; i++) {

    for(int j = 0; j <= 512; j++) {

         matA[i][j] = rand();
   }
}

I am just trying to fill an empty matrix of 512 by 512

0 Likes
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hi,

This looks like a overflow issue. Can you check whether the variable address from map file and check going to that address ? Additionally as this overflow could happen in run-time we  are unable to track that.

Best Regards,
Vasanth

0 Likes