cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
geetha.diwakar
Participant
Participant
1,161 Views
Registered: ‎09-07-2017

fail to run the code xlinx sdk

hi ,

     I am new to xlinx sdk i want to run a  c code which has simple some array operation in that .

when i run the code its going to disassembly.c before executing the loop .i am not getting any thing ,can any one help me to sort out of this problem. code i used to run is written below.

#include<stdio.h>
int main()
{
unsigned char arr[721920];// 0x5bc20
unsigned char arr1[721920];//0x5bc20
char ch ;
int i=0 j=0;
while(arr[i]!='0')
{
ch=arr[i];
ch=ch-(8*5-3);
arr1[j]=ch;
i++;

j++;
}
return 0;
}

 

0 Kudos
5 Replies
hbucher
Scholar
Scholar
1,150 Views
Registered: ‎03-22-2016

@geetha.diwakar Make sure you are compiling a Debug build. Put a breakpoint on the first line. Run Debug.

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
geetha.diwakar
Participant
Participant
1,123 Views
Registered: ‎09-07-2017

thanks for your reply,

if i add a break point inside the while loop and started debugging ,after debug if i run the prgm  ,prgm not hitting to the break point directly it is going to return 0 and after that disassembly.c file .please help me to sort this problem.

0 Kudos
hbucher
Scholar
Scholar
1,119 Views
Registered: ‎03-22-2016

@geetha.diwakar If you move the declaration of arr and arr1 to above (outside) main What happens? I think you are exceeding stack size.

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
0 Kudos
geetha.diwakar
Participant
Participant
1,109 Views
Registered: ‎09-07-2017

i changed the array size and declared out of the main also same result 

u can check my code.

//

unsigned char SendBuffer[71]={56, 00, 36, 01, 00}; //0x100ad4
unsigned char RecvBuffer[71];// 0x108024


int main()
{
unsigned char ch;

int i=0;
while(SendBuffer[i]!='\0')
{
ch=SendBuffer[i];
ch=ch;
RecvBuffer[i]=ch;
i++;
}

//

0 Kudos
hbucher
Scholar
Scholar
1,099 Views
Registered: ‎03-22-2016

@geetha.diwakar These are general clc++ questions, nothing to do with Xilinx products. You'd rather get more feedback from stackoverflow or reddit.com/r/cppquestions

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
0 Kudos