TI MSP-EXP430G2ET Launchpad PIO Board Support

Has anyone gotten PIO to work with the TI MSP-EXP430G2ET Launchpad?

I’m using PIO home v1.0.2 / core v3.6.1rc1 in VSCode v1.28.1 on Windows 10 1803 10.0.17134

I can successfully compile the energia-blink sample.

However, when uploading the code I get the error:
Firmware version is 30403004tilib: MSP430_VCC: Could not set device Vcc (error = 10)

There is no specific PIO board defined for the MSP-EXP430G2ET, so I created one, lpmsp430g2et.json:

{
  "build": {
    "core": "msp430",
    "extra_flags": "-DENERGIA_ARCH_MSP430 -DENERGIA_MSP_EXP430G2ET2553LP",
    "f_cpu": "16000000L",
    "hwids": [
      [
        "0x2341",
        "0x0c9f"
      ]
    ],
    "mcu": "msp430g2553",
    "variant": "MSP-EXP430G2ET2553LP"
  },
  "debug": {
    "tools": {
      "mspdebug": {
        "onboard": true,
        "server": [
          {
            "arguments": [
              "tilib",
              "gdb"
            ],
            "executable": "mspdebug",
            "package": "tool-mspdebug",
            "system": [
              "windows",
              "windows_amd64",
              "windows_x86"
            ]
          },
          {
            "arguments": [
              "$UPLOAD_PROTOCOL",
              "gdb"
            ],
            "executable": "mspdebug",
            "package": "tool-mspdebug",
            "system": [
              "darwin_x86_64",
              "linux_i686",
              "linux_x86_64"
            ]
          }
        ]
      }
    }
  },
  "frameworks": [
    "energia"
  ],
  "name": "TI LaunchPad MSP-EXP430G2ET w/ MSP-EXP430G2ET2553LP",
  "upload": {
    "maximum_ram_size": 512,
    "maximum_size": 16384,
    "protocol": "rf2500"
  },
  "url": "http://www.ti.com/ww/en/launchpad/launchpads-msp430-msp-exp430g2.html",
  "vendor": "TI"
 }

…and a platformi.ini:
[env:lpmsp430g2553]
platform = timsp430
board = lpmsp430g2et
framework = energia

I’m not sure if this is correct and if another step is required to get it to upload firmware. And one of my concerns is the protocol. What is rf2500?

Note, TI CCS v8.x and Energia v18.x successfully uploaded firmware code to the MSP-EXP430G2ET, blinkies all around.

Please file a feature request here Issues · platformio/platform-timsp430 · GitHub

I did: Add TI MSP430 Launchpad Support #9
I really hope support comes soon. I never liked CCS.
Working in VSCode is so much more efficient and convenient.

V/r,
Actual

While waiting for a permanent solution, I tried a few things:

  1. I copied the Energia framework’s mspdebug tool folder contents to Platform IO’s tool-mspdebug folder. That didn’t work. There was a message stating it was not for standalone use, and it still could not set the VCC, so I surmised it’s a custom build.

  2. I learned that TI has a flash tool for the MSP430. I d/l’d and installed it. Its folder contained the same MSP430.dll file that’s in the Energia and PlatformIO tool folders, but with a 2018 file date. I copied the MSP430.dll to the PlatformIO tool-mspdebug folder, compiled, and successfully uploaded the firmware! Progress!

However, now I discovered I can’t initiate a debug session to walk through the code.

1 Like

You just made my day, worked like a charm, and the debugger works fine. I am free from Code Composer Studio, thanks to you! I hope you are doing well, god bless.