element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
In the Air Design Challenge
  • Challenges & Projects
  • Design Challenges
  • In the Air Design Challenge
  • More
  • Cancel
In the Air Design Challenge
Blog MSP430 Development in VisualStudio
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: xever
  • Date Created: 11 Nov 2014 7:59 AM Date Created
  • Views 3332 views
  • Likes 2 likes
  • Comments 6 comments
  • iot_footprint
  • in_the_air
  • visual_msp430
Related
Recommended

MSP430 Development in VisualStudio

xever
xever
11 Nov 2014

I received my kit last week and have looked at the different IDE options available for the MSP430 and CC3200.  The choices vary from (1) Energia which has the same feel as coding for an Arduino, (2) Code Composer Studio, an Eclipse-based IDE that is full-featured and has a number of plugins that can extend its functionality especially around code optimisations and debugging features.  CCS costs nothing if compiling with GCC or US$495 when using the optimised TI compiler.  I think its a reasonable price for a good product.  (3) Another option would be to use IAR Embedded Workbench for TI MSP430.  The Kickstart license is free but has an 8K code size limitation which I think is quite small, or shell out anywhere between $4000-5000 for a full license which I think is too dear especially for a hobbyist work whose code space exceeds the code size limit.  (4) The last option, which is hardly mentioned around the web is using Visual Studio.  If you have a license of Visual Studio Professional or above, you can write embedded applications by installing a plugin called VisualGDB.

 

With VisualGDB, one can write application for embedded devices including and not limited to TI's MSP430.  It has support for STM32 MCUs, Atmels, etc.  Also, depending on the license type, it is also possible to write Linux applications (including the BeagleBone) within Visual Studio.  A 30-day trial period can be downloaded here.

 

Btw, I am in no way connected with VisualGDB nor am I gaining any profit in any form from them about this write up.  I am merely sharing my experience with this tool. image

 

Again, if you have Visual Studio Professional (or better) installed in your machine and would like to try out this plugin, then continue reading this post.

 

Getting Started

 

1. Ensure that the necessary drivers for the MSP430xx launchpad are installed.  Check in Device Manager that you do NOT see a bang icon on the MSP devices as shown below.  If you do, unplug your launchpad and install the appropriate drivers here.

image

2. Download and install VisualGDB from this link.

3. Download and install MSP430 toolchain

4. Get a more recent version of GCC Toolchain and replace the files at C:\SysGCC\msp430

5. Get a copy of the latest MSP430.dll and paste it to GCC folder C:\SysGCC\msp430\bin

image

6. Extract the linker scripts (attached in this post) and copy them over to C:\SysGCC\msp430\msp430\lib\ldscripts\msp430fr5969.

7. Launch Visual Studio

8. Create a new embedded application by following this tutorial.

image

However, we will be doing some things a bit different, that is when selecting the MCU type, select MSP430FR5969 instead.

image

9. Continue clicking on the Next button until prompted to select the Debug method.  Use JTAG (gdbproxy++) and set the name to USB.

image

10. Click Finish and VisualGDB will generate a simple LED blink app.  Unfortunately, this does not work as expected so replace the code in LEDBlink.c with the following, which is the same as the msp430fr5969_1.c sample in the MSP430Ware.

 

#include <msp430.h>

int main()
{
     WDTCTL = WDTPW | WDTHOLD;     /* Stop WDT */
     // Configure GPIO
     P1OUT &= ~0x01;
     P1DIR |= 0x01;
     PM5CTL0 &= ~LOCKLPM5;

     while(1)
     {
          P1OUT ^= BIT0;
          __delay_cycles(100000);
     }
}

11. Connect the MSP430FR5969 Launchpad.

12. Click on the 'Run' button and watch the green LED blink.

image

 

From here, you can debug the code as you would debug a desktop application.

 

The immediate benefits from using Visual Studio is that I can have a single Solution that will include multiple projects of various targets, from firmware running on MSP430 MCU, Linux app running on the BeagleBoneBlack, a test application/simulator running on the Desktop, a cloud application that can be deployed to cloud service (i.e. Microsoft Azure), and a mobile app running on a smartphone (Windows Phone, Android, or iOS).  Also, with this approach, we can leverage Microsoft's Unit testing framework even for firmware development.


iOS and Android application development using VisualStudio requires Xamarin plugin and will be covered in future posts.

Attachments:
msp430fr5969.zip
  • Sign in to reply

Top Comments

  • tomaja
    tomaja over 10 years ago +1
    Again, very informative post from you! Thank you.
Parents
  • DAB
    DAB over 10 years ago

    Good Post.

     

    I was not aware of the Visual Studio option for MSP430 programming.

     

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • DAB
    DAB over 10 years ago

    Good Post.

     

    I was not aware of the Visual Studio option for MSP430 programming.

     

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
  • xever
    xever over 10 years ago in reply to DAB

    Thanks, it is really a great plugin for VS and working with GCC and have been using it for about a year now.  Writing Linux apps is also a great feature.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube