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.

Regarding Error in C6678 GPIO

Other Parts Discussed in Thread: SYSBIOS

Hi 

I am working on C6678 GPIO but getting some errors in the include file ,i would like to know what are the include files we need to add,if any one did it please let me know

please can any one share your GPIO code with me

The following figure shows you the error which i got

  

Thanks you

suresh puli

  • Suresh,

    Can you post the project,

    Thanks,

    HR

  • The following code i have done which is taken from TIE2E only 

    #include <xdc/std.h>
    #include <xdc/runtime/System.h>
    #include <ti/sysbios/BIOS.h>

    #include "types.h"
    #include "gpio.h"
    #include "target.h"

    #define GPIO_CFG_BASE (0x02320000)
    #define GPIO_REG_BINTEN (0x8)
    #define GPIO_REG_DIR (0x10)
    #define GPIO_REG_OUT_DATA (0x14)
    #define GPIO_REG_SET_DATA (0x18)
    #define GPIO_REG_CLR_DATA (0x1C)
    #define GPIO_REG_IN_DATA (0x20)
    #define GPIO_REG_SET_RIS_TRIG (0x24)
    #define GPIO_REG_CLR_RIS_TRIG (0x28)
    #define GPIO_REG_SET_FAL_TRIG (0x2C)
    #define GPIO_REG_CLR_FAL_TRIG (0x30)

    unsigned int GPIO_INT_DONE = 0;


    Void hwiGPIOnFunc(UArg arg)
    {
    GPIO_INT_DONE = 1;
    }

    Void myIdleFunc()
    {
    //using software to toggle GPIO_0 output to trigger the interrupt
    *(unsigned int*)(GPIO_CFG_BASE+GPIO_REG_OUT_DATA) &= 0xFFFFFFFE; //GPIO_0=0
    *(unsigned int*)(GPIO_CFG_BASE+GPIO_REG_OUT_DATA) |= 0x1; //GPIO_0=1
    *(unsigned int*)(GPIO_CFG_BASE+GPIO_REG_OUT_DATA) &= 0xFFFFFFFE; //GPIO_0=0

    while (GPIO_INT_DONE != 1){}

    System_printf("GPIO_0 interrupt occurred!\n");
    System_exit(0);

    }

    Void main()
    {

    //set GPIO_0 pin as an input
    //*(unsigned int*)(GPIO_CFG_BASE+GPIO_REG_DIR) |= 0x1;
    //set GPIO_0 pin as an output
    *(unsigned int*)(GPIO_CFG_BASE+GPIO_REG_DIR) &= 0xFFFFFFFE;

    //set rising edge to trigger GPIO_0 interrupt
    *(unsigned int*)(GPIO_CFG_BASE+GPIO_REG_SET_RIS_TRIG) |= 0x1;

    //clear falling edge of GPIO_0
    *(unsigned int*)(GPIO_CFG_BASE+GPIO_REG_SET_FAL_TRIG) &= 0xFFFFFFFE;

    //enable GPIO interrupts
    *(unsigned int*)(GPIO_CFG_BASE+GPIO_REG_BINTEN) |= 0x1;

    //Start BIOS
    BIOS_start();
    }

    Thank you

  • Looks like the std.h file isn't in the include path.  I'd suggest checking the directory where it should be, which should be something like C:\ti\xdctools_3_24_05_48\packages\xdc\std.h - but it would depend on the version of xdctools installed.

    -Chad

  • Suresh,

    You can use your own GPIO driver but please check the GPIO CSL at - pdk_C6678_1_1_2_5\packages\ti\platform\evmc6678l\platform_lib\src\evmc66x_gpio.c

    Thanks,

    HR

  • Thanks for your reply 

    Can any one tell me why i am getting the below errors

    115: error #20: identifier "uint8_t" is undefined
    "C:/ti/pdk_C6678_1_1_2_6/packages/ti/platform/evmc6678l/platform_lib/include/evmc66x_gpio.h", line 117: error #20: identifier "uint32_t" is undefined
    "C:/ti/pdk_C6678_1_1_2_6/packages/ti/platform/evmc6678l/platform_lib/include/evmc66x_gpio.h", line 118: error #20: identifier "uint32_t" is undefined
    "C:/ti/pdk_C6678_1_1_2_6/packages/ti/platform/evmc6678l/platform_lib/include/evmc66x_gpio.h", line 119: error #20: identifier "uint32_t" is undefined
    "C:/ti/pdk_C6678_1_1_2_6/packages/ti/platform/evmc6678l/platform_lib/include/evmc66x_gpio.h", line 120: error #20: identifier "uint32_t" is undefined

    Thanks & Regards

    suresh puli

  • Can any one send me complete program for basic GPIO, i mean i am not able to understand how to initialize which pin is input and which pin is output and what are the files ti be included  so i would like to have complete code for that...

    Thanks & Regards

    suresh puli

  • Hi Suresh,

    Try to define a new project template File->new-> CCS Project and SYS/BIOS Typical project and than add you program to it,

    Can you post your full project?

    Thanks,

    HR

  • Hi Suresh,

    How did you resolve the issue of all the undefined identifiers? I am having the same problem.