Jump to content
xpg

Eclipse plugin for mspdebug and msp430-gcc

Recommended Posts

Using Juno release (Android SDK), I installed the MSP430 plugin and found the config page in Eclipse main preferences to configure the path to the tools ... so far so good, although adding WDTCTL = WDTPW | WDTHOLD throws some errors that all 3 of those symbols aren't known. I did select the target processor (G2553). Only using #include in my app .... do I have to add #include to make that work?

Share this post


Link to post
Share on other sites

I take that back, after doing Save All it seemed to refactor and the errors cleared. Going to try uploading in a minute...

---

Looks like it works! Using the MSP430 > Upload to target and I get a blinking LED.

Might have to change my (VI + mspgcc + mspdebug) workflow now!

Thanks for all your hard work with this!

Share this post


Link to post
Share on other sites
I take that back, after doing Save All it seemed to refactor and the errors cleared. Going to try uploading in a minute...

---

Looks like it works! Using the MSP430 > Upload to target and I get a blinking LED.

Might have to change my (VI + mspgcc + mspdebug) workflow now!

Thanks for all your hard work with this!

 

I'm glad to hear that things worked out.

Please share your experiences with the plugin once you've worked a bit more with it.

 

Best regards,

Paul

Share this post


Link to post
Share on other sites

Thanks to Joseph Landry (jolan), a Mac OS X toolchain is available for msp430eclipse: msp430-toolchain-mac_os_x-x86_64-2.2.tar.bz2.

So, if you have a Mac, please test-drive msp430eclipse and Joseph's toolchain and let me know how it works.

 

Hm - the toolchain gcc complains about system libraries being too old... MacOS X 10.6 here. I guess the toolchain was built on / for 10.7?

 

I tried the toolchain installer from http://code.google.c.../osx-launchpad/, but the resulting installation is not recognized by the MSP430 Tool Manager. What information does the plugin look at to detect a valid toolchain subtree?

 

hauke

Share this post


Link to post
Share on other sites

Hm - the toolchain gcc complains about system libraries being too old... MacOS X 10.6 here. I guess the toolchain was built on / for 10.7?

 

I tried the toolchain installer from http://code.google.c.../osx-launchpad/, but the resulting installation is not recognized by the MSP430 Tool Manager. What information does the plugin look at to detect a valid toolchain subtree?

 

Not much, really. There needs to be a file named tool.info, which contains some basic information about the binaries provided and how to launch them. I've done this to allow mspdebug, gdb, and gcc to be provided by different packages.

 

Example of the file:

id=dk.xpg.toolchain.linux.amd64.2.2
name=xpg.dk pre-build toolchain 2.2
os=linux
arch=amd64
toolsProvided=msp430-gdb,mspdebug,msp430-gcc,msp430-ar
mspdebug=bin/mspdebug-wrapper
msp430-gdb=bin/msp430-gdb-wrapper
msp430-gcc=bin/msp430-gcc-wrapper
msp430-ar=bin/msp430-ar-wrapper

 

It should be fairly trivial to adept the above for your purposes. Alternatively, you can go to the Eclipse preferences (Window -> Preferences menu) and select "MSP430" in the left-side pane. Here you can choose the location of gcc, gdb, ar, mspdebug, and make directly. Just select "System Tools" from the drop-down list, and browse for the binary.

 

Let me know how it works out.

Share this post


Link to post
Share on other sites

There needs to be a file named tool.info, which contains some basic information about the binaries provided and how to launch them.

 

Blending your example and the tools.info that comes with msp430-toolchain-mac_os_x-x86_64-2.2.tar, I came up with

 

id=dk.xpg.toolchain.mac os x.x86_64.20111001
name=osx-launchpad for MacOS X toolchain 20111001
os=mac os x
arch=x86_64
toolsProvided=msp430-gdb,mspdebug,msp430-gcc,msp430-ar
mspdebug=bin/mspdebug
msp430-gdb=bin/msp430-gdb
msp430-gcc=bin/msp430-gcc
msp430-ar=bin/msp430-ar

 

which is recognized in the MSP430 ToolManager, but the variables set don't seem to make it into the MSP configuration. Unfortunately, there is not much feedback from the ToolManager window, so I don't really know what I am doing.

 

I assume the "id" field has to have something with dk.xpg in it? What are the allowed/expected values for "os" and "arch"?

 

