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.

CCS/MSP430G2553: GUI Composer - Parameters not being retrieved from device

Part Number: MSP430G2553

Tool/software: Code Composer Studio

I am trying to use GUI Composer 2 (in the cloud) and am trying to select from Target Device parameters when binding a value to a widget - but they do not appear.  The list of parameters from the target device is not updated based on the program loaded into the device.  How can I update the list of Target Device parameters to make them available for selection? Or, how can this be achieved in Java Script?  Is there any documentation available - or a sample for this?  

Thanks

  • Hi Timothy,

        The answer depends on which Target Communications protocol for your application:  USB / Serial IO or XDS Debug Port / Target Monitor....

    If you are using USB / Serial IO, you can get GUI Composer 2 to 'learn' the JSON strings your project is sending as follows:

    • ensure your device is connected to your PC
    • select Project / Target Communications from the GCv2 menu bar
    • if you have not yet done so, click the upload button  , browsing to your .hex or .out file and selecting it.
    • if you have not yet programmed your device, click 'connect' and wait for the lightning bolt icon to appear:

       and then click on the lightning bolt icon to program your device.

    Once your device has been programmed,  after connecting, you can check that it is sending data by clicking on the SHOW CONSOLE button.  This will show the decoded JSON strings that GUI Composer has received.  If they are not showing up, make sure that the target code is properly formatting them (no spaces, only one Carriage Return at the end of each JSON object string).  Any JSON strings that GUI Composer receives while in this mode it will 'learn' and will use this information to populate the Properties pane for use when you are binding

    To see the list of available binding terms, select the property you want to bind to, click the  button to enable binding, select target_device (the default) from the drop-down list of the left-hand field, then click in the box to the right of this and hit ctrl-space to see the list of bindable values:

    If you are using XDS Debug Port / Target Monitor, any global variables in your project should be learned when you program the device from the Target Communications dialog as described above.  If they are not showing up in the list, be sure that they are global in scope in your project and that you have successfully programmed the device from the Target Communications dialog.

    Does this work for you?

    Regards,

       Brian 

  • I too am having the same issue albeit, I am using the TM4C129XL Launch Pad, Mozilla as web browser, Windows 7 Pro 64 bit, CCS7.  I have tried the procedure described here and still not bale to see the global variable I have declared in the modified "Blinky" project that I created.  Any new information would be greatly appreciated.

    Thanks,

    Matthew

  • Hi Brian,

    Thanks for your assistance.  I tried what you suggested and I am now able to see the parameters.  Much appreciated.  Regards, Timothy

  • Hi Matthew,
    Could you post your source code so that I can see if I can reproduce the problem you've run into? Also, could you try it using Chrome to see if it is a browser related issue?

    Regards,
    Brian
  • Hi Matthew, 

    It sounds like you are trying to bind (i.e. connect widgets) to global variables from your program. I believe you are also expecting to see those globals to be parsed from program file that you specify in the wizard and made available in widget binding drop down. Unfortunately, this is not available yet in GCv2. The auto learning that Brian mentioned above is supported for JSON formatted strings that are read from COM port. To access global variables you would need to select XDS Debug Port/Target Monitor in new project wizard. We do have an entry in our defect tracking system to add this support. 

    However, if you have access to sources or if you know the name of the global then you can just enter it manually (or copy & paste) into that edit box. Under the hood symbols will be parsed and correct memory accessed to update the widget. We just don't have the edit box populated with parsed globals. 

    Martin

  • Thanks Brian,

    I will try using Chrome, another  bit I forgot to mention is that I am trying to use the XDS Debug mode of communication, and am unable to bind the "delay" variable in the code.

    Source Below:  (notes I added the variable delay to the standard "Blinky" example project and I am trying to bind the dial widget to that variable).

    //*****************************************************************************

    #include <stdint.h>

    #include <stdbool.h>

    #include "inc/hw_memmap.h"

    #include "driverlib/gpio.h"

    #include "driverlib/sysctl.h"

    volatile long delay = 200000;

    //*****************************************************************************

    //

    //! \addtogroup example_list

    //! <h1>Blinky (blinky)</h1>

    //!

    //! A very simple example that blinks the on-board LED using direct register

    //! access.

    //

    //*****************************************************************************

    //*****************************************************************************

    //

    // Blink the on-board LED.

    //

    //*****************************************************************************

    int

    main(void)

    {

       volatile uint32_t ui32Loop;

       //

       // Enable the GPIO port that is used for the on-board LED.

       //

       SysCtlPeripheralEnable(SYSCTL_PERIPH_GPION);

       //

       // Check if the peripheral access is enabled.

       //

       while(!SysCtlPeripheralReady(SYSCTL_PERIPH_GPION))

       {

       }

       //

       // Enable the GPIO pin for the LED (PN0).  Set the direction as output, and

       // enable the GPIO pin for digital function.

       //

       GPIOPinTypeGPIOOutput(GPIO_PORTN_BASE, GPIO_PIN_0);

       //

       // Loop forever.

       //

       while(1)

       {

           //

           // Turn on the LED.

           //

           GPIOPinWrite(GPIO_PORTN_BASE, GPIO_PIN_0, GPIO_PIN_0);

           //

           // Delay for a bit.

           //

           for(ui32Loop = 0; ui32Loop < delay; ui32Loop++)

           {

           }

           //

           // Turn off the LED.

           //

           GPIOPinWrite(GPIO_PORTN_BASE, GPIO_PIN_0, 0x0);

           //

           // Delay for a bit.

           //

           for(ui32Loop = 0; ui32Loop < delay; ui32Loop++)

           {

           }

       }

    }

  • Martin & Brian,

    Tried using Chrome and also manually typing in my global variable "delay" into the the Value: drop down field leaving all else at default for the dial widget with zero luck. Please let me know if you can replicate my issues using the posted code.

    Thanks,
    Matthew
  • HI Matthew,
    I don't have that exact tiva handy, but I just tried the same experiment with TivaC123 LaunchPad. I imported blinky example from tirex into CCS cloud IDE, then added delay global and adjusted for loops just like your code. Then I built/flashed the program using cloud IDE. Then I switched to GC (first downloading blinky.out to local PC disk), then uploading it in GC. I then added a simple text box and bound it to delay variable. Once I clicked on Run (i.e. black triangle). I was able to change the delay value and see it reflected in blinking rate of LED.

    Are you using a LaunchPad or a different board with TivaC129?

    Martin
  • Martin-

    I am using the TM4C1294XL Launchpad, I build the modified "Blinky" project within CCS7 desktop version, direct myself to GC ver 2, successfully connect to the target VIA XDS Debug Port and upload the "Blinky.out" file to the target also successfully. I then bind the VALUE: parameter of the widget by manually typing in blinky (my variable), I reconnect to the target and try and change the variable withing GC by using the dial with no results. What parameter must I bind other than the VALUE parameter? Must I press the black Play button in order to get results?

    Thanks again
    Matthew
  • Hi Matthew, 

    When binding a widget to a variable, you would need to first click on chain link icon beside the edit box, this action would resize the edit box and show a combo box that defaults to target_device (maybe you are already doing this, but just in case). You would then enter the global variable name. 

    Yes, in order to test your application you need to run it. In design mode you can arrange widgets and bind them to variables, but physical target connection to read values is only made when running the app. 

    Martin

  • Thanks Martin-

    My project is now working with GC2! The issue was that I was connecting to the target with the chain link at the bottom left hand corner of the window prior to selecting the "Run" button. If I do not connect to the target prior to selecting the "Run" button things work just fine.

    Thanks
    Matthew