Getting started with programming Octanis Rover using CCS on any OS

CCS is TI's custom eclipse based IDE for MSP43x and other MCU. It includes nice debugging tools and it is a working all-in-one development system. The free version using the TI compiler is code-size limited for MSP43x devices, but you can use the GNU compiler with unlimited code size within CCS. For the MSP432, TI-RTOS is even supporting the GNU compiler, in contrast to MSP430 devices.

The following describes how to get CCS up and running:

  1. Download CCS here. It's free, but TI-Account required.
  2. In the application, you have to add TI-RTOS for MSP43x and MSP43xWare depending on your MCU, in the app center.
  3. Get started with examples (Help → Welcome. Then “Browse Examples”) or:
  4. Import the project for the mainboard firmware from GitHub. It should compile and build directly (if not: check the known issues)

To get more info about the pin connections of the mainboard:

  1. Our wiki page on the mainboard firmware:
  2. The PCB files can be found on GitHub: (the current mainboard is version 0.5, the external sensor extension is called external_weather_strip)

More info on programming:

In the Project Tree –> targetConfigs open the file “MSP432P401R.ccxml”. There, under “Advanced Setup”, Click on Target Configuration. Click on “Texas Instruments XDS110 USB Debug Probe” in the tree and you will see this screen:

If you flash the mainboard, i.e. you use the JTAG connector of the launchpad for an external device, leave the settings as in the pictures (SWD mode settings: Use SWD Mode with SWO Trace enabled)

If you flash the MCU on the launchpad change the SWD mode settings to: Use 1149.1 JTAG, SWD Mode with is disabled.

IMPORTANT When trying to flash the mainboard, make sure to connect the JTAG cable in the correct way. The 3.3V supply cable (usually marked red) has to connect to the uppermost pin on the JTAG header on the mainboard as shown in the figure below.

Also, remove all jumpers that connect the programmer with the MSP432 on the launchpad. Finally, move the JTAG switch to Ext. Debug.

(from this e2e forum post)

  1. Connect the failing LaunchPad/unit to your PC.
  2. Open CCS, assume you already have at least one MSP432 project open.
  3. Go to View > Target Configuration.
  4. Within Target Configuration navigate to your MSP432 project > the .ccxml file.
  5. Right Click > Launch Configuration
  6. Under Debug window you should now see some tree structure starting with the .ccmxl file being the root > something_CORTEX_M4_something (unknown)
  7. Right Click > Show all hidden cores.
  8. Connect only to the Non-Debuggable Devices > DAP.
  9. Go to Script > Factory Reset.
  10. Power cycle and try to restart debug.

driverlib.h is not existing/found

When importing the project on Windows and Linux with a probably newer verision of CCS/MSPWare than for Mac OS, there are some issues with the path names. First of all, make sure you installed MSP430xWare.

Then, right-click on the project root directory, click “Properties” and adapt the path as in the screenshots below (40c for Windows/Linux users instead of 40a for Mac users).

IMPORTANT: As we are multiple users with multiple OS working on the code, these changes should not be tracked in the git repository. To do this, type:

git update-index --assume-unchanged .cproject
git update-index --assume-unchanged .settings/org.eclipse.core.resources.prefs 

as long as the driverlib in CCS for Mac OS are not updated.

Using CCS 6 on Octanis Dev-Box

  1. Download and run the Octanis Dev-Box VM
  2. Inside the VM, download CCS from here. TI-Account required.
  3. Add PATH=/opt/ti/ccsv6/utils/bin:$PATH to the end of your .bashrc
  4. Open CCS and start developing!
  5. Currently only the following project settings are unlimited:

( Sublime Text 3 Config Files )

Checking code size of CCS generated .out file

>C:\ti\ccsv6\tools\compiler\gcc-arm-none-eabi-4_8-2014q3\bin\arm-none-eabi-size.exe .\Octanis1-Mainboard-Firmware_MSP_EXP432P401RLP.out

   text    data     bss     dec     hex filename
  75523    5296   13960   94779   1723b .\Octanis1-Mainboard-Firmware_MSP_EXP432P401RLP.out

