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 run sys/bios example on C674x core of C6A8168?

Other Parts Discussed in Thread: SYSBIOS, DM3730, OMAP-L138

Hi all,

I create a sys/bios helloworld project in CCSv5.

I am using c6a8168.I load the gel evm816x.gel and add a C6A816X.cmd to the project.

But when building project it comes errors "DDR0 memory range overlaps existing memory""L3OCMC0 memory range overlaps existing memory".

My .cmd file is downloaded from http://processors.wiki.ti.com/images/a/a7/C6A816x.zip.

Then I remove the C6A816x.cmd, building succes.But when I load program to core C674x, it prints nothing.

How to run a sys/bios example on c6a8168's dsp core?

francis

  • Peng,

    SYSBIOS has its *.cfg file.  This file along with the platform that you are building for generates a linker.cmd file for the project.
    In general, you should not be adding another *.cmd to your project.  Its okay to add another *.cmd if necessary.

    What are you using for print?  Is it System_printf()?  In some cases, you need System_flush to see the prints in the console window.

    Judah

  • Regarding the output, you can look at it in Tools->ROV also. Look in the SysMin output tab.

    Here is a discussion of SysMin vs SysStd (under the Configuring the System Module section): http://rtsc.eclipse.org/docs-tip/Overview_of_xdc.runtime/Example_1http://rtsc.eclipse.org/docs-tip/Overview_of_xdc.runtime/Example_1

    Todd

  • The hello example is like this:

    //////////////////

    #include<xdc/std.h>

    #include<xdc/runtime/System.h>

    #include<ti/sysbios/BIOS.h>

    void main(){

    System_printf("hello world\n");

    BIOS_exit(0);

    }

    ////////////////

    I build the sys/bios example,and load .out into  core C674x.
    I think I should see "hello world" printed in the concole window. But there is nothing.

    each time I click suspend button when program running, It seems the program pause at code" timer->tiocpCfg == obj->tiocpCfg | 0x2;" in Timer.c at line 186.

    Could you tell me what's wrong with it?

    thank you.

    francis

  • Can you look in ROV and see if there is SysMin. If there is, please read the "Configuring the System Module" section on the following web site: http://rtsc.eclipse.org/docs-tip/Overview_of_xdc.runtime/Example_1

    Todd

  • Hi Todd,

    I have tried your idea.But what troubles me is the program seems to stop at line 186 {function deviceConfig()} of Timer.c file.

    So it is  never able to  run into main() function , let alone run the system_printf() function.

    The line 186 of Timer.c file is " timer->tiocpCfg = obj->tiocpCfg | 0x2;// reset the timer".This file locates in /root/ti/bios_6_32_05_54/packages/ti/sysbios/timers/gptimer/ .

    francis

  • hi,

     what troubles me is the program seems to stop at line 186 {function deviceConfig()} of Timer.c file.

    So it is  never able to  run into main() function , let alone run the system_printf() function.

    The line 186 of Timer.c file is " timer->tiocpCfg = obj->tiocpCfg | 0x2;// reset the timer".This file locates in /root/ti/bios_6_32_05_54/packages/ti/sysbios/timers/gptimer/ .

    francis

  • Are you loading the C674x core from CCS? Is it at line 186 or in the while loop, a couple lines below, waiting for the reset to finish?

    Which timer is reseting (e.g. obj->id value)?

    Todd

  • hi Todd,

    I connect to C674x core as the page http://processors.wiki.ti.com/index.php/Connecting_to_DSP_on_C6A8168,_DM8168,_DM8148 says.

    It is at line 186 . Because I kick out while loop below and it also halt at line 186.

    I find     obj->id=0, obj->tiocpCfg=1

    .

    francis

  • Can you attach your .cfg file?

    When this happens, can you see anything the ROV->timers pages?

    Todd

  • 3252.hellobios.zip

    I can see " address:0x8000e8c0,  ||||  halTimerHandle: 0x8000e670,|||| id: 0,name: GPTimer4 ,||||

    startMode :startMode_AUTO, ||||   runMode:RunMode_CONTINUOUS,  ||||  period:1000,    ||||    periodType:periodType_MICROSECS,   ||||

    intNum :15,    ||||    tickFxn:ti_sysbios_knl_Clock_doTick_I,    ||||    arg:0x00000000,    ||||    extFreqLow:0x0,   ||||

    extFreqHigh:0x0,    ||||    hwiHandle: 0x8000e660" at ROV->All Modules->ti->sysbios->timers->dmtimer-Timer.

     

     

    francis

     

     

  • Now I can run a hello example of SYS/BIOS under simulation mode. I choose dsp core of C64x+ and platform of ti.platform sim64Pxx.

    But when I choose C674x core and platform  ti.platform.simDM8168   I get the same error like in emulation mode as I posted above.It seems timers can't be initialized.

    how can the SYS/BIOS example of  C6A8168 be simulated? Is it under developing or I make some mistakes?

    francis

  • Hi Francis,

    I'm going to try to replicate the example to see if I can reproduce the error.

    Can you send the complete .cfg file, please?

  • hi,

    The .cfg is in the .zip file.

    I didn't make any changes to it.Do you mean I need to modify the .cfg to run the hello example in simulation mode?

    thank you!

    francis

  • Hi Francis,

    I'm getting the same problem using the TI simulator (C67x CPU Cycle Accurate Simulator LE). Let me see what I can do to get the timer work with the simulator.

  • Hello everybody

    I am getting same problem in simulator mode . But when i selected the ti.platforms.sim64Pxx platform , and then when i run the program it running in lines of Idle.c and Hwi_stack.c.

    Here just i was testing, i need to run SYS/BIOS in C64x+ dsp of DM3730, i am getting the same problem ...what should i do ???

    Should i use system flush()  instead of system printf().. Please help asap, because everything is fine except this error for project. I am doing some serious analysis problems.

    With regards

    Nitin Mewada

  • Hi Francis,

    I just ran the hello world example on the C67x core of a TMDXEVM8148, just to make sure there nothing wrong with our dmtimer module. It worked fine on the actual hardware.

    This means that the timer (dmtimer) that C674x uses is not supported by the simulator (C674x CPU Cycle Accurate Simulator).

    Here are your options:

    Use the actual hardware instead of the simulator

    - or -

    Change the platform to ti.platforms.evm6748 with the C674x CPU Cycle Accurate Simulator. This platform uses a timer64 instead of a dmtimer.

  • Hi everybody

    I am using  CCS  Version: 5.1.1.00031, DM3730, XDS100v2 on windows 7 32 bit

    On my C64x+ side , i was trying to run SYS/BIOS  examples, there i was getting error like 

    Can't find a source file at "/db/vtree/library/trees/avala/avala-p52x/src/ti/sysbios/timers/gptimer/Timer.c" 
    Locate the file or edit the source lookup path to include its location.
     Note: In RTSC platform i am selecting evm 3530 as target because, they both are sister versions.

    I tried this hello example on simulator c64x+ using system_flush just after System_printf(), there i am getting the result, but while doing it on hardware i am getting some error as mentioned above 

    Can anybody guide me on this

    With Regards
    Nitin Mewada 
  • Hi

    So far i am able to run every SYS/BIOS example on simulator....For simulator i used System_flush();, problem solved...

    but what about running on about C64x+  side of DM3730. 

    I guess something is wrong when i am choosing  ti.platforms.evm3530 for my BeagleBoard-xm(DM3730). in case there is the problem with selecting board then should i fill specifications about the new platform according to the Reference guide from TI , i mean hardware reference guide

    Does anybody have clue on this now ???

    Nitin 

  • Hi Nitin,

    I'm somewhat confused on with what you are having problems with.

    Is this related to this discussion here: http://e2e.ti.com/support/embedded/bios/f/355/t/177874.aspx, if so, then we need to continue the discussion on that thread.

    Simulators only support a limited functionality (only specific timers for example). Which particular simulator are you using? What is working and what isn't?

  • Hi Francis,

     

    Sorry to budge in, but did you solve your problem?  I am seeing the exact same problem with the Hello World example loaded to the C674x (DSP) side of the TMS320C6A8168 (on the Spectrum Digital 816x EVM).  The message is never printed and the execution is stuck in the timer initialization it seems.  I have tried a different platform (OMAP-L138) and with this platform it works!  But with the TI816x or DM816x platform it wont work.

    Is it possible that the GEL file does not enable / power-up the timers?  I am using the default GEL filr from Spectrum Digital.

    Regards,

    Niki

  • hi Niki,

    I haven't solved the problem. I am looking forward to  someone's help...

     

    francis

  • Gentlemen,

    I'm seeing your problems on the CA8168 and DM3730 now, sorry for the confusion.

    The problem is that (for some reason) the C6000 cannot read the correct value from the (dm or gp)timer register (it always shows up with 0x00000000, when it shouldn't) and hence the timer config function spins forever in the while loop waiting for the timer to finish it's reset.

    I believe perhaps that the clocks to the timer peripheral or the peripheral's interface aren't enabled. This can be done using GEL files, which I don't have at the moment. I'll see what I can find and will keep you posted.

  • Hi,

    I have added the following to my GEL file and it fixed the problem:

    /* Timer PRCM Registers */
    #define CM_ALWON_TIMER1_CLKCTRL   (PRCM_BASE_ADDR + 0x1570)
    #define CM_ALWON_TIMER2_CLKCTRL   (PRCM_BASE_ADDR + 0x1574)
    #define CM_ALWON_TIMER3_CLKCTRL   (PRCM_BASE_ADDR + 0x1578)
    #define CM_ALWON_TIMER4_CLKCTRL   (PRCM_BASE_ADDR + 0x157C)
    #define CM_ALWON_TIMER5_CLKCTRL   (PRCM_BASE_ADDR + 0x1580)
    #define CM_ALWON_TIMER6_CLKCTRL   (PRCM_BASE_ADDR + 0x1584)
    #define CM_ALWON_TIMER7_CLKCTRL   (PRCM_BASE_ADDR + 0x1588)

    Setup_PRCM()
    {
        < code removed for clarity >

        // Enable Timers
        GEL_TextOut( "Enabling Timer 1...\n" );
        WR_MEM_32(CM_ALWON_TIMER1_CLKCTRL,    0x2); // Enable Timer Clock
        while((RD_MEM_32(CM_ALWON_TIMER1_CLKCTRL) & 0x2) !=0x2);
        GEL_TextOut( "Enabling Timer 2...\n" );
        WR_MEM_32(CM_ALWON_TIMER2_CLKCTRL,    0x2); // Enable Timer Clock
        while((RD_MEM_32(CM_ALWON_TIMER2_CLKCTRL) & 0x2) !=0x2);
        GEL_TextOut( "Enabling Timer 3...\n" );
        WR_MEM_32(CM_ALWON_TIMER3_CLKCTRL,    0x2); // Enable Timer Clock
        while((RD_MEM_32(CM_ALWON_TIMER3_CLKCTRL) & 0x2) !=0x2);
        GEL_TextOut( "Enabling Timer 4...\n" );
        WR_MEM_32(CM_ALWON_TIMER4_CLKCTRL,    0x2); // Enable Timer Clock
        while((RD_MEM_32(CM_ALWON_TIMER4_CLKCTRL) & 0x2) !=0x2);
        GEL_TextOut( "Enabling Timer 5...\n" );
        WR_MEM_32(CM_ALWON_TIMER5_CLKCTRL,    0x2); // Enable Timer Clock
        while((RD_MEM_32(CM_ALWON_TIMER5_CLKCTRL) & 0x2) !=0x2);
        GEL_TextOut( "Enabling Timer 6...\n" );
        WR_MEM_32(CM_ALWON_TIMER6_CLKCTRL,    0x2); // Enable Timer Clock
        while((RD_MEM_32(CM_ALWON_TIMER6_CLKCTRL) & 0x2) !=0x2);
        GEL_TextOut( "Enabling Timer 7...\n" );
        WR_MEM_32(CM_ALWON_TIMER7_CLKCTRL,    0x2); // Enable Timer Clock
        while((RD_MEM_32(CM_ALWON_TIMER7_CLKCTRL) & 0x2) !=0x2);

    ...

    It is probably not necessary to enable all timers but I am not sure wich timers are used by ysBios (I am very new to SysBios, and still learning).  Also,

     

     

  • Hi All,

    You can use the ROV to determine which timer SYS/BIOS uses and enable that particular timer. Go to the Timer module and look for the "name" field. On your devices it happens to be that both of your timers start by default with Timer 5. To select a different timer you can go to the SYS/BIOS Clock module and use a different TimerId.

    Niki & Francis,

    the gel script (for the Cortex - A8) Niki posted worked for me on the TMS320C6A8168. The script Niki posted will enables the clock interface to the timer. See the CM_ALWON_TIMER_5_CLKCTRL register in the TRM here. Once I enabled that bit, i was able to read the register contents from the Memory Browser.

    Nitin,

    for the DM3730, similar problem, however on your hardware you are using a GPTimer (GPTimer 5 as default). To get your timer running you need to enable EN_GPT5 in the CM_ICLKEN_PER register (from the Cortex - A8 side) See the TRM here. Once I enabled that bit, i was able to read the register contents from the Memory Browser as well.

  • Hi Tom,

    Ya, the solution was correct. I did the  same as you explained in your last post. It works fine. Thanx a lot for this.  

    With Regards

    Nitin Mewada

  • hi everyone,

    i am facing a similar problem here with DM816x EVM by spectrum digital. I am trying to run the basic "hello world" example in sys bios, when i load the program , it just hangs and on suspending it says "timer.c" is missing.. i have already tried to paste the script for gel file as mentioned below, doesnt work for me.. and also i tried using the sys/bios module to enable the timer 5 by changing the timer id. still the same problem occurs.. 

    am i missing something here. Can anybody attach the entire GEL script for Cortex A8 that worked  with DM816x?

    the error i get after suspending the debug operation is as follows

    Can't find a source file at "/db/vtree/library/trees/avala/avala-p52x/src/ti/sysbios/timers/dmtimer/Timer.c" 
    Locate the file or edit the source lookup path to include its location.


  • Hi Hitesh,

    If you trace back previous posts. You can see that for different cores, different  timers has to enabled. In your case timer is ""dmtimer". so you have enable this timer into your gel scripts, and i think you are copying part into your gel file which Niki posted. If, so then ,that code enables CM_ALWON timers, which will not  work for you. For enabling this one, you can refer your DM816x TRM, and locate this timer's address and enable this timer. 

    With Regards

    Nitin Mewada

  • Hi all

     I am trying to run  SYSBIOS helloworld project on  BeagleBoard-xM using XDS100v2 in CCSv5.3.I have built project with out errors, But during debugging i am getting following exception error.

     [Cortex_A8_0] Exception occurred in ThreadType_Main.
    Main handle: 0x0.
    Main stack base: 0x8000a830.
    Main stack size: 0x1000.
    R0 = 0x8000bc04  R8  = 0x00000002
    R1 = 0x00000000  R9  = 0x00000001
    R2 = 0x600001df  R10 = 0x8000b7cc
    R3 = 0x00000000  R11 = 0x0000000e
    R4 = 0x49032000  R12 = 0x00000002
    R5 = 0x8000be1c  SP(R13) = 0x8000b774
    R6 = 0x8000bba4  LR(R14) = 0x80006948
    R7 = 0x00000000  PC(R15) = 0x80004e78
    PSR = 0x200001df
    ti.sysbios.family.arm.exc.Exception: line 176: E_dataAbort: pc = 0x80004e78, lr = 0x80006948.
    xdc.runtime.Error.raise: terminating execution

    After this exception error Coretx-A8_0 is in suspend-Sw breakpoint   mode and  execution is comming out with loader_exit(exit.c) function .

    I have traced using pc address value (pc = 0x80004e78) , It is going directly to timer.c (188 line). and i am observing this log in red color

    Can't find a source file at "/db/vtree/library/trees/avala/avala-r20x/src/ti/sysbios/timers/gptimer/Timer.c"
    Locate the file or edit the source lookup path to include its location.

    Please can anyone help me how to resolve this error?