Jump to content
xpg

Eclipse plugin for mspdebug and msp430-gcc

Recommended Posts

:) Failed as anything with eclipse so far.

An error occurred while configuring the installed items
session context was:(profile=PlatformProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Configure, operand=null --> [R]dk.xpg.msp430eclipse.toolchain.linux32.feature.feature.group 1.0.2.1, action=org.eclipse.equinox.internal.p2.touchpoint.natives.actions.ChmodAction).
The action chmod failed - file /usr/lib/eclipse/msp430-toolchain/linux-i386 does not exist

Some files missing from the 32bit toolchain ?

oppa@oppa-mag:~$ infobash -v3
Host/Kernel/OS  "oppa-mag" running Linux 3.1-0.slh.2-aptosid-686 i686 [ sidux 2010-01 ????? - kde-lite - (201006131622) ]
CPU Info        4x Intel Atom 330 @ 512 KB cache flags( sse3 ht nx lm ) clocked at [ 1600.179 MHz ]
Videocard       nVidia ION VGA  X.Org 1.11.1.901  [ 1920x1080@50.0hz ]
Network cards   nVidia MCP79
               Atheros AR9285 Wireless
Processes 152 | Uptime 5:01 | Memory 1076.2/1771.1MB | HDD WDC WD5000BEVT-2 Size 500GB (6%used) | GLX Renderer ION/PCI/SSE2 | GLX Version 3.3.0 NVIDIA 275.28 | Client Shell | Infobash v3.37

Share this post


Link to post
Share on other sites
:) Failed as anything with eclipse so far.

An error occurred while configuring the installed items
session context was:(profile=PlatformProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Configure, operand=null --> [R]dk.xpg.msp430eclipse.toolchain.linux32.feature.feature.group 1.0.2.1, action=org.eclipse.equinox.internal.p2.touchpoint.natives.actions.ChmodAction).
The action chmod failed - file /usr/lib/eclipse/msp430-toolchain/linux-i386 does not exist

Some files missing from the 32bit toolchain ?

 

Ahh, I have an idea what goes wrong. My guess is that you have eclipse installed by your distribution, and that you are installing the plugin as a regular user. As I need to install native binary files, I need somewhere to write this rather arbitrary data. Unfortunately, the most convenient way I have found is to install files to the installation root of Eclipse. I am looking for better ways to do this, but unfortunately there seem to be no straight forward solutions.

 

In order to get this working, your best bet is to download the Eclipse tarball directly from eclipse.org and extract it somewhere where you have write-permissions.

 

I'm sorry for the inconvenience, I'm still learning my way around Eclipse.

 

Cheers,

Paul

Share this post


Link to post
Share on other sites

I am running on Fedora 16 with Indigo.

I got the plugin installed by running Eclipse as root one time, so now I get things going.

I chose my processor from the list (an MCP430G2231), but when I go to build I get

Building file: ../main.c
Invoking: MSP430 C Compiler
msp430-gcc -O0 -g -Wall -mmcu=msp430g2231 -std=gnu89 -c -o "main.o" "../main.c"
cc1: MCU msp430g2231 not supported
Known MCU names:
  msp1
  msp2
  msp430x110
  msp430x112
  msp430x1101
  msp430x1111
  msp430x1121
  msp430x1122
  msp430x1132
  msp430x122
  msp430x123
  msp430x1222
  msp430x1232
  msp430x133
  msp430x135
  msp430x1331
  msp430x1351
  msp430x147
  msp430x148
  msp430x149
  msp430x1471
  msp430x1481
  msp430x1491
  msp430x155
  msp430x156
  msp430x157
  msp430x167
  msp430x168
  msp430x169
  msp430x1610
  msp430x1611
  msp430x1612
  msp430x2001
  msp430x2011
  msp430x2002
  msp430x2012
  msp430x2003
  msp430x2013
  msp430x2101
  msp430x2111
  msp430x2121
  msp430x2131
  msp430x2112
  msp430x2122
  msp430x2132
  msp430x2232
  msp430x2252
  msp430x2272
  msp430x2234
  msp430x2254
  msp430x2274
  msp430x233
  msp430x235
  msp430x2330
  msp430x2350
  msp430x2370
  msp430x247
  msp430x248
  msp430x249
  msp430x2410
  msp430x2471
  msp430x2481
  msp430x2491
  msp430x2416
  msp430x2417
  msp430x2418
  msp430x2419
  msp430x2616
  msp430x2617
  msp430x2618
  msp430x2619
  msp430x311
  msp430x312
  msp430x313
  msp430x314
  msp430x315
  msp430x323
  msp430x325
  msp430x336
  msp430x337
  msp430x412
  msp430x413
  msp430x415
  msp430x417
  msp430x423
  msp430x425
  msp430x427
  msp430x4250
  msp430x4260
  msp430x4270
  msp430xG4250
  msp430xG4260
  msp430xG4270
  msp430xE423
  msp430xE425
  msp430xE427
  msp430xE4232
  msp430xE4242
  msp430xE4252
  msp430xE4272
  msp430xW423
  msp430xW425
  msp430xW427
  msp430xG437
  msp430xG438
  msp430xG439
  msp430x435
  msp430x436
  msp430x437
  msp430x4351
  msp430x4361
  msp430x4371
  msp430x447
  msp430x448
  msp430x449
  msp430xG4616
  msp430xG4617
  msp430xG4618
  msp430xG4619
  msp430x4783
  msp430x4784
  msp430x4793
  msp430x4794
  msp430x5418
  msp430x5419
  msp430x5435
  msp430x5436
  msp430x5437
  msp430x5438
