Today I will have a first run with MSPGCC / Eclipse.
The first problem for non experts in the windows world is the installation.
I will try to use the following page as a reference.
Before starting, let's have a short explanation of the different parts
involved in this installaion.
- The core of what we are going to use is mspgcc. Gcc is the gnu compiler,
and mspgcc is its MSP430 version. This comes as a command line tool and
there is also a debugger (command line as well).
- Eclipse is a development environment. It is basically a GUI frame
allowing to get several parts working together. For instance, when
developing a program in C, Eclipse provides a text editor, a file
management system and so on. When compiling, Eclipse manages the files
compilation and their linking. Eclipse can also manage loading the program
on the target.
- CDT (for C development tools) is a set of plugins allowing to program in C
using Eclipse (which is only an "empty box" making everything fit
- JTAG drivers. When loading a compiled program, Eclipse (or any other
development environment) need a JTAG interface. This interface is
accessed using JTAG drivers.
So we are going to install all these pieces.
Download mspgcc from http://mspgcc.sourceforge.net
and run the
executable. This should go smoothly. The version I have installed is
mspgcc-20070216. The only thing I had to change is the location. By
default, it installs on C:\mspgcc. On my computer, the hard-disk is E, so
the installer didn't understand that the most likely place would be the boot
disk. But we are in the Windows world, so it is not a surprise.
Before installing Eclipse, you have to check that you have a Java Runtime
Environment installed. How to do that? I don't know. If anybody knows,
please tell me, I will add the proper info. I decided to install it so I can be
sure it is here. Many mspgcc install howtos talk about
jre-1_4***-windows-i586.exe (sometimes jre1_5). I went to Sun
homepage. What is important to know is that they have changed the
versioning scheme. Java Runtime Environment 5.0 is in fact jre. So go to
and choose Java
Runtime Environment (JRE). The current update is 12.
Go to the download area and you will find... jre-1_5_0_12.etc.... Choose
the offline instalalation. Once it is on your desktop, double-click, select
"accept" and wait until it is finished.
Go to http://www.eclipse.org/downloads
There are 5 versions and I don't know which one I should install.
- Not for java developers
- Not for java EE developers
- Maybe "Eclipse IDE for C/C++ developers"
- Don't know what is RCP
- Eclipse classic.
The logo of the last one looks like the first version of Texas Instruments
IDE. I'll go for this one (this shows how bloody dumb choices can be
made). Click on the right for Windows version download. Current version is
eclipse-SDK-3.3-win32.zip Unzip this file on your desktop. You will obtain a
folder named eclipse-sdk. In thie folder, there is another folder called
"eclipse". Move this folder to your root directory (E:\ in my case, probably
C:\ in most of the cases).
Install Eclipse plugins
Now we have to add the plugins allowing to program in C/C++.
Go to http://www.eclipse.org/cdt/downloads.php
Well, there are 2 versions of CDT. 4.0 and 3.1.x. It is said that CDT 4.0
works with Eclipse 3.3, so I will download this one. I get a cdt-mster-4.0.0
archive on my desktop. Unzipping it yields a folder with the same name
(except the .zip). The installation is not explained but it is very easy:
- Open the cdt-master-4.0.0 folder. Ignore the license and other stuff,
there are no indications on how to install in it. Open the "features" folder,
and copy its contents (a bunch of java files beginning with "org.eclipse.")
to the "features" folder in your eclipse root folder. In MSDOS language, it
would be: copy org.eclipse.* E:\eclipse\features Note that this is valid in
my case. In most of the configs, you may have to replace "E:\" by "C:\".
- Do the same with plugins.
Note: I did it by copying the contents of cdt-master-4.0.0\features and
\plugins with the mouse and pasting in E:\eclipse\features and \plugins. I
was asked if I want to replace or cancel, I choosed "replace all".
Now the Eclipse IDE should be installed properly. If Java was previously
installed, I guess there is no need to restart. But I am not absolutely sure
Next thing, we are going to download a utility to manage projects. It can
be found here http://homepage.hispeed.ch/py430/mspgcc/index.html
I have put the contents of net.sf.mspgcc.managedbuilder_0.0.1 into eclipse
root\plugins, but I am not sure about what I should do. There is no
As for the JTAG drivers, I guess (but I am not absolutelu sure) that I can
simply start the environment ad that it will find a way to the JTAG
interface. I use the JTAG interface with IAR systems and it works well, so I
guess there is no problem at all.
As for my computer desktop, unlike my desk, I don't like when it is a mess.
So I have cleaned all the downloads and install folders.
Note that you can put everything in a folder "DLEclipseMSPGCC" so that
if something goes wrong, you can reinstall without downloading again.
A big step for me, but a small one for humanity
Let's start with Eclipse.
Go to your eclipse root folder. The environment executable is called
"eclipse". Right-click eclipse and choose to set it in the start menu.
Now I have started eclipse, made a new project and added files of a
working project. I choosed LCDTest because it has no interruptions
(interrupt declaration is different in IAR and CCS, so it may also be
I have chosen a project that workd with CCE, so I try to do the same one
with MSPGCC. I tried to run, but nothing happens. Probably some
configuration needed. By the way, when I choosed "new project", I had no
option "managed project", so maybe what I did is wrong (see "managed
projects" above). Can anybody help me?
As for the configs, I have opened the properties:
- I choosed UTF-8 as the encoding because many people here are
Japanese and need a multilingual encoding fully compatible with ASCII.
- New text file delimiter... Don't know what it means.
2. Builders: left as it was.
3. C/C++ build.
Apparently there is nothing that can be changed in this window.
3.1 C/C++ build -> Discovery options
I don't know what I can change. Just in case, I changed the compiler
3.2 C/C++ build -> Environment
These are the paths. I didn't change them
3.3 C/C++ build -> Settings
I changed the compiler with the same value as previously
3.4 C/C++ build -> Tool chain editor
It says MinGW GCC, whatever it means. Apparently no option related to
3.5 C/C++ build -> Variables
4. C/C++ general.
Everything left as it was.
I tried to run, and it says what it used to: Launch failed no binaries.
Many people seem to use MSPGCC, and there are some tutorials around
on the net. However, there is a great lack of explanations. It looks like
every tutorial is made for people who already work with that kind of tools,
not for beginners.
I hope some of you will help me to complete my explanations in order to
make a fully working tutorial.
I will try other methods described on the net and try to report what works
(and also what does not).