First install report

Your experiencees, problems and recipes for MSPGCC + Eclipse install.

First install report

Postby pascal » Fri Aug 10, 2007 1:32 pm

Dear readers,

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.

http://msp430.squaredpad.com/archives/101

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
together).
- 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.

Install MSPGCC
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.

Install Eclipse
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
http://java.sun.com/javase/downloads/index_jdk5.jsp 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.

Install Eclipse
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
of this.

Managed projects
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
explanation.

JTAG drivers
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.

Cleaning
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
different here).
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:
1. Resources:
- 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
to MSPGCC.
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
E:\mspgcc\bin\msp430gcc.exe
3.4 C/C++ build -> Tool chain editor
It says MinGW GCC, whatever it means. Apparently no option related to
MSPGCC.
3.5 C/C++ build -> Variables
Left empty
4. C/C++ general.
Everything left as it was.

I tried to run, and it says what it used to: Launch failed no binaries.

(temporary) Conclusion
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).

Thanks,

Pascal
pascal
Site Admin
 
Posts: 231
Joined: Sun Mar 04, 2007 11:47 am

Postby THLN » Fri Aug 10, 2007 6:02 pm

Hello, everybody ! I use Eclipse & MSPGCC since 2 years (Windows version).

Today, I update my version of Eclipse (3.2.1) to the last one (Eclipse-Europa)

Download it at this link :
Eclipse IDE for C/C++ Developers - Windows (62 MB)

Download it at this link :
MSPGCC plugin

Download it at this link :
GCC toolchain for MSP430 : mspgcc-20070216.exe


Installation of GCC toolchain for MSP430 : launch the mspgcc-20070216.exe and follow the installation procedure.

Installation of Eclipse & MSPGCC plugin :
Unzip “eclipse-cpp-europa-win32.zip” to your directory
Ex : C:\Eclipse-Europa
Unzip net.sf.mspgcc.zip and paste plugin directory contents to the C:\Eclipse-Europa\plugins

Launch Eclipse ...

For the french and others look -> http://thln47.free.fr/
THLN
 
Posts: 3
Joined: Tue Aug 07, 2007 4:49 pm
Location: France

Postby pascal » Sun Aug 12, 2007 1:57 pm

Hello!

It sounds we will get closer to a working solution.
However, I have the impression that upgrading might be easy (since
you have already a working environment), but a fresh install is not that
simple, or at least, many issues remain unexplained.

I have tried THLN's explanation (written in french at the following URL).

The big advantage is that the installation process looks simpler.

1. Test of MSPGCC
The explanation says:
- go to MspGCC\examples\leds
- run msp430-make all

You should obtain this:
Image

But I get this:

Image

So it sounds it depends on what is already installed. Do I need to install
CygWin? (just because of the "cygdrive" of the beginning of the path...).

1. Test of Eclipse

I have installed the so called "eclipse Europa".
I could verify that I have the same screen copies as in THLN's
explanation) until setup of a new
workspace and project.
However, when creating the project, I get a warning in the IDE.
It does not change after configuration of the target.
And it does not compile.

Here is a capture of my results:

Image

So, in all this mess, there are some good news, the environment seems
to run, and creating a project is possible. However, there is an issue about
the "external scanner info", whatever it is.

If anybody has installed it, please feel free to post your comments,
recipes, etc. I hope THLN will be back on this site soon!

Thanks.

Pascal
Last edited by pascal on Sun Oct 07, 2007 4:38 pm, edited 1 time in total.
pascal
Site Admin
 
Posts: 231
Joined: Sun Mar 04, 2007 11:47 am

Postby THLN » Wed Sep 12, 2007 2:01 am

I suppose that you have to try to reinstall MSPGCC !

You don't need to install Cygwin! A runtime version is already integrated with MSPGCC for Windows: cygwin1.dll, cygintl-2.dll,…

Check the PATH (it seems however correct) because msp430-make correctly launches out

Command generated by Makefile :
“msp430-gcc –mmcu=msp430x1101 –O2 –Wall –g –c –o main.o main.c”
1) Try to lanch this command in a shell !

2) Try to lanch the msp430-make with debug parameters get more informations:
“msp430-make --debug all”

3) Try to launch this command : “Msp430-gcc –v”
You must obtain this:

Reading specs from /cygdrive/d/Msp/MspGCC/bin/../lib/gcc-lib/msp430/3.2.3/specs
Configured with: ./configure --target=msp430 --prefix=/f/prog/msp430/sf/packagin
g/build/installed --disable-nls
Thread model: single
gcc version 3.2.3


A+, Thln
THLN
 
Posts: 3
Joined: Tue Aug 07, 2007 4:49 pm
Location: France


Return to MSPGCC & Eclipse

Who is online

Users browsing this forum: No registered users and 1 guest

cron