Writing to a Dave Console window

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

cross mob
Not applicable
Is it possible to redirect stdio to the Dave console window ?

Means: a printf does its output in the Dave Console Window.
I do not mean an Output to a terminal program.
0 Likes
17 Replies
Not applicable
Hi VTrapp,

May I know what kind of data you would like to output in the Dave Console Window?

Best regards,
Sophia
0 Likes
Not applicable
Hi Sophia,

main purpose is for log Information while debugging.
I do have a trace unit for Debugging but sometimes it is very helpfull just to printf some Information on a console window.
This is not for a standalone application.

I have some different dev Tools ( not for XMC ) where a Eclipse console window to the stdio path.
0 Likes
Not applicable
Hi VTrapp,

Could you pls try the followings:
Go to > Debug Configurations > Select application to debug (e.g TASKING C/C++ Debugge: debug configuration) > Click "Arguments" Tab > Write ‘–debug’ in program arguments section > apply changes and close the window > Re-launch debug configuration
The -debug argument puts the platform in debug mode and enables tracing.

Best regards,
Sophia
0 Likes
Not applicable
Thanks Sophia,

so how do you write to the console window.

I just have an example:

int main(void) {

// do some init stuff
printf("Hello World");
while(1);
}

Well I would like to see the 'Hello World' in a Dave Console Window.
I tried your "-debug" Switch, but could not see any effects.
0 Likes
Not applicable
I, too, would find this very helpful. However I could not get it to work either.

I'm using the XMC4500 Relax Kit and the latest DAVE version.

Thanks.
0 Likes
Not applicable
Sophia,

you made a suggestion on how to direct stdout to the console window but as I and others have found out it does not work.

Please can you confirm whether or not stdout can be directed to the console window?

If it can be; please provide details of how it can be done.

Regards,

Steve
0 Likes
herbert
Employee
Employee
I am very interested in a stdio Output to the console window too. I would like to show some vector entries in the debug mode, because in the TASKING Debug perspective (variables window) you can only make a 100 vector entries visible. Because I need to see more this would be very useful to me for troubleshooting! thanks!
0 Likes
Not applicable
Hi Herbert,

Perhaps you already know how to adjust the starting index in order to view the rest of elements in "Expressions/Variables" window if you have an array with more than 100 elements. (Details in "DAVE TIP of the day: Monitor array/structure type variables")

As for the stdio output to the console window, we are aware of the demands. It was in the planning phase. Will update you once available, thanks.

Best regards,
Sophia
0 Likes
Not applicable
Sophia,

do you have a rough time scale for the addition of the ability to write to the console, within a month, two months, six months?

Regards,

Steve
0 Likes
User5581
Level 3
Level 3
If you are willing to use a USIC channel on your target for this, and you simply want the output in Eclipse rather than a seperate terminal program, then perhaps the following will work for you. It worked for me:

Install the Indigo terminal from within DAVE3 using Help>>Install New Software. Select Work with: Indigo from the dialog
Then select 'Target Management Terminal' as seen below:

2416.attach

Once it installs, you can open the terminal window in DAVE3 by going to Window>> Show View >> Other ... >> Terminal >> Terminal
It looks like this once it is running. (Some instrumentation of the code I am working on now is shown in the window):

2410.attach

Use the icons in the upper right of the console to select a serial connection and set the COM port, baud rate etc.

I then redirect printf() output to the USIC using the UART001 App with the following function in my source code:


int _write(int file, char *buf, int nbytes)
{
for(int i = 0; i < nbytes; i++)
{
if(USIC_IsTxFIFOfull(UART001_Handle0.UartRegs)) // If the UART Tx fifo is full,
return i; // Give up and report how many bytes we did send.
else
UART001_WriteData(UART001_Handle0,*buf++); // If the Tx fifo is not full, then go ahead and write the byte.
}
return nbytes;
}


Of course you still must connect the serial port on the XMC target to a serial port on the PC.

I figured out the Eclipse part based on this link: http://stackoverflow.com/questions/12140381/how-to-open-a-serial-terminal-in-eclipse-juno
0 Likes
Not applicable
I'm interested in this issue too.
In IAR EWARM you can redirect stdout to debug console by checking one checkbox, but I would like to work with XMC4500 in DAVE.
I tried to use xSPY for printf to debug console but it's not supported by XMC4500 Relax Kit.
On the forum I read that new relax kit v2 wich supports xSPY is announced for the end of 2013 - beginning of 2014.
How soon it will be available? Will it be the new product with new part number or just the new revision of PCB? Will it be available in Relax Lite Kit?
0 Likes
Not applicable
Hi Andrey,

Thank you very much for the interest. Unfortunately we decided not to go into production with Relax V2 because of a shortage in XMC4200 samples required for the Debugger part.
Currently we producing Version 1 of the Relax Kit again.

Best regards,
Sophia
0 Likes
Not applicable
Hi Sophia,
Thank you for your fast answer. So by this moment there is no way to redirect printf to DAVE debug console?
0 Likes
Not applicable
VTrapp wrote:
Thanks Sophia,

so how do you write to the console window.

I just have an example:

int main(void) {

// do some init stuff
printf("Hello World");
while(1);
}

Well I would like to see the 'Hello World' in a Dave Console Window.
I tried your "-debug" Switch, but could not see any effects.


Hi Sophia,

I still do not know how to get a Dave Console Window or Debugger Watch Window where i can get my output value

Thank you.

Best rgds,
atzkae
0 Likes
Not applicable
Hi Tyzz Kae,

Unfortunately you are unable to print out the value in DAVE Console Window at this moment:( You may choose alternative ways mentioned in previous posts.

Best regards,
Sophia
0 Likes
Not applicable
DAVE 3.1.10 contains a new debug configuration for the IFX gdb debugger. Ist it possible to use the requested printf() with this one?

Regards
Heinz
0 Likes
Not applicable
Hi everyone,

Ya I am too very much interested in knowing how to print values in console window. Please give me a perfect solution for this.

Thanks & regards,
Suriya
0 Likes