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.

GUI Composer what is syntax for binding a string to e.g. label

Hi !

I want to display a string in a GC label e.g., XDS connection, Dashboard type.

For this I binded a variable (string char[xxx]) in field "label".

During runtime the different chars in the string array are displayed as single, comma separated, hex values only.

What is exact syntax to display string in correct way ? I believe there is formating missing!

  • Hello,

    Are you using GCv2 or v3?

    Thanks

    ki

  • Hi ,

    I am using V2 Dashboard.

    FYI What I need to display is a /0 terminated string following standard C conventions.

    Thanks!

  • Thanks. I will follow up with engineering and let you know when I receive feedback

    Thanks

    ki

  • I have no issues binding a string to a label. The text displays as it should.

    Can you provide the following:

    -code snippet of the string

    -how the variable is binded to a label in GC

    -how the string is displayed when running the GC dashboard

    Thanks

    ki

  • Hi Ki!

    Here you are....

    C program in CCS:

    Here is how I declared gloabl string in my CCS C program :

      char gTestString[20];   // global string

    ... I initialized string in progam:

      strcpy(gTestString, "GC-Test!");  // now correxct Content is in variable!

    GC V2 Dashbaord:

    This is label property:

    and this shows up during runtime (each ASCII in hex is displayed):

    See right Label.... 71,67,45,....

    I also tried gTestString[] and gTestString[0] without same result.

  • Thanks, they are very helpful.

    This is what i did:

    Code:

    Label property:

    Dashboard:

    It seems to be working fine for me.

    Can you export the whole project and provide it to me? You can share via private E2E conversation if you wish.

    Thanks

    ki

  • FYI, I modified the properties so that it uses the same font and color as your properties. That still worked:

  • Hi Ki!

    That give me some hope ;-)

    I will send you my project immediately per private message!

  • I will respond further in the private discussion

  • This issue was resolved via private e2e message.

    The issue is that on ARM, a 'char' defaults to 'unsiged char'. GC expects a signed char type for the string.

    Thanks

    ki

  • Ki!

    Thanks so much!

    I confirm, that now strings are displayed correctly!