Alternatively, you can go to the Eclipse preferences (Window -> Preferences menu) and select "MSP430" in the left-side pane. Here you can choose the location of gcc, gdb, ar, mspdebug, and make directly.

 

I did that in the end, and it appears to work. I got a linker error (reference to non-existing putchar) when building "Hello World", but that is probably because the MSP430 doesn't really have a stdio library. You can tell I am fairly fresh to the MSP430. ;-)

Share this post


Link to post
Share on other sites

Blending your example and the tools.info that comes with msp430-toolchain-mac_os_x-x86_64-2.2.tar, I came up with

 

id=dk.xpg.toolchain.mac os x.x86_64.20111001
name=osx-launchpad for MacOS X toolchain 20111001
os=mac os x
arch=x86_64
toolsProvided=msp430-gdb,mspdebug,msp430-gcc,msp430-ar
mspdebug=bin/mspdebug
msp430-gdb=bin/msp430-gdb
msp430-gcc=bin/msp430-gcc
msp430-ar=bin/msp430-ar

 

which is recognized in the MSP430 ToolManager, but the variables set don't seem to make it into the MSP configuration. Unfortunately, there is not much feedback from the ToolManager window, so I don't really know what I am doing.

 

Yeah, I know, it's not exactly trying to help you, sorry about that. If you like I can look more into it, but if you are happy with the other solution, I'll leave it right now.

 

I assume the "id" field has to have something with dk.xpg in it? What are the allowed/expected values for "os" and "arch"?

 

"id" can be anything, as long as it is unique. os and arch are according to Java. I'll get back to you on the valid values at a later point.

 

I did that in the end, and it appears to work. I got a linker error (reference to non-existing putchar) when building "Hello World", but that is probably because the MSP430 doesn't really have a stdio library. You can tell I am fairly fresh to the MSP430. ;-)

 

Sounds like it is working for you. As far as I remember, there is no putchar, so you are most likely right.

If you need any further help with that, you can just start a new thread and I'm quite sure a lot of people are ready to help.

 

Best regards,

Paul

Share this post


Link to post
Share on other sites

Had to register here to say thanks for this great plugin!

Got debugger working in 12.10 Ubuntu, with your pre-compiled x64 binaries - I'm very happy to ditch the windows tool

Share this post


Link to post
Share on other sites
Had to register here to say thanks for this great plugin!

Got debugger working in 12.10 Ubuntu, with your pre-compiled x64 binaries - I'm very happy to ditch the windows tool

 

I'm very happy to hear that. It's always nice to hear that someone is using the plugin and happy about it :-)

 

 

Share this post


Link to post
Share on other sites

Hm - the toolchain gcc complains about system libraries being too old... MacOS X 10.6 here. I guess the toolchain was built on / for 10.7?

 

I tried the toolchain installer from http://code.google.c.../osx-launchpad/, but the resulting installation is not recognized by the MSP430 Tool Manager. What information does the plugin look at to detect a valid toolchain subtree?

 

hauke

You are right , it is built on 10.7.

you may want to build it using this script (it's xpg's script for linux, slightly modified for MacOS) :

https://www.dropbox.com/s/c6z5xivt4eeq86g/build.sh

you need macport.

 

unfortunately , there is no check for the OS version yet in mspeclipse.

Share this post


Link to post
Share on other sites

**** Build of configuration Debug for project sample ****

 

E:\Bharadwaaj\toolchain\msp430-toolchain-win-x86-2.0\bin\mingw32-make all

Building file: ../main.c

Invoking: MSP430 C Compiler

E:\Bharadwaaj\toolchain\msp430-toolchain-win-x86-2.0\bin\msp430-gcc -O0 -g -Wall -mmcu=msp430g2553 -std=gnu89 -c -o "main.o" "../main.c"

cygwin warning:

MS-DOS style path detected: C:\Documents and Settings\Subramanyam\indigowork\sample\Debug

Preferred POSIX equivalent is: /cygdrive/c/Documents and Settings/Subramanyam/indigowork/sample/Debug

CYGWIN environment variable option "nodosfilewarning" turns off this warning.

Consult the user's guide for more details about POSIX paths:

http://cygwin.com/cygwin-ug-net/using.html#using-pathnames

/usr/bin/sh: E:Bharadwaajtoolchainmsp430-toolchain-win-x86-2.0binmsp430-gcc: command not found

mingw32-make: *** [main.o] Error 127

 

 

 

The above is the error am getting for compiling a program. I appreciate any help from experts thank you

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...