Where “text” is occupied flash.

Known Errors

Target Debugging Fails

When does this happen?: Currently only fails with the current octanis firmware (75kB) after adding more mailboxes.

Solution: Unknown. This error disappears when choosing “JTAG” mode in the target config. It currently doesn't seem to work with SWD mode disabled.

Workaround: Use a different launchpad! It seems to be an issue with the onboard debugger being either bricked or unreliable.

Deprecated Methods

The following is an alternative to CCS. These methods are currently unsupported.

  • Make sure MSP430→Tool Manager has activated the msp430 toolchain (if not, select the directory where you installed it)
  • File→New→C Project. Select MSP430 Cross Target Application. Name the new project, click twice on next and select the correct mircocontroller (MSP430f5529). Click finish
  • Right-click on the project in the side bar, select Properties.
  • In C/C++ Build → Settings → Tool Settings → Includes, add the path msp-toolchain/msp340/Include and Octanis1-Eclipse/Include
  • In C/C++ Build → Settings → Tool Settings → Libraries, add the path msp-toolchain/msp430/lib
  • In C/C++ General → Paths and Symbols → Source Location, Link Folder Octanis1-Eclipse/Source and any other folder outside the project folder containing source files
  • In MSP430, select the tilib driver.
  • Click Apply and OK
  • Build Project
  • Install ccs
  • Connect a launchpad via USB to your computer
  • Connect Octanis board via SBW to the launchpad
  • Open an example project in ccs (for instance Blink). Choose the one for MSP430F55xx.
  • Click on debug to flash the board
  • If you get an error saying “Error connecting to target: No MSP430 device was found on USB FET 1” a reboot of your operating system might resolve the issue. Otherwise check in Project→Properties→General if you have th switch the connection from USB1 to USBx.
  • Download Energia
  • Merge contents of with Energia directory (Right click on > “Show Package contents”)
  • Connect a launchpad via USB to your computer
  • Connect Octanis board via SBW to the launchpad
  • The menu Tools→Serial Port should be accesible and at least one device selectable. Select “the first”.
  • In Tools→Boards select Octanis Rover PCB v*** w/ MSP430f5529 (16MHz)
  • Open an example code (for instance Blink) and download it on the board. It is possible that you get an error message, that you have to update the programmer. Do this with Tools→Update programmer.
  • If there is the error that no device is detected, try to change the serial port in the menu.


First, uptdate your system:

$ sudo apt-get update
$ sudo apt-get upgrade

Then, if they aren't installed yet, get the following packages:

$ sudo apt-get install git stow subversion build-essential automake autoconf openjdk-6-jdk libusb-dev libreadline-dev

Finally, in any temporary directory (e.g. a subdirectory of your homefolder)

$ mkdir -p somewhere/build
$ cd somewhere/build
$ git clone scripts-tinyos-msp430
$ git clone scripts-msp430
$ ./scripts-tinyos-msp430/
$ ./scripts-msp430/
$ ./scripts-tinyos-msp430/ cleanup
$ ./scripts-msp430/ cleanup

This will install TinyOS into /opt/tinyos and the msp430 toolchain into /opt/msp430. Before using any of these tools, it is required to set up the required environmental variables. Easiest, copy the following lines into your .bashrc (this file is located in your home directory):

# TinyOS and MSP430 environmental variables
source /opt/tinyos/scripts/envsetup.subr
source /opt/msp430/scripts/envsetup.subr

Run source ~/.bashrc to make the changes effective. Then you're ready to go.

Again, install some missing packages:

sudo apt-get install libboost-dev libtool libudev-dev libusb-1.0-0-dev

Download hidapi-0.7.0 and extract it into any temporary folder (e.g. the same as used before to install TinyOS).