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.
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.
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
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.
However, we will be doing some things a bit different, that is when selecting the MCU type, select MSP430FR5969 instead.
9. Continue clicking on the Next button until prompted to select the Debug method. Use JTAG (gdbproxy++) and set the name to USB.
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.
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.
Top Comments