Archive for June, 2010

Installing MSPGCC4 and MSPDEBUG on Kubuntu 10.04

Monday, June 21st, 2010

A few weeks ago I decided to upgrade my PC from an older version of OpenSuse to Kubuntu 10.04. Here are my steps to install on Kunbuntu 10.04.

I installed following packages via System Settings->Add and Remove Software but I believe it would just as easy to use apt-get on the command line.

  • subversion
  • gcc-4.4
  • texinfo
  • patch
  • libncurses5-dev
  • zlibc
  • zlib1g-dev
  • libx11-dev
  • libusb-dev
  • libreadline6-dev

With those packages installed I could install mspgcc4 with following steps:

  1. check out mspgcc4 from sourceforge via “svn checkout https://mspgcc4.svn.sourceforge.net/svnroot/mspgcc4”
  2. change directory into newly created mspgcc4 via “cd mspgcc”
  3. run the build script via “sudo sh buildgcc.sh”
    I basicly used all the default answers by pressing ENTER only selecting “Build now” with yes (default there is no)
    This installed all the tools under /opt/msp430-gcc-4.4.3.
  4. Next I added /opt/msp430-gcc-4.4.3/bin to the path in /etc/profiles (“export PATH=${PATH}:/opt/msp430-gcc-4.4.3/bin”)

Next I downloaded the tar file for mspdebug from sourceforge ( http://mspdebug.sourceforge.net/download.html ).

Then I was able to install the mspdebug via:

  1. tar xvfz mspdebug-version.tar.gz
  2. cd mspdebug-version
  3. make
  4. sudo make install

I can start mspdebug for the ez430F2013 with “mspdebug -u /dev/ttyUSB0” Update: in version 0.10 the -u option is not there anymore. Instead I had to use “mspdebug -d /dev/ttyUSB0 uif” to connect to my EZ430

Next to come build the blinking LED example for the ez430F2013.

Optional:

If you don’t like the msp-insight you can use ddd with msp430-gdb via installing the ddd package and starting it with “ddd msp430-gdb”.

Still alive

Monday, June 14th, 2010

Ok so I wasn’t kidding when I posted not to expect something anytime soon. Well here we are over a year later with only the second post.

Anyway even I wasn’t posting anything on the blog I did play with a few things.

The first thing was deciding on what microprocessor platform to use. I decided to try my luck with Texas Instruments MSP430 platform since they offer this neat little platform EZ430 ( see EZ430 at TI.com ). This uses the newer Spy-BiWire programming and debugging interface found on the new chips. Another reasons were the very low power consumption of the MSP430 architecture, wide selection of devices, from 14 pin MSP430F20xx to 113 pin version, from 128Byte to 16KB of RAM, 512Byte to 256KByte of Flash and a wide selection of integrated peripherals.

The Ez430 development platform comes in different version. Options range from the EZ430F21013 which is one of the cheapest commercial platforms you can find anywhere (at the time of writing TI sold this for US$20 in their web shop) to complete ZigBee solutions (EZ430-RF2480). Those little kits contain a little USB stick as programmer and debugger and a 6pin header to connect the target boards to. Some of the target boards can be bought independent of the complete kit ( eZ430-T2012 or eZ430-RF2500T ) which is a nice option if you want to expand you project.

I bought the eZ430F2013 and eZ430-RF2500. Both included a CD with the IAR Kickstart Compiler and Ti’s CCS compile based on Eclipse. Both compilers have a code size limit but you will not exceed them with the MSP430F2013 and is sufficient for the MSP430F2274 used on the ez430-RF2500. The programmer/debugger interface support programming the FLASH (so no bootloader required), breakpoints, single stepping and reading the registers/memory of the processor which is a real blessing when you try new features or have a bug in your code.

I did use the IAR compiler to test the programmer and target boards but ultimately I wanted to use the open source compiler mspgcc.

First of I love the TI shop. I bought both kits with the standard shipping but received both the next day. I first bought the ez430F2013. This kit comes in a usb stick housing which contains the programmer and the target board. Since at some point you want to go beyond blinking the one LED you will need to prey the housing open which can be difficult but a small screwdriver will work fine. The RF2500 stick is a little bit bigger and has a cap for the target board. I wished TI would have used a normal 0.1 spaced header for connecting the target boards since the 0.05 spaced connector are expensive and hard to find but overall I like the programmers and target boards.

Ok, this was a little update on the microprocessor platform. But I still wanted to use an open source tool chain for compilation and debugging. Fortunately in the last year a lot happened. First there is a port of mspgcc to gcc4 (most current Linux distros use gcc 4.x for a while so installing gcc3.x just for msp would be a pain) and a new mspdebug tool was written replacing the closed source msp-gdbproxy. I will describe the install of the two tools for kubuntu 10.04 in the next post.