• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Microcontrollers » Stellaris® ARM® Microcontrollers » Stellaris® ARM® LM3S Microcontrollers Forum » error: tDisplay is undefined
Share
Stellaris® ARM® Microcontrollers
  • Forum
Options
  • Subscribe via RSS
Helpful Stellaris® LM4F Series Links
  • LM4F Series
  • Stellaris PinMux Utility
  • Stellaris® LM4F120 LaunchPad
  • LM4F MCU Applications
  • LM4F MCU Video
  • ARM Cortex-M4F Whitepaper
  • Stellaris MCU Brochure
  • LM4F232 Eval Kit
  • error: tDisplay is undefined

    error: tDisplay is undefined

    This question is not answered
    Bharathram Balasubramanian
    Posted by Bharathram Balasubramanian
    on Jan 05 2012 05:20 AM
    Prodigy50 points

    Hi,

      I am writing a program to display the value of number of pulses, given to a GPIO pin ,on the LCD display of Stellaris EVM LM3S3748. When I try to build the program, it throws the error 'identifier tDisplay is undefined'. I am confident that all the include files required are present in the project because if I replace the program with the 'uart_echo' example, it works. Here's my program, please help me debug that error and please let me know if my program would work for the purpose.

    #include "inc/hw_ints.h"
    #include "inc/hw_memmap.h"
    #include "inc/hw_types.h"
    #include "driverlib/sysctl.h"
    #include "driverlib/rom.h"
    #include "driverlib/gpio.h"
    #include "drivers/formike128x128x16.h"
    #include "grlib/grlib.h"
    #include "inc/hw_types.h"
    #include "driverlib/debug.h"
    #include "driverlib/interrupt.h"
    #include "inc/lm3s3748.h"

    tContext g_sContext;


    #ifdef DEBUG
    void
    __error__(char *pcFilename, unsigned long ulLine)
    {
    }
    #endif


    int Count;
    void
    EdgeIntHandler(void)
    {
    //
    // Clear the GPIO interrupt.
    //
    GPIOPinIntClear(GPIO_PORTC_BASE, GPIO_PIN_4);
    //
    // Increment the count of edges.
    //
    Count++;
    }
    int main(void)
    {

        char pcBuffer[32];
        SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN | SYSCTL_XTAL_8MHZ);
          //
        // Initialize the display driver.
        //
        Formike128x128x16Init();

        //
        // Turn on the backlight.
        //
        Formike128x128x16BacklightOn();

        //
        // Initialize the graphics context.
        //
        GrContextInit(&g_sContext, &g_sFormike128x128x16);
            //


    SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF);
    GPIOPinTypeGPIOInput(GPIO_PORTF_BASE,GPIO_PIN_4);
    GPIOIntTypeSet(GPIO_PORTF_BASE, GPIO_PIN_4, GPIO_RISING_EDGE);
    GPIOPinIntEnable(GPIO_PORTF_BASE, GPIO_PIN_4);
    usprintf(pcBuffer, "%d", Count);
    GrStringDraw(&g_sContext,"pcBuffer",  -1, 12, 24, 0);
    while(1)
    {
    }

    }

    Please help me out at the earliest. Thank You very much.


    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • Lela Garofolo
      Posted by Lela Garofolo
      on Jan 08 2012 01:22 AM
      Genius17190 points
      Ether your path is incorrect for #include "drivers/formike128x128xx16.h" or you need to rebuild glib. What IDE are you using? Are you using a stellarisware example or creating your own project? Lela
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Bharathram Balasubramanian
      Posted by Bharathram Balasubramanian
      on Jan 08 2012 09:04 AM
      Prodigy50 points

      I am coding on Code Composer Studio v4. And I am just replacing the above .c program instead of the uart_echo.c program on the uart_echo example project.. Also, when I just try implementing the uart_echo.c code in the same project, it works(like it is supposed to). Even that program uses the display and that worked, but my program throws this error.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Bharathram Balasubramanian
      Posted by Bharathram Balasubramanian
      on Jan 08 2012 10:20 AM
      Prodigy50 points

      I rearranged the header files in the program and wrote #include "grlib/grlib.h" above #include "drivers/formike128x128x16.h" . I have included #include "utils/ustdlib.h". Now the program is getting built without any error. But the count does not increase if I give a 5V to the GPIO pin. Please help me out in finding out the mistake. My revamped program is as follows:

      #include "inc/hw_ints.h"
      #include "inc/hw_memmap.h"
      #include "inc/hw_types.h"
      #include "driverlib/debug.h"
      #include "driverlib/gpio.h"
      #include "driverlib/interrupt.h"
      #include "driverlib/rom.h"
      #include "driverlib/sysctl.h"

      #include "driverlib/uart.h"
      #include "grlib/grlib.h"
      #include "drivers/formike128x128x16.h"
      #include "utils/ustdlib.h"
      //tContext g_sContext;


      #ifdef DEBUG
      void
      __error__(char *pcFilename, unsigned long ulLine)
      {
      }
      #endif


      int Count;
      void
      EdgeIntHandler(void)
      {
      //
      // Clear the GPIO interrupt.
      //
      GPIOPinIntClear(GPIO_PORTE_BASE, GPIO_PIN_0);
      //
      // Increment the count of edges.
      //
      Count++;
      }
      int main(void)
      {
      tContext sContext;
      tRectangle sRect;
      char pcBuffer[32];
      SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN | SYSCTL_XTAL_8MHZ);
      //
      // Initialize the display driver.
      //
      Formike128x128x16Init();

      //
      // Turn on the backlight.
      //
      Formike128x128x16BacklightOn();

      //
      // Initialize the graphics context.
      //
      GrContextInit(&sContext, &g_sFormike128x128x16);
      //


      SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOE);
      GPIOPinTypeGPIOInput(GPIO_PORTE_BASE,GPIO_PIN_0);
      GPIOIntTypeSet(GPIO_PORTE_BASE, GPIO_PIN_0, GPIO_RISING_EDGE);
      GPIOPinIntEnable(GPIO_PORTE_BASE, GPIO_PIN_0);

      sRect.sXMin = 0;
      sRect.sYMin = 0;
      sRect.sXMax = GrContextDpyWidthGet(&sContext) - 1;
      sRect.sYMax = 14;
      GrContextForegroundSet(&sContext, ClrDarkBlue);
      GrRectFill(&sContext, &sRect);

      GrContextForegroundSet(&sContext, ClrWhite);
      GrRectDraw(&sContext, &sRect);
      GrContextFontSet(&sContext, &g_sFontFixed6x8);
      usprintf(pcBuffer, "%d", Count);
      GrStringDraw(&sContext,&pcBuffer, -1, 12, 24, 0);
      while(1)
      {
      }

      }
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Michael Mensinger
      Posted by Michael Mensinger
      on Apr 27 2012 13:35 PM
      Prodigy10 points

      okay so a few months later, but is your interrupt set up in the startup_css.c file? when you debug are you stuck in the Default ISR?

      and it looks like you don't update the screen ever.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    TI E2E™ Community
    • Support Forums
    • Blogs
    • Videos
    • Groups
    • Site Support & Feedback
    • Settings
    TI E2E™ Community Groups
    • TI University Program
    • Make the Switch
    • Microcontroller Projects
    • Motor Drive & Control
    Other Communities
    • Deyisupport
    • Designsomething.org
    • beagleboard.org
    • TI on Element 14
    • TI on TechXchangeSM
    Other Technical & Support Resources
    • WEBENCH® Design Center
    • Product Information Centers
    • Technical Documents
    • TI Design Network
    • TI Technical Articles
    • TI Training

    All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

    Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

    Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
    TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

    TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
    embedded processors, along with software, tools and the industry’s largest sales/support staff.

    © Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
    Trademarks | Privacy Policy | Terms of Use