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

cross mob
gargi1
Level 1
Level 1
5 replies posted 5 questions asked 10 sign-ins

hi Team,

i am using XMC4400 evaluation kit and want to enable XMC_DEBUG_ENABLE. i tried the settings which is given in one of the ticket. but for me after selecting "enable semihosting" the debug option goes to blurr. so i cannot debug it further.

gargi1_0-1691410713480.png

 

kindly provide some solution.

 

Thanks,

Gargi

0 Likes
1 Solution
Pradeep_PN
Moderator
Moderator
Moderator
250 sign-ins 100 solutions authored 25 likes received

Hi @gargi1 ,

The reason it is not working is because the function "SCANF" doesn't work directly .

You need to define them which in backend which uses UART to put and get data.

For reference we are attaching the cy_retarget_io library you should make an similar library for XMC.

Please refer to the below link.

Link : https://github.com/Infineon/retarget-io/tree/master

Hope this helps and let me know if you have any further queries.

Best Regards
Pradeep.

View solution in original post

3 Replies
Pradeep_PN
Moderator
Moderator
Moderator
250 sign-ins 100 solutions authored 25 likes received

Hi @gargi1 ,

Are you using Dave or MTB ? If you are using DAVE please make sure to generate and build the project before debugging.

Can you please make sure that  ".elf " is fetched in the debugger configurations as shown in the below figure

ppn_0-1691415888834.png

If possible can you please post the screen shots of the debugger configurations.

 

Best Regards
Pradeep.

0 Likes

hi Pradeep, 

Thanks i didn't generated the code which was creating issue. now it is working.

Also, i am trying count incrementing code with 1 sec delay and tried to see its result in console window but when user is entering some increment num data the program does not take it and by default taking some value from its side and starts incrementing. for clear understanding i am attaching my code. 

please check and let me know what is wrong with this code

int main(void)
{
DAVE_STATUS_t status;
int num=0;
int increament;

status = DAVE_Init(); /* Initialization of DAVE APPs */
initialise_monitor_handles();

//get the increament number from user
//printf("Entre increament value:");
XMC_DEBUG("Entre increament number:");
scanf("%d",&increament);

while(num<=4095)
{
for(float i=0; i<9000000; i++);
num += increament;
XMC_DEBUG("%d\n",num);
}

 

Thanks,

Gargi

0 Likes
Pradeep_PN
Moderator
Moderator
Moderator
250 sign-ins 100 solutions authored 25 likes received

Hi @gargi1 ,

The reason it is not working is because the function "SCANF" doesn't work directly .

You need to define them which in backend which uses UART to put and get data.

For reference we are attaching the cy_retarget_io library you should make an similar library for XMC.

Please refer to the below link.

Link : https://github.com/Infineon/retarget-io/tree/master

Hope this helps and let me know if you have any further queries.

Best Regards
Pradeep.