Problem with printf()

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

cross mob
User21797
Level 2
Level 2
10 likes given First comment on blog First solution authored
Hi there,

I am using AURIX Dev. Studio and was testing printf() to print out variable to FSS window. At first it work fine, but after a while (~1min) the program will halt suddenly and a window will pop out saying "No source available for "TC23x.frame[0]"". The disassembly point to a function called _dbg_trap() but I can't find it anywhere in source code.

I have even tried replacing iLLD with V1.0.1.13.0 but still no use.

I have attached some screenshots here. I have also uploaded my project for examination. The project is just the demo project Blinky_LED_1_KIT_TC234_TFT with 2 line added in Blinky_LED.c to keep printing out variable myTest when LED is toggled. You can download it here: https://1drv.ms/u/s!ArYO_KxP91FxgZdETkoIB3ZM9abwGg?e=0iM0tR

Thanks for reading, any reply is appreciated.

5155.attach5156.attach
0 Likes
5 Replies
User13836
Level 6
Level 6
50 likes received 50 solutions authored 100 sign-ins
I gave it a try over here. Problem confirmed. There seems to be a general issue in the AURIX Development Studio related to printf output which is redirected to the File System Simulation (FSS) window of the debugger. This does not work for a longer time. The use case can be reduced to the following example code:

#include "Ifx_Types.h"
#include "IfxCpu.h"
#include "IfxScuWdt.h"
#include

IfxCpu_syncEvent g_cpuSyncEvent = 0;

int core0_main(void)
{
IfxCpu_enableInterrupts();

/* !!WATCHDOG0 AND SAFETY WATCHDOG ARE DISABLED HERE!!
* Enable the watchdogs and service them periodically if it is required
*/
IfxScuWdt_disableCpuWatchdog(IfxScuWdt_getCpuWatchdogPassword());
IfxScuWdt_disableSafetyWatchdog(IfxScuWdt_getSafetyWatchdogPassword());

/* Wait for CPU sync event */
IfxCpu_emitEvent(&g_cpuSyncEvent);
IfxCpu_waitEvent(&g_cpuSyncEvent, 1);

while(1)
{
printf("Hello\n");
for(unsigned int loop=0; loop<0x10000; loop++)
__nop();
}
return (1);
}

The printf output will fail after some time. This is an erroneous behavior which needs to be sorted out by the ADS support staff.

ADS version I used for testing: 1.4.2

I imported the project into the TASKING TriCore tools v6.3r1 and therein the printf outpt works normal.

Best regards,
Ulrich

TASKING tools support
0 Likes
teoBits
Employee
Employee
5 sign-ins 100 replies posted 50 replies posted
Hello,

thanks for reporting this issue, we are currently investigating about it.

teoBits
0 Likes

Hello, is there an update on this? I'm facing the same issue with 1.9.4, code execution hits a trap after exactly one printf.

aman4512_0-1689678425520.png

 

0 Likes
User21797
Level 2
Level 2
10 likes given First comment on blog First solution authored
Thanks for the all the reply and confirming my problem! I thought I have screw up something during installation.
0 Likes
User22465
Level 1
Level 1
Hello,
I have the same problem, and hope there is a solution as soon as possible.
0 Likes