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 error with UIA example on AM335x GPEVM board(rev.1.4A)

Other Parts Discussed in Thread: SYSBIOS, AM3359

Hi,

I saw an exception error during runtime initialization (before main function) with UIA example.
My environment looks like below:

  • CCSv5.3
  • UIA sample : Stairstep_JTAG_StopMode (comes from CCS) 
  • RTSC components:
With this, during RTSC configuration, I saw the following errors with default Stairstep_JTAG_StopMode sample.
=========
error: ti.sysbios.BIOS: "C:/ti/bios_6_35_01_29/packages/ti/sysbios/BIOS.xs", line 524: ti.sysbios.utils.Load hwiEnabled: Load.hwiEnabled must be set to 'false' when BIOS.libType == BIOS.LibType_Instrumented. Set 'BIOS.libType = BIOS.LibType_Custom' to build a custom library or update your configuration.
error: ti.sysbios.BIOS: "C:/ti/bios_6_35_01_29/packages/ti/sysbios/BIOS.xs", line 540: ti.sysbios.utils.Load swiEnabled: Load.swiEnabled must be set to 'false' when BIOS.libType == BIOS.LibType_Instrumented. Set 'BIOS.libType = BIOS.LibType_Custom' to build a custom library or update your configuration. 
==========
So, I newly added "BIOS.libType = BIOS.LibType_Custom;" description to .cfg file and now build itself was completed with no error.
But, as I mentioned first, I saw an exception error before main with the created executable.

I tried to make some RTSC modules off and finally I found that the following configurations seemed to cause the exception error.

=========
var timerParams = new Timer.Params();
timerParams.startMode = Timer.StartMode_AUTO;
timerParams.period = 100000; /* 100,000 uSecs = 100ms */
var timer0 = Timer.create(Timer.ANY, '&timerFunc', timerParams);
=========


This looks like setup for 100 msec periodic interrupt for application and when these lines are commented out, I did not saw exception and 
UIA looks like working correctly.
Could you please suggest me what is wrong.

