Jump to content
43oh

Linux Toolchain for F5529


Recommended Posts

Hello everybody! This is my first post. I just got my MSP-EXP430F5529LP in the mail from TI, and I've been playing around with it a little trying to put together a development environment on Linux Mint (AKA Green Ubuntu). I've got an upcoming project course that uses MSP430s (something about biomechatronics), and I would like to get comfortable with the device before my courseload has me drinking three pots of coffee a day.

 

So far I've been able to get Energia to work, but I'd much rather write in C and set up some build commands in Geany to flash the microcontroller.

I've had some trouble setting up mspdebug to work with tilib (libmsp430.so missing and so on), so I tried to build TI's MSP debug stack as recommended. No joy - it seems that the system is unable to find the headers it needs, and various other errors (gave up on building hidapi too).

 

Since I've been able to get Energia to work, I know that I ought to be able to run mspdebug and control my device from the command line (none of this icky gui crap). Has someone here experienced similar difficulties with the F5529? I'd appreciate any advice about where to go from here.

Thanks!

Link to post
Share on other sites

Frida,

Did you compile libmsp430.so from one of the slac460.zip archives? If so, which one did you use? - I've noticed that there are a bunch of them (slac460x.zip, where x is in {a, c, i, f, g, h}).

 

Anyway, as far as I understand it, the MSP debug stack requires the following prereqs:

  1. Boost (I'm using the version from the repos)
  2. Hidapi
  3. Some other packages available from the repos - I think I've grabbed all of them.

I just managed to build hidapi from source using the main trunk of hidapi from the github repo instead of version 0.7.0 - worked like a charm. BUT, the readme file in slac450i asks for hid-libusb.o. Instead, the build script compiled something called libhidapi-libusb.la. Is the libtool archive equivalent to the .o file in this case - could I rename it, or do I have to muck with the makefiles? Any advice is appreciated.

 

Edit:

cd /

find -name "libmsp430.so"

 

points me to ~/Source/energia-0101E0012/hardware/tools/msp430/bin/libmsp430.so

 

I had no idea it would be that easy.

Link to post
Share on other sites

Huzzah!


~ $ sudo mspdebug tilib

 

Works for me. I now have access to my launchpad through mspdebug.

 

Is it possible to remove the need for root permission?

 

Thanks!

 

Edit:

 

libmsp430.so used to be part of the energia package. Is that not true any more?

 

It's true.

Link to post
Share on other sites

I just managed to build hidapi from source using the main trunk of hidapi from the github repo instead of version 0.7.0 - worked like a charm. BUT, the readme file in slac450i asks for hid-libusb.o. Instead, the build script compiled something called libhidapi-libusb.la. Is the libtool archive equivalent to the .o file in this case - could I rename it, or do I have to muck with the makefiles? Any advice is appreciated.

After 0.7.0 hidapi switched to autoconf/libtool. If you ever do want to rebuild libmsp430.so, use hidapi 0.7.0, which will produce the object file you need with the API the rest of the stack expects.

 

You may need to add -fPIC to the CFLAGS and CXXFLAGS settings in linux/Makefile.

Link to post
Share on other sites

pagibot, I'll try compiling hidapi-0.7.0 again with -fPIC when I get home from work.

 

When I first tried to compile it, I got a linker error that I didn't recognize:
 

libpthread.so.0: error adding symbols: DSO missing from command line

 

I made sure that I have libpthread-stubs0-dev installed. Other than that, I'm not sure what to do about it.

 

I started a thread on stackoverflow. If you think you can provide some insight, a response there might be more useful to more people.  :smile:

 

compiling using 'make CFLAGS="-fPIC"' doesn't change the error messages I receive from the compiler. I'm going to put compiling the libmsp430 shared object on the backburner for a little while.

Edited by CastleBravo
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...