I am using ubuntu 14.04 64 bit on virtualbox on Windows 8.1 64 bit host.

I have to build some project and the project uses cmake system. I need to cross compile my project for Texas Instruments cc430f5137 and for this i require msp430 gcc.

I downloaded the msp430-gcc-full-linux-installer- file as mentioned here .

when i downloaded then I did

sudo chmod +x msp430-gcc-full-linux-installer-

then when I type



sudo ./msp430-gcc-full-linux-installer-

nothing happens and I get a new line on terminal.

if I type

sh ./msp430-gcc-full-linux-installer-


sudo sh ./msp430-gcc-full-linux-installer-

then I get the following error

./msp430-gcc-full-linux-installer- 1: ./msp430-gcc-full-linux-installer- Syntax error: "(" Unexpected

Even if I double click the.run file from the files directory, nothing happens

i am new to linux and I am doing this for the first time. I have searched the internet but I haven't found anything useful.

Please help me in setting up the msp430 gcc tool chain


My question is too specific to my need but please I don't want it closed flagged as too specific.


first of all, I think the problem is not explicitly related to VirtualBox nor to the host system. I encountered this problem trying to run the compiler installer on Ubuntu 14.04 64bits (not the full installer).

Seeing this post on TI forums (http://e2e.ti.com/support/development_tools/compiler/f/343/t/421764), I installed all the CCS prerequisite (http://processors.wiki.ti.com/index.php/Linux_Host_Support_CCSv6#Ubuntu_14.04_64bit), rebooted the pc and it finally worked :

sudo apt-get install libc6:i386 libx11-6:i386 libasound2:i386 libatk1.0-0:i386 libcairo2:i386 libcups2:i386 libdbus-glib-1-2:i386 libgconf-2-4:i386 libgdk-pixbuf2.0-0:i386 libgtk-3-0:i386 libice6:i386 libncurses5:i386 libsm6:i386 liborbit2:i386 libudev1:i386 libusb-0.1-4:i386 libstdc++6:i386 libxt6:i386 libxtst6:i386 libgnomeui-0:i386 libusb-1.0-0-dev:i386 libcanberra-gtk-module:i386 gtk2-engines-murrine:i386 unzip

quoted from http://colotronics.blogspot.com/2014/08/msp430-toolchain-in-ubuntu-1404-with.html

cd ~
mkdir mspgcc_install
cd mspgcc_install


sudo apt-get install patch ncurses-dev build-essential bison flex zlib1g-dev sed automake gawk mawk libusb-1.0.0 libusb-1.0.0-dev dos2unix srecord 


wget http://sourceforge.net/projects/mspgcc/files/mspgcc/DEVEL-4.7.x/mspgcc-20120911.tar.bz2
wget http://sourceforge.net/projects/mspgcc/files/msp430mcu/msp430mcu-20130321.tar.bz2
wget http://sourceforge.net/projects/mspgcc/files/msp430-libc/msp430-libc-20120716.tar.bz2
wget http://ftpmirror.gnu.org/binutils/binutils-2.22.tar.bz2 
wget http://ftp.gnu.org/pub/gnu/gcc/gcc-4.7.0/gcc-4.7.0.tar.bz2 
wget http://ftp.gnu.org/pub/gnu/gdb/gdb-7.2a.tar.bz2

wget http://sourceforge.net/p/mspgcc/bugs/_discuss/thread/fd929b9e/db43/attachment/0001-SF-357-Shift-operations-may-produce-incorrect-result.patch
wget http://sourceforge.net/p/mspgcc/bugs/352/attachment/0001-SF-352-Bad-code-generated-pushing-a20-from-stack.patch

GDB patch download

wget -O gdb.patch https://sourceware.org/git/?p=gdb.git;a=patch;h=7f62f13c2b535c6a23035407f1c8a36ad7993dec 

Uninstall texinfo 5.x and install oldversion 4.x

wget http://ftp.br.debian.org/debian/pool/main/t/texinfo/texinfo_4.13a.dfsg.1-10_amd64.deb
sudo dpkg -r texinfo 
sudo dpkg -i texinfo_4.13a.dfsg.1-10_amd64.deb 


tar xvfj mspgcc-20120911.tar.bz2
tar xvfj binutils-2.22.tar.bz2  
tar xvfj gcc-4.7.0.tar.bz2  
tar xvfj gdb-7.2a.tar.bz2
tar xvfj msp430mcu-20130321.tar.bz2  
tar xvfj msp430-libc-20120716.tar.bz2 

Create build folders

mkdir build
cd build
mkdir binutils 
mkdir gcc
mkdir gdb 
cd ..

Binutils install

cd binutils-2.22
patch -p1<../mspgcc-20120911/msp430-binutils-2.22-20120911.patch 
cd ../build/binutils 
../../binutils-2.22/configure --target=msp430 --prefix=/usr/local/msp430 2>&1 | tee co
make 2>&1 | tee mo
sudo make install 2>&1 | tee moi 


cd ../../gcc-4.7.0
patch -p1 < ../mspgcc-20120911/msp430-gcc-4.7.0-20120911.patch 
patch -p1< ../0001-SF-352-Bad-code-generated-pushing-a20-from-stack.patch 
patch -p1< ../0001-SF-357-Shift-operations-may-produce-incorrect-result.patch 
#ira-int.h replace
cd gcc
rm ira-int.h 
wget -O ira-int.h https://gcc.gnu.org/viewcvs/gcc/branches/gcc-4_7-branch/gcc/ira-int.h?revision=191605&view=co&pathrev=191605

cd ../../build/gcc 
../../gcc-4.7.0/configure --target=msp430 --enable-languages=c,c++ --prefix=/usr/local/msp430 2>&1 | tee co
make 2>&1 | tee mo

sudo make install 2>&1 | tee moi

Update PATH

export PATH=/usr/local/msp430/bin/:$PATH
sudo sed -e '/^PATH/s/"$/:\/usr\/local\/msp430\/bin"/g' -i /etc/environment

Check msp430-gcc, must return 4.7.0 20120322

msp430-gcc --version

Install gdb

cd ../../gdb-7.2
patch -p1 < ../mspgcc-20120911/msp430-gdb-7.2a-20111205.patch
patch -p1< ../gdb.patch
cd ../build/gdb 
../../gdb-7.2/configure --target=msp430 --prefix=/usr/local/msp430 2>&1 | tee co 
make 2>&1 | tee mo
sudo make install 2>&1 | tee moi  

Check gdb installation:

msp430-gdb --version

Must return 7.2

msp430mcu and msp430-libc

cd ../../msp430mcu-20130321/
sudo MSP430MCU_ROOT=`pwd` ./scripts/install.sh /usr/local/msp430 | tee so

cd ../msp430-libc-20120716/src/
make 2>&1 | tee mo
sudo PATH=$PATH make PREFIX=/usr/local/msp430 install 2>&1 | tee moi 
cd ../..
  • Thanks but I think it is for mspgcc which has been depreciated by Texas Instruments and its not msp430-gcc which is the currect supported (it is the RHGCC 4.9)
    – Hassan
    May 8 '15 at 7:52

I'm using Lubuntu 16.10 on a VM with Windows7 host and I first installed libc6:i386 and then executed, in my case, msp430-gcc-full-linux-installer- with terminal and it worked w/o installing CCS at all.

open terminal, you can use ctrl+alt+t keys for that, and type:

sudo apt-get install libc6:i386

Wait for it to finish, and then run your original commands for executing, or with gui double click and execute with terminal.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.