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.

not work Task_sleep() in Code Composer Studio 5

Other Parts Discussed in Thread: TMS320C6457, SYSBIOS

At program compilation in Code Composer Studio 5 don't work Task_sleep (). I.e. the program in them stops forever.
At compilation in Code Composer Studio 4 all work.
What's the problem?

Too most with examples mutex.c.
In Code Composer Studio 4 work Task_sleep, and in Code Composer Studio 5 don't work.

There is a sensation that doesn't work CLOCK.

  • Hi Vladimir,

    What hardware platform are you using?  What versions of BIOS, XDCTools and compilers are you using in CCSv4 and CCSv5?

    Also, can you please clarify your problem a bit?

    Is the problem you are seeing that your program does not compile when building the project in CCSv5, due to Task_sleep related errors?  But if you try to compile (build) your project in CCSv4, it does compile, without any errors?

    If there are compiler errors, can you please copy and paste the entire build output you are seeing?

    Or, is this a run time issue, in which you are seeing a Task that's put to sleep using Task_sleep() never wake up?

  • Steven Connell said:

    What hardware platform are you using?  What versions of BIOS, XDCTools and compilers are you using in CCSv4 and CCSv5?

    TMS320c6457

     

    Steven Connell said:

    Is the problem you are seeing that your program does not compile when building the project in CCSv5, due to Task_sleep related errors?  But if you try to compile (build) your project in CCSv4, it does compile, without any errors?

    No. The project successfully is compiled and linked. Errors at compilation aren't present.

     

    Steven Connell said:

    Or, is this a run time issue, in which you are seeing a Task that's put to sleep using Task_sleep() never wake up?

    Yes. Task_sleep never wakes up.
    I have specially checked up. Function Clock_getTicks () always returns 0 if the project is compiled in CCS5.
    If the project is compiled in CCS4 all works. Clock_getTicks () returns time correctly.

     

  • Vladimir,

    Ok.  It sounds to me like your application is being built with different tool versions between CCSv4 and CCSv5.

    I'd like to see what version of BIOS, XDCtools and code generation tools you are using in CCSv4.  In CCSv4, can you open the build properties of your project and tell me what these versions are?  For example, see the below screen shots for my CCSv4 project:

     

  • Code composer studio 4.2.1.00004

     

     

     

      Code composer studio  Version: N201105110900 

     

     

     

     

     

     

     

     

     

     

  • Can you change your CCSv5 project to use the same versions of SYS/BIOS, XDCtools and Code Generation Tools as you are using in the CCSv4 (working) project?

    • code generation tools 7.0.3
    • XDCtools 3.20.03.63
    • SYS/BIOS 6.30.02.42

    You can add these tools from the "add..." button of the properties of your "123" project.  For example, here's what I did to add another version of SYS/BIOS to mine:

     

    Notice that you will need to choose the "packages" sub-directory for each product:

     

  • I'm not sure if this is exactly the problem, but I've found that you need to manually turn on the Clock after you connect your device

    In CCSv5, it's in the CCS Debug Perspective -> Run -> Clock -> Enable

    For me, that fixes clock() returning 0, so that might help your problem with another clock function

  • I have connected libraries and the compiler from CCS4. All too most. Doesn't work. This simply fantasy. Clock_getTicks () always returns 0. Thus Run-> Clock-> Enable works. A watch ticks, but Clock_getTicks () always 0. I understand Nothing.
    How it is arranged inside Clock_getTicks ()?
    Probably the timer doesn't work, which time in one millisecond works.
    How to check up its work?

  •  

    Took one of examples from CCS5.
    example clock

    Here a code

    #include <xdc/std.h>
    #include <xdc/runtime/System.h>

    #include <ti/sysbios/BIOS.h>
    #include <ti/sysbios/knl/Clock.h>

    Void clk0Fxn(UArg arg0);
    Void clk1Fxn(UArg arg0);

    /*
    * ======== main ========
    */
    Void main()
    {
    Clock_Handle clk2;
    Clock_Params clkParams;

    /* Create a periodic Clock Instance with period = 5 system time units */
    Clock_Params_init(&clkParams);
    clkParams.period = 5;
    clkParams.startFlag = TRUE;
    Clock_create(clk0Fxn, 5, &clkParams, NULL);

    /* Create an one-shot Clock Instance with timeout = 11 system time units */
    clkParams.period = 0;
    clkParams.startFlag = FALSE;
    clk2 = Clock_create(clk1Fxn, 11, &clkParams, NULL);

    Clock_start(clk2);

    BIOS_start();
    }

    /*
    * ======== clk0Fxn =======
    */
    Void clk0Fxn(UArg arg0)
    {
    UInt32 time;

    time = Clock_getTicks();
    System_printf("System time in clk0Fxn = %lu\n", (ULong)time);
    }

    /*
    * ======== clk1Fxn =======
    */
    Void clk1Fxn(UArg arg0)
    {
    UInt32 time;

    time = Clock_getTicks();
    System_printf("System time in clk1Fxn = %lu\n", (ULong)time);
    System_printf("Calling BIOS_exit() from clk1Fxn\n");
    BIOS_exit(0);
    }


    It too doesn't work.
    clk0Fxn, clk1Fxn are never carried out.

     

    What that initialization of timers probably doesn't occur.

  • Vladimir,

    What gel file are you using for CCSv5?  Is it a different gel file than you are using in CCSv4?  Can you please attach the gel files you are using to this post?

    Thanks,

    Steve

  • Vladimir,

    Another thing.  Can you try the following?

    1. Open the CCSv5 program.
    2. load and run the executable program that you built using CCSv4 (the program in which the Clock_getTicks () returns time correctly.)
    3. Does it work in that case?

    Thanks

    Steve

  • Are used identical gel files

    .

     

     They identical d CCS4 and CCS5.

     

    Or I that not so do that?

  • Can you try the following?

    1. Open the CCSv5 program.
    2. load and run the executable program that you built using CCSv4 (the program in which the Clock_getTicks () returns time correctly.)
    3. Does it work in that case?

    Thanks

    Steve

  • I have achieved program work in a debugger under CCS5.
    Was wrong gel a file.
    But at start on a real board, the project compiled under CCS4 works. And the project compiled under CCS5 doesn't work, Task_sleep() never wake up.
    Probably there is what that no initialization.

  • Install

    bios 6.32.03.43

    ipc 1.23.03.31

    xdctools 3.22.02.27

    all work.

    The question is solved

  • Hi Vladimir,

        I met the same problem that Task_sleep() didn't wake up. I saw you posted that you installed BIOS, IPC and xdctools versions and the problem was solved. I would like to confirm that all you did is just install those packages? Any configuration or modification shall be made?

        Thanks in advanced.

    Regards,

            Eric

  • All becomes in some steps.
    1. To close code composer studio 5
    2. To remove in it the previous packages.
    3. To install new packages. I have specified above.
    4. To start code composer studio 5. It will pick up new packages.
    5. To make yous to the project "Clean Project"
    6. Build the project.

  • Hi Vladimir,   

        Strange!

        I'm using DM8148 platform to execute the test code sample task mutex. I update the packages and modfied the GEL file to enable timer, then rebuild the code. The Task_sleep() still not returns, but Clock_getTicks() returns non-zero value and is changing by time.

        The items under "Run->Clock" are all disabled in my CCSv5.

     

        Is that possible to share your GEL file to advise what is done for initialization? Thanks.

     

    Regards,

        Eric

  • What value Task_sleep at you? Task_sleep (10), Task_sleep (100), Task_sleep (1000)?? Under a simulator all very slowly. Can time is simple still hasn't expired!? At me core i7-2600. On it Task_sleep (10) 30 seconds are carried out approximately.

  • I use Task_sleep(10). Wait over 3 minutes, still not return.

  • You should check up debugger options still.
    Your device should be there correctly defined,
    That timers were correctly initialized.

    Yes. And still...

    You use in the project a configuration file *.cfg??
    You should remove it from the project and to create anew with already new packages.

  • Hi Vladimir,

         I checked the registers. Although timers were enabled, spinlock and mail box were not. I modified my GEL file to enable spinlock, mail box and timer1~7 then Task_sleep() works.

        Thank you in advanced.

        Eric