(null):0: confused by earlier errors, bailing out
make: *** [main.o] Error 1

**** Build Finished ****

 

Solved.

I had installed the toolchain in Fedora before doing the Eclipse integration. Putting /usr/lib64/eclipse/msp430-toolchain/linux-amd64/bin first in the $PATH, and /usr/lib64/eclipse/msp430-toolchain/linux-amd64/lib in $LD_LIBRARY_PATH seems to work.

Share this post


Link to post
Share on other sites

mymaestro: you should also be able to solve the problem by choosing the pre-build toolchain from the msp430 preferences in Eclipse, rather than the System Toolchain. If that does not work, please let me know.

Share this post


Link to post
Share on other sites

I got the plugin installed by running Eclipse as root one time, so now I get things going.

I chose my processor from the list (an MCP430G2231), but when I go to build I get

I could get it to install as without errors as root too. Now, the target selection page is empty, nothing, just a grey page. I don't want to bypass apt.

 

http://foto.arcor-online.net/palb/alben ... 643334.jpg

Share this post


Link to post
Share on other sites

I could get it to install as without errors as root too. Now, the target selection page is empty, nothing, just a grey page. I don't want to bypass apt.

 

You can easily install Eclipse in your home directory, or anywhere else without polluting /usr, /usr/local, etc. So it is perfectly safe to have, $HOME/opt/eclipse, for instance. But I do understand that you want to go through your distribution's regular channels. I'll try to fix it, but I can't really promise anything.

 

