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.

How to make System_printf work

I have Omap3evm with syslink package to do Linux(ARM) and DSP communication, and wish to display System_printf message to Linux side, what shall I do?

  • Wending,

    Are you trying to channel output from System_printf from the DSP on the ARM running Linux?  One way of doing this is to create a section on the DSP that will be placed in shared memory (i.e. DDR on OMAP3) and place all output from System_printf in this section.   The Linux host can then read and output the text in this shared memory.

    You will need to use the 'SysMin' system proxy on the DSP by adding the following code to your .cfg file:

    /* Create a section called '.sysminsection' that will reside in shared memory  */

     

    Program.sectMap['.sysminsection'] = new Program.SectionSpec();

    Program.sectMap['.sysminsection'].loadSegment = "DDR"; /* Replace 'DDR' with the correct name of the shared memory segment in the OMAP3 platform */

    /* Use the SysMin support proxy */

     

    var System = xdc.useModule('xdc.runtime.System');

    var SysMin = xdc.useModule('xdc.runtime.SysMin');

    SysMin.sectionName = '.sysminsection';

    System.SupportProxy = SysMin;

    Now, once your application is built, you will have to obtain the actual address of the SysMin buffer from your application's .map file.  You may find something like this in your .map file:

    .bss       0    80004000    00009214     UNINITIALIZED

                      80004000    00008000     myapp_x64P.o64P (.bss:xdc_runtime_SysMin_Module_State_0_outbuf__A)

    You can use the base address (in this case 0x80004000) on the Linux side to read the contents of the SysMin buffer.
    Alternatively, if you need the ARM to display output from the DSP in real time, you can do the following:
    1) Allocate a buffer for placing this text from a shared memory IPC/SysLink heap.
    2) Use System_sprintf to place your output in this buffer.
    3) Use IPC/SysLink notifications from the DSP to the ARM to let the ARM to process text in the shared buffer.
    Regards,
    Shreyas

  • Thank you very much, that's exactly what I'm looking for.