Best Regards,
Kawada 
  • Fyi,

    Exception error looks like below:

    [CortxA8] Exception occurred in ThreadType_Main.
    Main handle: 0x0.
    Main stack base: 0x80034000.
    Main stack size: 0x1000.
    R0 = 0x6000019f R8 = 0x00000000
    R1 = 0x00000000 R9 = 0x8002f70c
    R2 = 0x00000064 R10 = 0x80034f9c
    R3 = 0xffffffff R11 = 0x0000000e
    R4 = 0x8002feb4 R12 = 0x48042000
    R5 = 0x6000019f SP(R13) = 0x80034f24
    R6 = 0x00000001 LR(R14) = 0x8002a724
    R7 = 0x00000000 PC(R15) = 0x8002a750
    PSR = 0x6000019f
    ti.sysbios.family.arm.exc.Exception: line 176: E_dataAbort: pc = 0x8002a750, lr = 0x8002a724.
    xdc.runtime.Error.raise: terminating execution

  • Further experiments:

    I tried to create a timer interrupt dynamically rather than statically, and then I also saw the exception error at Timer_create().

    Now, The following code is in main().
    ==================================================
    #include <ti/sysbios/hal/Timer.h>

    Timer_Params timerParams;

    Timer_Params_init(&timerParams);
    timerParams.startMode = Timer_StartMode_AUTO;
    timerParams.period = 100000;
    Timer_create(Timer_ANY, &timerFunc, &timerParams, NULL);
    ==================================================

    Please note I have already disabled MMU with the following configuration script:
    So, I believe this exception was not caused by register access for timer.
    ===================================================
    var MMU = xdc.useModule ('ti.sysbios.family.arm.a8.Mmu');
    MMU.enableMMU = false;
    ===================================================

    Also, I tried to debug Timer_Instance_init() pacakged in ti.sysbios.timers.dmtimer.Timer
    and actually the control came to this function. But PC looked like strange...
    C symbol seems to be miss-matching with actual executable in spite of using "debug" build in "Build-profile" of RTSC property -- I believe configuro picks
    appropriate BIOS binary for debug during configuration, and user could debug with BIOS code with C sources in the BIOS package, but actually, I couldn't... 



    Any suggestions/comments on this ?

    Best Regards,
    Kawada 

  • Hi Kawada,

    Naoki kawada said:
    With this, during RTSC configuration, I saw the following errors with default Stairstep_JTAG_StopMode sample.
    =========
    error: ti.sysbios.BIOS: "C:/ti/bios_6_35_01_29/packages/ti/sysbios/BIOS.xs", line 524: ti.sysbios.utils.Load hwiEnabled: Load.hwiEnabled must be set to 'false' when BIOS.libType == BIOS.LibType_Instrumented. Set 'BIOS.libType = BIOS.LibType_Custom' to build a custom library or update your configuration.
    error: ti.sysbios.BIOS: "C:/ti/bios_6_35_01_29/packages/ti/sysbios/BIOS.xs", line 540: ti.sysbios.utils.Load swiEnabled: Load.swiEnabled must be set to 'false' when BIOS.libType == BIOS.LibType_Instrumented. Set 'BIOS.libType = BIOS.LibType_Custom' to build a custom library or update your configuration. 
    ==========

    I imported the Stairstep_JTAG_StopMode example that shipped with UIA version uia_1_03_00_02 and built against the same components.  The example built successfully.

    I also noticed that the example had the following code in the stairstep_JTAGStopMode.cfg file:

    BIOS.libType = BIOS.LibType_Custom;

    I'm wondering if it's possible that you imported your example from an older version of UIA by any chance?  Maybe a version of the example was imported that didn't have that setting.

    I'm trying to find an AM3359 board in order to actually load and run the example, and I'll report back on this thread once I do that.

    Steve

  • Hi Steve,

    Thanks for your reply. As you say, BIOS.Libtype is being configured with Custom by default with UIA example (1_03_00_02).
    That was my mistake. Sorry for that.

    So I tried again with newly created example, and I still saw the same problem.
    Timer creation seems to have something issue ...

    Best Regards,
    Kawada 

  • I was also able to run the example successfully.  Which GEL file are you using?

    I've attached the GEL file that I have as well as the zipped up project I built.

    Steve

    3348.am3359_stairstep.zip

    8105.AM335x_15x15_EVM.gel

  • Hi Steve, 

    My code got working with your gel file. Thank you.

    We always refer AM335x gels from
    http://processors.wiki.ti.com/index.php/OMAP_and_Sitara_CCS_support

    and following gels are available now.

    File:AM335x 13x13 EVM v1 0.zip
    File:AM335x 15x15 EVM v1 2.zip
    File:AM335x 15x15 EVM v1 3.zip
    File:AM335x 15x15 EVM v1 5.zip

    And I could not get working correctly with these gels...

    Comparing with your gel, Timer configuration is being added on "onTargetConnect" (and other scripts looks very different also !)

    #define CM_PER (0x44e00000)
    #define CM_DPLL (0x44e00500)

    #define CM_PER_TIMER2_CLKCTRL (CM_PER + 0x80)
    #define CM_PER_TIMER3_CLKCTRL (CM_PER + 0x84)
    #define CM_PER_TIMER4_CLKCTRL (CM_PER + 0x88)
    #define CM_PER_TIMER5_CLKCTRL (CM_PER + 0xEC)
    #define CM_PER_TIMER6_CLKCTRL (CM_PER + 0xF0)
    #define CM_PER_TIMER7_CLKCTRL (CM_PER + 0x7C)

    #define CLKSEL_TIMER2_CLK (CM_DPLL + 0x04)
    #define CLKSEL_TIMER3_CLK (CM_DPLL + 0x08)
    #define CLKSEL_TIMER4_CLK (CM_DPLL + 0x0C)
    #define CLKSEL_TIMER5_CLK (CM_DPLL + 0x14)
    #define CLKSEL_TIMER6_CLK (CM_DPLL + 0x18)
    #define CLKSEL_TIMER7_CLK (CM_DPLL + 0x00)

    hotmenu EnableTimers_32KHz()
    {
    WR_MEM_32(CM_PER_TIMER2_CLKCTRL, 0x2);
    WR_MEM_32(CLKSEL_TIMER2_CLK, 0x2);

    WR_MEM_32(CM_PER_TIMER3_CLKCTRL, 0x2);
    WR_MEM_32(CLKSEL_TIMER3_CLK, 0x2);

    WR_MEM_32(CM_PER_TIMER4_CLKCTRL, 0x2);
    WR_MEM_32(CLKSEL_TIMER4_CLK, 0x2);

    WR_MEM_32(CM_PER_TIMER5_CLKCTRL, 0x2);
    WR_MEM_32(CLKSEL_TIMER5_CLK, 0x2);

    WR_MEM_32(CM_PER_TIMER6_CLKCTRL, 0x2);
    WR_MEM_32(CLKSEL_TIMER6_CLK, 0x2);

    WR_MEM_32(CM_PER_TIMER7_CLKCTRL, 0x2);
    WR_MEM_32(CLKSEL_TIMER7_CLK, 0x2);

    GEL_TextOut("Timers 2-7 enabled for 32KHz.\n");
    }

    I added the above hotmenu into my gel, and I could get working with it. 

    Could you please let me know from where I can get this gel ? Is this uploaded on website ?

    Best Regards,
    Kawada