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.

CCSv4.2 - RTSC profile "whole_program" outputs error

Other Parts Discussed in Thread: SYSBIOS

Hi

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

CCSv4.2.0.10017

XDCtools version: 3.20.04.68
Code Gen Tools: 6.1.18
IPC: 1.21.02.23
BIOS: 6.30.03.46
XDAIS: 6.25.01.08

The "release" profile works great.

"debug" also works.

"whole_program" gives me the error below 



>> Compilation failure

>> Invalid intermediate file: C:\Program Files\Texas Instruments\ipc_1_21_02_23\packages\ti\sdo\ipc\transports\lib\whole_program_debug\ti.sdo.ipc.transports.a64P, abortingerror: failed to recompile
>> Compilation failure
gmake.exe: *** [M2_EVM6472.p64P] Error 1
js: "C:/Program Files/Texas Instruments/xdctools_3_20_04_68/packages/xdc/tools/Cmdr.xs", line 51: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.
gmake: *** [configPkg/linker.cmd] Error 1
gmake: Target `all' not remade because of errors.

Build complete for project M2_EVM6472_configuration

Cheers

  • Hi Eddie,

    Could you try updating your Code Gen Tools?  Your version of BIOS/IPC requires 7.0.2 or later.

    Regards,

    Shreyas

  • Hi

    Before I switch to CGT 7, could you tell me if there will be any more CGT 6 releases that could support the above BIOS/IPC packages? Or are we being forced to go to CGT 7.0 if we wish to get the latest compiler fixes.

    The documentation says the COEFF format will be expired in 7.0 and changed to ELF. This is pretty significant. Does 7.0.4 output ELF ?

    C:\Program Files\Texas Instruments\ccsv4\tools\compiler\C6000 Code Generation Tools 7.0.4\doc\sprab90.pdf

    There is also some 40 bit int changes we'd have to lookout for.

    Cheers

     

  • 7.0.x supports COFF.   7.0.x should be able to link existing COFF libraries built with 6.1.x.

    While TI has added ELF support, COFF will be supported for the foreseeable future. 

    More info here:

    http://processors.wiki.ti.com/index.php/C6000_EABI_Migration

  • Hi

    Changing to CGT 7.0.4 got rid of the error. Unfortunately, my code only works with RTSC profile "debug" or "release". For some unknown reason, "whole_program" does not work (I don't get any EDMA interrupts from SRIO transfers).

    But this also was a problem with CGT 6.x.

    Whats happening with the CGT 6.x releases? Are customers being asked to switch to 7.x since 6.x bug updates are being phased out?

    Cheers

  • Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

    Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

    Well now we are between a rock and a hard place. We get stack overflow in some IPC module with “debug” profile and SRIO doesn’t work with “whole_program”.

    The good news (in a sad way) is that our old configuration does the same thing

    XDCtools version: 3.16.3.36
    Code Gen Tools: 6.1.18
    IPC: 1.20.00.23
    BIOS: 6.21.03.21
    XDAIS: 6.25.01.08

    I wonder if SRIO doesn't work in "whole_program" because the SRIO library wasn't built with "whole_program"?

    Cheers

  • Do you know which stack is overflowing?   Can you change the stack size for that task?   Are you using the ROV tools to check the stack usage?

    Can you give more info on "SRIO doesn't work"?  Does it build but not run correctly?  Or are you having build problems?  

  • Hi

    Karl Wechsler said:
    Do you know which stack is overflowing? 

    When running under debug, the console outputs:

    ti.sysbios.knl.Task: line 330: E_stackOverflow: Task 0x86ec28 stack overflow.

    xdc.runtime.Error.raise: terminating execution

    I'm no expert at CCSv4, so I'm pasting below what I see in the ROV window. From what I saw in ROV, I suspect its the Core0 ti.sysbios.knl.Task.IdleTask but I can't tell since the "Basic" tab has a Java error (see below). The ROV module tab says my max was about 668 which is far from the available 4096.

    I went to ROV -> ti -> sysbios -> knl -> Task for each core

    Core 0 -(This is the one who's state in the debug window is "abort() at exit.c: 67 0x8526c0)

    Tab "Basic" says:

    Received exception from ROB server: java.lang.Exception: Target memory read failed at address 0xfffffffb, length 8. The read is at an INVALID address according to the applications section map. The application is likely either unititialized of corrupt.

    From "module" tab (it says the peak is 292):

    ,0x00868468,Locked,0x8001,false,5,0x00868460,292,4096,0x87ca60

    Core 1 to Core 5

    From Base tab

    ,0x008683a0,ti.sysbios.knl.Task.IdleTask,0,Running,ti_sysbios_knl_Idle_loop__E,0x00000000,0x00000000,2048,0x87da60

    ,0x0086e118,,15,Blocked,WorkerTask_task,0x00000000,0x00000000,8192,0x86e168

    From the module tab (the max peak was 668)

    ,0x00868468,Unlocked,0x1,false,2,0x008683a0,668,4096,0x87ca60

    Karl Wechsler said:
    Can you give more info on "SRIO doesn't work"?

    I don't get any EDMA interrupts indicating a streaming transfer has completed. Any transfers under 4096 bytes work as they use the IDMA and not the EDMA. I have yet to check the EDMA params registers to figure out if the transfer actually happened. It could be that the RTOS under "whole_program" is not linking the EDMA interrupt somehow.

    Cheers

  • Hi

    I think I have found the problem about why the SRIO didn't work under RTSC profile "whole_program". I tried running a "whole_program" on the SRIO test jig I had and I got a "redefined" error (same as the post below)

    http://e2e.ti.com/support/embedded/f/355/p/52404/187761.aspx#187761

    So I added this line to my .cfg

    var ti_sysbios_family_c64p_Hwi = xdc.useModule('ti.sysbios.family.c64p.Hwi');

    and the redefined error went away. The SRIO also worked under "whole_program" in my test jig.

    So next I added it to our production code and guess what, the SRIO started working!

    So I wonder why this line of code isn't needed when I do "debug" or "program", but needed when I use "whole_program".

    Seems like the compiler should be outputting an error when on doesn't have 'ti.sysbios.family.c64p.Hwi' in the .cfg file. How else is it supposed to know about connecting up hardware interrupts?

    Unresolved is the stack overflow issue under RTSC profile "debug".......

    Cheers

     

     

     

  • Eddie said:

    So I wonder why this line of code isn't needed when I do "debug" or "program", but needed when I use "whole_program".

    The XDC/BIOS configuration step generates big .c file (big.c).  This C file contains a bunch or function entry points (__E) that in turn call the core function implementation (__F).  For whole_program flow, big.c is compiled and optimized and linked, along with the rest of  BIOS and IPC, into a partial linked .obj file.  This optimization optimizes out any functions that are not explicitly used by the app configuration.   Your partial link file probably has some of these entry points for the Hwi module but not all.  Then, when the final link occurs (which links this partial .obj with the rest of your app), then linker finds duplicates for some of these symbols and generates an error.  When you add 'useModule' to your .cfg file, the config tool adds special #pragma to big.c telling it to retain all the entry points for the given module.  You can check the generated .c file before and after adding the useModule to see what I mean.  The generated file should be in your package subdirectory.

    For the debug and release profiles, big.c and the BIOS content are not optimized into this partial link file.  So, the linker doesn't get subset of the symbols from the partial link file.

    Eddie said:

    Unresolved is the stack overflow issue under RTSC profile "debug"......

    The debug and release profiles require extra stack space since they don't get same level of optimization.  The whole_program build will inline small functions and function call depth will be smaller.   I suggest that you change the idle stack size in your .cfg file, rebuild, run, and then review the idle stack usage using the ROV tool.  You might find that you are using more stack space than your original stack specified.  

    Something like:

    Task = xdc.useModule('ti.sysbios.knl.Task');
    Task.idleStackSize = 4096;

     

     

     

  • Thanks Karl