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.

EK-TM4C123GXL: How to report problems with GrLib for TM4 microcontrollers?

Part Number: EK-TM4C123GXL

Hello,

I tried to run GrLib examples on EK-TM4C123GXL launchpad with Kentec LCD booster pack, but I can't get to work any of the demos using buttons. The display works fine, scribble demo also works as expected, so hardware is not at fault. After a bit of debugging I managed to narrow down the issue to a chicken-and-an-egg problem in WidgetMessageSendPostOrder() function in file widget.c. The library was installed from file SW-TM4C-2.1.3.156.

Whom and how should I report the bug?

Thank you,

p.

  • Hello Prianha

    Please attach your project on the forum along with a snapshot of the screen which shows the issue.
  • Amit Ashara said:
    Hello Prianha

    Please attach your project on the forum along with a snapshot of the screen which shows the issue.

    Amit,

    The "project" are examples compiled without any changes from examples/boards/ek-tm4c123gxl-boostxl-kentec-s1/ in driverlib directory. This code has been provided by TI.

    p.

  • Hello Prianha

    I checked the 4 examples code from TivaWare 2.1.3.156 and they work fine. Have you made sure that (a) R9 and R10 resistors are depopulated on your EK-TM4C123GXL?

    Which example is not working and and can you paste an image of what the display panel is showing?
  • I removed the resistors, the display works fine. Touch also works, because scribble demo works as expected and debug messages I added to driver and library code show correct information. What does not work are buttons created by demos "fontview", "grlib_demo", "lang_demo".

    I traced touch events propagated to WidgetMessageSendPostOrder() in widget.c (what should not happen because buttons do not have PB_STYLE_RELEASE_NOTIFY property set). The action for the button is never called, because the function exits on the following condition (code quoted from WidgetMessageSendPostOrder), just before call to the callback:

    if(!g_psPointerWidget)
    {
         return(0);
    }

    p.

  • Small correction: I reviewed the logs from serial console, and the branch with the condition and where the the action is supposed to be called is never executed. Here is a snippet of the code from widget.c with debug printfs:

    uint32_t
    WidgetMessageSendPostOrder(tWidget *psWidget, uint32_t ui32Message,
                               uint32_t ui32Param1, uint32_t ui32Param2,
                               bool bStopOnSuccess)
    {
        uint32_t ui32Ret;
        tWidget *psTemp;
    UARTprintf("WidgetMessageSendPostOrder()\n");
        //
        // Check the arguments.
        //
        ASSERT(psWidget);
    
        //
        // See if this is a pointer move or up message.
        //
        if((ui32Message == WIDGET_MSG_PTR_MOVE) ||
           (ui32Message == WIDGET_MSG_PTR_UP))
        {
          UARTprintf("WidgetMessageSendPostOrder(): WIDGET_MSG_PTR_MOVE || WIDGET_MSG_PTR_UP\n");
            //
            // If there is not a widget that has captured pointer messages, then
            // simply drop this message.
            //
            if(!g_psPointerWidget)
            {
                return(0);
            }
            UARTprintf("WidgetMessageSendPostOrder(): Still going...\n");
    
            /* ... */
            /* Not relevant, removed for clarity */
        }
    
      UARTprintf("WidgetMessageSendPostOrder(): loop\n");
        //
        // Loop through the tree under the widget until every widget is searched.
        //
        for(psTemp = psWidget; psTemp != psWidget->psParent; )
        {
    /* ... */
    /* rest of the code */

    And here is fragment of the log from serial console. I'm pressing "down" button in "fontview" demo. Touch coordinates are within the active area of the button:

    my_WidgetPointerMessage: x: 294, y: 31, r: 1
    WidgetMessageSendPostOrder()
    WidgetMessageSendPostOrder(): loop
    WidgetMessageSendPostOrder()
    WidgetMessageSendPostOrder(): loop
    WidgetMessageSendPostOrder()
    WidgetMessageSendPostOrder(): loop
    WidgetMessageSendPostOrder()
    WidgetMessageSendPostOrder(): loop
    WidgetMessageSendPostOrder()
    WidgetMessageSendPostOrder(): loop
    WidgetMessageSendPostOrder()
    WidgetMessageSendPostOrder(): loop
    WidgetMessageSendPostOrder()
    WidgetMessageSendPostOrder(): loop
    WidgetMessageSendPostOrder()
    WidgetMessageSendPostOrder(): loop
    WidgetMessageSendPostOrder()
    WidgetMessageSendPostOrder(): loop
    WidgetMessageSendPostOrder()
    WidgetMessageSendPostOrder(): loop
    

    p.

  • Hello Piranha

    I just tried the same again on the EK-TM4C123GXL with the Display booster pack and it works just as expected. Can you check the binary file instead of compiling the project files
  • The precompiled binaries for all demos work as expected.

    p.
  • Hello Prianha

    Which version of CCS and Compiler are you using?
  • I tried to build fontview demo using the precompiled library, and it also works. Looks like grlib does not build properly.
  • I'm not using CCS. I built the code using make and GCC shipped with Fedora25:
    $ arm-none-eabi-gcc -v
    Using built-in specs.
    COLLECT_GCC=/usr/bin/arm-none-eabi-gcc
    COLLECT_LTO_WRAPPER=/usr/libexec/gcc/arm-none-eabi/6.1.0/lto-wrapper
    Target: arm-none-eabi
    Configured with: ../gcc-6.1.0/configure --prefix=/usr --mandir=/usr/share/man --with-pkgversion='Fedora 6.1.0-2.fc25' --with-bugurl=https://bugzilla.redhat.com/ --infodir=/usr/share/info --target=arm-none-eabi --enable-interwork --enable-multilib --with-python-dir=arm-none-eabi/share/gcc-6.1.0/python --with-multilib-list=armv6-m,armv7-m,armv7e-m,armv7-r --enable-plugins --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --enable-languages=c,c++ --with-newlib --disable-nls --disable-shared --disable-threads --with-gnu-as --with-gnu-ld --with-gmp --with-mpfr --with-mpc --with-headers=/usr/arm-none-eabi/include --with-system-zlib
    Thread model: single
    gcc version 6.1.0 (Fedora 6.1.0-2.fc25)
  • Hello Piranha

    I have not use GCC outside of the CCS IDE. Maybe other forum users would be helpful with guiding you.
  • I rebuilt the driver package using gcc shipped with ccs7, and it seems to work fine. There must be some hidden incompatibility with more recent version of gcc (ccs7 ships with 4.9.3).
    Thanks for help!

    p.