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.

Exception xdc runtime error

Other Parts Discussed in Thread: TMS320C6678, SYSBIOS

Hello,

I would like to know if someone had this problem before and how to solve it.


I try to run an .out file on a EMV TMS320C6678, . But I have this messages in console :

[C66xx_2] Exception at 0x0
[C66xx_2] EFR=0x2 NRP=0x0
[C66xx_2] Internal exception: IERR=0x1
[C66xx_2] Instruction fetch exception
[C66xx_2] ti.sysbios.family.c64p.Exception: line 248: E_exceptionMin: pc = 0x00000000, sp = 0x0084f3d0.
[C66xx_2] To see more exception detail, use ROV or set 'ti.sysbios.family.c64p.Exception.enablePrint = true;'
[C66xx_2] xdc.runtime.Error.raise: terminating execution

The project worked without adding System Analyzer includes changes.


Thank you.

Marwa

  • Hi Marwa,
    I'll need more information like what product are you using (TI-RTOS, SYS/BIOS and what version)? Also can you narrow down the area in your code that's causing the exception?
    You said it worked without System Analyzer? What changes did you make for System Analyzer?

    Thanks,
    Moses
  • I'm using SYS/BIOS version 6.33.6.50 on a TMDSEVM6678l. For the system Analyzer, I selected it from the list of products and repositories (It is called System Analyzer (UIA Target) version 1.1.0.04) and un the advanced options in Entry/Exit Hook option I selected adress, functionExitHook, adress and functionEntryHook in order. Then, in my .cfg file I added this line:

    var UIABenchmark = xdc.useModule('ti.uia.events.UIABenchmark');

    Then in my main.c I added some includes:

    #include <ti/sysbios/knl/Task.h>
    #include <ti/uia/runtime/LogUC.h>
    #include <ti/uia/events/UIABenchmark.h>

    And I added two functions which are:

    void functionEntryHook( void (*addr)() ){
        Log_writeUC3(UIABenchmark_startInstanceWithAdrs, (IArg)"context=0x%x, fnAdrs=0x%x:",(IArg)Task_selfMacro(), (IArg)addr);
    }

    void functionExitHook( void (*addr)() ){
        Log_writeUC3(UIABenchmark_stopInstanceWithAdrs,  (IArg)"context=0x%x, fnAdrs=0x%x:",(IArg)Task_selfMacro(), (IArg)addr);
    }

    That's all. At this point I had the anormal messages like the program is not even reaching the first breakpoint (doesn't enter the main function).

  • Hi Marwa,

    What version of CCS are you using?  Were you able to determine anything from ROV (eg, if a Task stack were overrun)?  Could you also post your .cfg file?

    Thanks,

        Janet

  • I'm using CCS 5.2.1.00018 version. I looked at ROV but nothing appeared to me as abnormal.

    this is my .cfg file:

    6332.stereo-6678.cfg

  • Also I have this kind of messages in the console when I load and run the .out file:
    [C66xx_6] Internal exception: IERR=0x1
    [C66xx_6] Instruction fetch exception
    [C66xx_6] ti.sysbios.family.c64p.Exception: line 248: E_exceptionMin: pc = 0x00000000, sp = 0x0084f250.
    [C66xx_6] To see more exception detail, use ROV or set 'ti.sysbios.family.c64p.Exception.enablePrint = true;'
    [C66xx_6] xdc.runtime.Error.raise: terminating execution
  • Hi Marwa,

    Thanks for the .cfg file.  I took the contents of it and put them into my test program.  My tsk0_func() doesn't do anything but Log_info() and Task_sleep() in a for (;;) loop.  I did not see any exceptions when running the test.  I am using CCS v6.1, which is quite a bit newer than 5.2.  You may want to try a newer version of CCS (install it in a different directory so you can keep your old version), and see if the problem goes away.  Or, you could try to isolate the problem with a simple program, to see if it's the function profiling that is causing the problem, or is is something in your code.  You could also post on the CCS forum to see if there are any issues with CCS 5.2 and function profiling.

    Best regards,

        Janet

  • Hello,

    I have already posted my question and they told me to post it in RTOS forum.

    I'm sure that it is the function profiling which causes the problem because without it the project can be build and executed normally.

    I can't change the version because of other constraints. What's surprising is that the same function worked for another project.

    there is it's .cfg file : 1538.modelPreesm.cfg

  • I would like to thank you, I finally know what is the problem bacause I compared line by line the two .cfg files and find what was missing in the first one. Thank you for answering.
  • Hi Marwa,

    I'm glad to hear it's working for you now.  I'm curious to know what the problem was, though.  Was it the Task stack size?

    Best regards,

        Janet

  • Hello ,
    I just added this line at the beginning:
    var Memory = xdc.useModule('xdc.runtime.Memory');
    and this part :
    var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
    LoggingSetup.eventUploadMode = LoggingSetup.UploadMode_JTAGRUNMODE;
    LoggingSetup.loadLoggerSize = 1024;
    LoggingSetup.mainLoggerSize = 32768;
    LoggingSetup.sysbiosLoggerSize = 32768;
    that I found in the other .cfg file.. I don't really know what was the problem...
  • Ok.  I'm not sure how those changes would fix the problem, since I was able to get my test case working with your original .cfg code.  Maybe the .cfg and the .out got out of sync at some point?  Anyway, I'm glad it's working.

    Best regards,

        Janet

  • Hello,
    Can you help me to figure out another problem? I have launched the .out file and started the System Analyzer. The problem is that when I open the "context aware profile" with any core I don't have all the functions that supposed to be shown. I don't really know what is the origin of this problem because when I tried to see in which core each function is running on I can see that all the cores and all the functions are used.
    Thank you