First Steps with MSP430FR5969 Launchpad using TI's msp430-gcc Toolchain


MSP430FR5969 Launchpad

MSP-EXP430FR5969 Launchpad is a development board with an msp430fr5969 microcontroller designed and sold by Texas Instruments.

The MSP430 LaunchPad features on-board emulation, which means you can program and debug your projects via USB connection without the need for additional tools.

Texas Instruments offers several software tools to enable development for the msp430 microcontrollers. One of these tools is a complete toolchain based on gcc, developed by Red Hat and supported by TI.

There exists another - community developed - gcc toolchain for msp430, based on an older version of gcc and which is not explicitly supported by TI.

This article refers to TI's version of msp430-gcc.
For the download location of TI's gcc toolchain see links collection below.


Download and Install Red Hat GCC

To download the installer of the Red Hat GCC Toolchain go to TI requires you to register (to create a my.TI account) and to fill out a form to satisfy an automatic software download approval.

Per default the toolchain gets installed in ~/ti/gcc if installing as a regular user.
When installing as root user, the default installation directory is /opt/ti/gcc.

From now on, the directory, where the msp430-gcc is installed will be called INSTALL_DIR.

INSTALL_DIR/ti/gcc/bin should be included into the executable search path, so best add the line below to your ~/.bashrc:

export PATH=INSTALL_DIR/ti/gcc/bin:${PATH}

Read the Red Hat GCC for MSP430™ Microcontrollers Quick Start Guide (Rev. A) to get started with the toolchain.


udev Rules for MSP430 Launchpads

TI offers a shell script which can create a rules file for udev to make the Launchpad's USBs world readable. The scripts (run as root) creates the file /etc/udev/rules.d/61-msp430uif.rules with the contents listed below:

# Udev rule attributes currently only need to support Ubuntu and Suse

For the debug interface integrated on the MSP-EXP430FR5969 Launchpad, only the last line is needed.

Myself, I am using my own udev rules which include some more msp430 based boards and restricting access to the members of the "trusted" goup:

# The Original Launchpad
ATTRS{idVendor}=="0451", ATTRS{idProduct}=="f432", MODE="0660", GROUP="trusted"
#2047:0200 Texas Instruments MSP430 USB HID Bootstrap Loader
SUBSYSTEM=="hidraw", ACTION=="add", ATTRS{idVendor}=="2047", ATTRS{idProduct}=="0200", MODE="0660", GROUP="trusted"
# MSP-EXP430FR5969 Launchpad
ATTRS{idVendor}=="2047", ATTRS{idProduct}=="0203", MODE="0660", GROUP="trusted"
# Olimexino-5510
ATTRS{idVendor}=="2047", ATTRS{idProduct}=="0300", MODE="0660", GROUP="trusted"

Compatible Debug Interface Firmware

When following the instructions from the Red Hat GCC for MSP430™ Microcontrollers Quick Start Guide (Rev. A) there is a failure when connecting gdb to gdb_agent_console (gdb_agent_console output):

MSP430               Client connected...Connecting to Target
Found USB FET at ttyACM0
...Initializing Update Bootloader
...Program new firmware
.....Firmware update for TIUSB failed. Aborting
   MSP430 Error :MSP-FET / eZ-FET core(communication layer) update failed
Connection failed...exiting

It seems that the Note in the "Linux" paragraph in the "MSP Debug Stack" article of the TI processors wiki also applies to the debug interface integrated on the MSP-EXP430FR5969 Launchpad.

This means that you need to update the debug interface firmware using the MSP-FET Linux Patcher on a Windows system >:(.
For downloading MSP-FET Linux Patcher, again a my.TI account and the automatic software download approval is required.


Build, Upload and Run Example

There is a simple LED blink example contained in the toolchain installation. To build the example change to INSTALL_DIR/examples/linux/msp430fr5969 and call make debug

cd ~/ti/gcc/examples/linux/msp430fr5969
make debug

The debug make target builds the LED blink example code and starts the gdb debugger.

To enable the gdb to talk to the Launchpad debugging hardware, the gdb_agent_console must be running. To start gdb_agent_console, execute:

INSTALL_DIR/bin/gdb_agent_console INSTALL_DIR/msp430.dat

Next steps are to connect with gdb to gdb_agent_console, by issuing the gdb target remote command

(gdb) target remote :55000

upload the code to the Launchpad:

(gdb) load

and start the uploaded code (using the "continue" command (shortcut: "c")):

(gdb) c

LED2 on Launchpad should be blinking with a period of around a 1/4s, now.

Pressing Ctrl-C in the gdb console stops the execution of the program on the Launchpad

and the gdb detach command stops the debugging session and detaches from the gdb_agent_console.


MSP-EXP430FR5969 Launchpad with Sharp® Memory LCD BoosterPack

TI offers a bundle of MSP-EXP430FR5969 Launchpad together with a Sharp® Memory LCD BoosterPack.

In the MSP-EXP430FR5969 Software Examples (Rev. C) demonstration code supporting Sharp® Memory LCD BoosterPack may be found.
Anyhow, the examples there are prepared for Code Composer Studio (CCS) and IAR Embedded Workbench but not for msp430-gcc.

I will check out the possibility to convert the CCS projects to a Makefile which may be used with msp430-gcc.



Links to interesting projects and websites

This site maintained by:
My public PGP key
last updated: 2014-12-03 Valid CSS! Valid XHTML 1.0 Strict