I do have a couple of questions which might help me remedy the situation: First, which version of Eclipse are you running? (if you don't know, you can just tell me your distribution name and version). 32 or 64 bit?

If you go to the properties of your project (right click the project and select "Properties"), and select MSP430 in the left-side pane. Is the page still blank?

 

Cheers,

Paul

Share this post


Link to post
Share on other sites

Hi,

 

it's aptosid = Debian sid with a different kernel, 32 bit.

Eclipse Platform

Version: 3.7.0
Build id: I20110613-1736

I've started eclipse from the command line and I get:

oppa@oppa-mag:~$ eclipse
Gtk-Message: Failed to load module "pk-gtk-module"

Google said this is provided by packagekit-gtk-module, which I've installed but still this error. I'm affraid the box is there but just invisible.

 

Anyway, I'll give $HOME install a try now.

 

Cheers,

Stephan

 

http://foto.arcor-online.net/palb/alben ... 616630.jpg

Edit: I've downloaded and installed the tarball to /home/oppa/bin/eclipse and set to use the precompiled toolchain. I get the target selction box now but it's still 'no worky'. When I hit the 'play' button I get

The selection can not be launched, and there are no recent launches

:!!!:

http://foto.arcor-online.net/palb/alben ... 613162.jpg

 

Edit2: OK, sorted. For whatever reason "File->New" did not assign this file to the project. It is building now but upload fails:

usbutil: unable to find a device matching 0451:f432

which is no surprise because:

Bus 004 Device 003: ID 0451:f430 Texas Instruments, Inc. MSP-FET430UIF JTAG Tool

Share this post


Link to post
Share on other sites

it's aptosid = Debian sid with a different kernel, 32 bit.

Eclipse Platform

Version: 3.7.0
Build id: I20110613-1736

I've started eclipse from the command line and I get:

oppa@oppa-mag:~$ eclipse
Gtk-Message: Failed to load module "pk-gtk-module"

Google said this is provided by packagekit-gtk-module, which I've installed but still this error. I'm affraid the box is there but just invisible.

 

I think that the message is harmless, but I really don't know. But I'll try to install Debian sid and try to reproduce and see if I can do anything about it.

 

http://foto.arcor-online.net/palb/alben ... 616630.jpg

Edit: I've downloaded and installed the tarball to /home/oppa/bin/eclipse and set to use the precompiled toolchain. I get the target selction box now but it's still 'no worky'. When I hit the 'play' button I get

The selection can not be launched, and there are no recent launches

:!!!:

http://foto.arcor-online.net/palb/alben ... 613162.jpg

 

Ahh, that's because you can't launch it like that. You have to go to the MSP430 menu and select "Upload to target", which should launch mspdebug to program your chip. However, mspdebug is currently always invoked with the rf2500 driver. It's not difficult to add a "Programmer Setting" to each project, but I wanted to figure the binary toolchain stuff out first.

 

Cheers,

Paul

Share this post


Link to post
Share on other sites
It's not difficult to add a "Programmer Setting" to each project, but I wanted to figure the binary toolchain stuff out first.

Well, obviously too difficult for me. Anyway, I've uploaded the binary using mspdebug in console. It does not what's supposed to do.


/*
* blinky149x.c
*
*  Created on: 27.11.2011
*      Author: oppa
*/
// eclipse blinky test
// 430F149 board (Itead)
// LEDs 1-4 at 6.7-6.4, low active

#include 

#define LED1	BIT7        // seems there is a space instead of a tab, could this fool eclipse ?
#define	LED2	BIT6
#define	LED3	BIT5
#define	LED4	BIT4

unsigned volatile int i;

void delay(void);

int main(void){

WDTCTL = WDTPW + WDTHOLD;

P6DIR |= LED1 + LED2 + LED3 + LED4;
P6OUT = 0xf0;

while(1){
	P6OUT|= LED2;
	P6OUT &= ~LED1;
	delay();
	P6OUT &= ~LED2;
	P6OUT |= LED1;
	delay();
	P6OUT &= ~LED3;
	P6OUT |= LED2;
	delay();
	P6OUT &= ~LED4;
	P6OUT |= LED3;
	delay();
	P6OUT &= ~LED3;
	P6OUT |= LED4;
	delay();
	P6OUT &= ~LED2;
	P6OUT |= LED3;
	delay();
}

return 0;
}

void delay(void){
for(i=0;i<27000;i++);
return;
}

Works with IAR, works with mspgcc from the command line but not with the binary eclipse built. LEDs stay dark.

 

Thanks for your hard work but it looks like I'm too numb to benefit from it.

 

Have a nice sunday,

Stephan :wave:

Share this post


Link to post
Share on other sites

...told ya I'm too numb :oops:

 

I've tried again using system tools and then found my mistake. I did upload the wrong binary. I was using ~/workspace/blinky149/main.elf, the right one is ~/workspace/blinky149/Debug/blinky149.elf.

 

Working fine with prebuilt and system tools. Only upload to target does not. :thumbup:

Share this post


Link to post
Share on other sites

I've tried again using system tools and then found my mistake. I did upload the wrong binary. I was using ~/workspace/blinky149/main.elf, the right one is ~/workspace/blinky149/Debug/blinky149.elf.

 

Working fine with prebuilt and system tools. Only upload to target does not. :thumbup:

 

Hmm... That's quite like interesting. The binary uploaded is the one indicated as the project's output artifact (I think it's called). How that becomes a different one when building and uploading is beyond me... But at least I am happy to hear that you have had some progress.

Share this post


Link to post
Share on other sites

Hi,

 

Thanks a lot for your work. It Works perfectly for me :thumbup:

But just with the LauchPad which USB PID is f432, did you planed to make it work with the EZ430-F2013 USB key which USB PID is f430 ?

I tried changing PID in /etc/udev/rules.d/90-launchpad. rules to make it work but without success :?

 

Regards,

David.

Share this post


Link to post
Share on other sites

Thanks a lot for your work. It Works perfectly for me :thumbup:

 

Thank you very much for that update. It's always good to hear that it works somewhere else than on my machines :clap:

 

But just with the LauchPad which USB PID is f432, did you planed to make it work with the EZ430-F2013 USB key which USB PID is f430 ?

I tried changing PID in /etc/udev/rules.d/90-launchpad. rules to make it work but without success :?

 

Yes, the goal is to make it support all devices which are supported by mspdebug. Currently, I have hardcoded all my calls to mspdebug to use the rf2500 driver, which effectively means that only Launchpad and Chronos are supported.

As far as I can see, the EZ430-F2013 needs the uif-driver for mspdebug. I will implement configuration of the mspdebug-connection in the next release, as it should be fairly trivial.

 

Cheers,

Paul

Share this post


Link to post
Share on other sites

I finally managed to get time to make a new release of the MSP430Eclipse plugin. As previously, it is available from http://eclipse.xpg.dk via the Eclipse "install new software" dialog. There are two major changes in this version:

First, mspdebug can now be configured such that other drivers than the rf2500 can be used. I have not tested this, as I only have a launchpad. Hopefully someone from this forum is willing to give it a spin, and let me know if it works or not.

The second improvement is with regards to debugging. It's now much simpler to configure the debugger, and the code behind is much cleaner.

 

I've recorded a small video to show how msp430eclipse is installed, and how it can be used to create, upload, and debug a small program:

 

Enjoy.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×