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.

Timer_struct is "not a type name."

Other Parts Discussed in Thread: CC2650, SYSBIOS

Hey all!

I'm attempting to use a timer on the CC2650, and I'm getting an error I'm not sure what to do with when I try to create the timer structure. 

Here is my list of includes:

/* XDC module Headers */
#include <xdc/std.h>
#include <xdc/runtime/System.h>

/* Example/Board Header files */
#include "Board.h"

/* BIOS module Headers */
#include <ti/sysbios/BIOS.h>
#include <ti/drivers/Power.h>
#include <ti/drivers/power/PowerCC26XX.h>

/* Device specific timer module based on the sysTick timer in the ARM M3
   Refer to the CCS "help" guide under module ti.sysbio.hal.Timer */
#include <ti/sysbios/family/arm/m3/Timer.h>

...

And here is the code where I try to initialize the structure.

// Ti RTOS drivers require instantiation of both an object and hardware attribute
Timer_struct tmr0Struct;
Clock_handle tmr0Handle;

...

And here is the error.

"pathtofile...", line 66: error #760: function "ti_sysbios_family_arm_m3_Timer_struct" is not a type name
"pathtofile...", line 67: error #760: function "ti_sysbios_knl_Clock_handle" is not a type name

Any idea if I'm missing an include or doing something wrong?

Thanks!

  • Alright! I solved the issue.

    It turns out that what made it work was changing the case on the second word.

    // Ti RTOS drivers require instantiation of both an object and hardware attribute
    Timer_Struct tmr0Struct;
    Clock_Handle tmr0Handle;

    I was using lower-case, because I found this out of the "Help - Code Composer Studio" tab where they are lower case.

    Functions common to all target instances


    Timer_handle, Timer_Handle_downCast, Timer_Handle_label, Timer_Handle_name, Timer_Handle_upCast, Timer_Object_count, Timer_Object_first, Timer_Object_get, Timer_Object_heap, Timer_Object_next, Timer_struct

    Looks like I was looking in the wrong place - a few lines later the "defines" are listed.

  • Hi,

    Glad you figured it out. A good rule to remember is that all TI-RTOS types are upper camel case with the module name as a the prefix. So Timer_Struct or Task_HookSet.

    All the functions are lower camel case (e.g. Task_getPri). For the functions, there are a few like you listed also where the name of the item being acted on is used. For example Timer_Handle_name takes a handle and give the name of the object (if one was specified).

    Todd