This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I finally got the DSP/BIOS6 hello example compiled and linked without errors and got a .out file. Following the "Running and Debugging an Application" in this link:
http://rtsc.eclipse.org/docs-tip/RTSC%2BCCStudio_v4_QuickStart
I can't see the System_printf("hello world\n") in the Console. Since I don't have any hardware board, so I tried to use TI's simulator to create an Target Configuration file and in the common.cfg file added System module. But the Run icon either gray out or says "Invalid file format".
Is there anything else I have missed?
Thanks.
oops, wrong button (I hit suggest an answer)
I was able to get output (both on an eval board over USB/JTAG and with the simulator) by using printf() and #include <stdio.h>
System_printf() has never generated output for me either...
Depending on which version of SYS/BIOS you are using, you may not see the System_printf's come out on the console due to how System is configured. If you want to have System_printf output go to the same place as printf, add the following three lines to your .cfg file and re-build:
var System = xdc.useModule('xdc.runtime.System');
var SysStd = xdc.useModule('xdc.runtime.SysStd');
System.SupportProxy = SysStd;
If you don't do this, the output will go to a circular buffer in memory. You can examine that buffer using the ROV tool (use the menu: Tools->ROV while in the debugger).
Mark
Hi Mark
That got it working. Thanks
I could not find the buffer you mentioned. Is it Tools->ROV->xdc->runtime->System?
Cheers
For future reference: it's under SysStd (or SysMin if configured) - click on the OutputBuffer tab
BrianC said:For future reference: it's under SysStd (or SysMin if configured) - click on the OutputBuffer tab
All,
After having similar issues (not seeing the System_printf() outputs), and having followed the advice of this thread, I came across an eclipse website that answers this question with more detail.
Just wanted to share for the benefit of new SYS/BIOS users like myself.
Hi, Chris:
I ran into the same problem too . I add System_printf() in main(), and I got nothing in console window..
so I add some codes as suggested but I still got noting in console window...
So do you know why?
Thanks a lot.. yuankui
var System = xdc.useModule("xdc.runtime.System"); var SysMin = xdc.useModule("xdc.runtime.SysMin"); SysMin.bufSize = 0; SysMin.flushAtExit = false; System.SupportProxy = SysMin; /* not really necessary since SysMin is the default */
Hi!
I would suggest making some changes to your code to see if they help:
For #1, see the details here: http://rtsc.eclipse.org/cdoc-tip/xdc/runtime/SysMin.html#buf.Size
Changing #1 to some number >0 will create a buffer for the System Printf's. You can try changing this number... as you have more System_Printf statements, the buffer will need to be larger to accommodate all of the data.
For #2, see the details here: http://rtsc.eclipse.org/cdoc-tip/xdc/runtime/SysMin.html#flush.At.Exit
Also for #2, note that it only works if the program Exits or Aborts. This performs a similar action as using System_flush() anytime during runtime in the source file ... http://rtsc.eclipse.org/cdoc-tip/xdc/runtime/System.html#flush
Lastly, remember that System_printf() does not support the full range of format strings as the standard C printf(). See details here: http://rtsc.eclipse.org/cdoc-tip/xdc/runtime/System.html#printf
Hi,Chris
I got it work, thanks for your advice. And the links are very helpful...
Best wishes..