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.

cannot recognize uint and bool

Other Parts Discussed in Thread: CONTROLSUITE

Hi,

I have a problem with uint and bool... Seems like code composer cannot recognize them...

"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\cpu.h", line 415: error #20: identifier "uint8_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\cpu.h", line 502: error #20: identifier "size_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 824: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 825: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 826: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 827: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 828: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 829: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 830: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 831: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 832: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 833: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 834: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 835: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 836: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 837: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 838: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 839: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 840: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 841: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 842: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 843: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 844: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 845: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 846: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 847: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 848: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 849: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 850: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 851: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 852: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 853: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 854: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 855: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 856: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 857: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 858: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 859: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 860: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 861: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 862: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 863: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 864: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 865: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 866: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 867: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 868: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 869: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 870: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 871: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 872: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 873: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 874: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 875: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 876: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 877: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 1127: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 1133: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 1139: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 1144: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 1155: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 1166: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 1177: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 1188: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 1194: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 1229: error #20: identifier "size_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 1331: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 1343: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 1367: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 1388: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 1395: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 1414: error #20: identifier "bool_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 1415: error #20: identifier "bool_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 1416: error #20: identifier "bool_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 1417: error #20: identifier "bool_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 1425: error #20: identifier "bool_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 1426: error #20: identifier "bool_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 1436: error #20: identifier "bool_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 1437: error #20: identifier "bool_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 1438: error #20: identifier "bool_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 1439: error #20: identifier "bool_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 1447: error #20: identifier "bool_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 1448: error #20: identifier "bool_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 1508: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 1514: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 1520: error #20: identifier "uint16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 1645: error #20: identifier "int16_t" is undefined
"D:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\include\pwm.h", line 1649: error #20: identifier "int16_t" is undefined

I included these:

#include "DSP28x_Project.h" // Device Headerfile and Examples Include File

#include "clk.h"

#include "flash.h"
#include "gpio.h"
#include "pie.h"
#include "pll.h"
#include "wdog.h"

Maybe something else missing?

Thanks so much!!

  • Yes, you are missing one or more header files.  You can include <stddef.h> to get size_t, and <stdint.h> to get uin16_t, etc, but there is no C standard header file that defines bool_t.  There is probably another header file in controlSUITE which defines these types, which you will need to include.  I don't know what that file would be.

  • Hi,

    these types are defined witihin F2802x_Device.h:

    // C99 defines boolean type to be _Bool, but this doesn't the format of
    // the other standard integer types. bool_t has been defined to fill this gap.
    typedef _Bool bool_t;

    // Work around for code that might accidently use uint8_t
    typedef unsigned char uint8_t;

    Try add full path for this file through "Include options" of Project's properties (refer please to this link http://processors.wiki.ti.com/index.php/Include_paths_and_options):

    C:\ti\controlSUITE\development_kits\C2000_LaunchPad\

    Regards,

    Igor

  • I added the whole folder, and it solves the problem. However, I have some undefined variables now.

    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "blinky.out" not built

    The code is copy pasted from an example code, so it shouldn't have any problem. Besides, code composer is not showing me where the undefined symbol is, so I don't really know where to start with...

    (I followed this link to solve an undefined symbol problem: http://www.forum.c2kcentral.com/topic/153-c2000-launchpad-timer0-problem/     maybe I should not do this?)

    Thanks!

    -Holly

  • You need to add the library which defines those symbols to the project

  • Hi, Holly,

    perhaps you need to add to your project the file F2802x_GlobalVariableDefs.c from

    C:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_headers\source\

    Regards,

    Igor

  • Oh I found what the undefined variables are. They are just above in the log window but I did not see them....

    symbol in file
    --------- ----------------
    _ADC_init ./main.obj
    _CLK_enableAdcClock ./main.obj
    _CLK_init ./main.obj
    _CLK_setOscSrc ./main.obj
    _CPU_clearIntFlags ./main.obj
    _CPU_disableGlobalInts ./main.obj
    _CPU_enableDebugInt ./main.obj
    _CPU_enableGlobalInts ./main.obj
    _CPU_enableInt ./main.obj
    _CPU_init ./main.obj
    _FLASH_init ./main.obj
    _GPIO_init ./main.obj
    _GPIO_setDirection ./main.obj
    _GPIO_setHigh ./main.obj
    _GPIO_setLow ./main.obj
    _GPIO_setMode ./main.obj
    _GPIO_toggle ./main.obj
    _PIE_disable ./main.obj
    _PIE_disableAllInts ./main.obj
    _PIE_enable ./main.obj
    _PIE_enableTimer0Int ./main.obj
    _PIE_init ./main.obj
    _PIE_registerPieIntHandler ./main.obj
    _PIE_setDebugIntVectorTable ./main.obj
    _PLL_init ./main.obj
    _PLL_setup ./main.obj
    _TIMER_enableInt ./main.obj
    _TIMER_init ./main.obj
    _TIMER_reload ./main.obj
    _TIMER_setEmulationMode ./main.obj
    _TIMER_setPeriod ./main.obj
    _TIMER_setPreScaler ./main.obj
    _TIMER_start ./main.obj
    _TIMER_stop ./main.obj
    _WDOG_disable ./main.obj
    _WDOG_init ./main.obj

    Do you happen to now where to find them?

    Thanks!

    -Holly

  • Hi Igor,

    I added this source file, but it did not work. And I got a lot of warnings:

    warning #10247-D: creating output section "AdcRegsFile" without a SECTIONS specification
    warning #10247-D: creating output section "AdcResultFile" without a SECTIONS specification
    warning #10247-D: creating output section "Comp1RegsFile" without a SECTIONS specification
    warning #10247-D: creating output section "Comp2RegsFile" without a SECTIONS specification
    .....

    .....

    undefined first referenced
    symbol in file
    --------- ----------------
    _ADC_init ./main.obj
    _CLK_enableAdcClock ./main.obj
    _CLK_init ./main.obj
    _CLK_setOscSrc ./main.obj
    .....

    .....

    Does it mean that I need to include more files?

    Thanks!

    -Holly

  • Hi, Holly.

    Now you need to add to your project the file F2802x_Headers_nonBIOS.cmd from:

    C:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_headers\cmd\.

    Generally I would recommend you go through these wiki links: 

    http://processors.wiki.ti.com/index.php/C28x_Compiler_-_Understanding_Linking

    http://processors.wiki.ti.com/index.php/C2000_Getting_Started_with_Code_Composer_Studio_v5

    Also try to import (menu: Project->Import existing CCS project) and compiling some example projects from C:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_examples\ for training.

    Regards,

    Igor

  • Hi Igor,

    I took a look at the example, and added driverlib from C:\ti\controlSUITE\development_kits\C2000_LaunchPad\f2802x_common\lib

    and it solved all my problems. The program is running!

    Thank you sooooooooo much!

    -Holly

  • Congrats, Holly!

    Happy New Year and good luck!

    Regards,

    Igor