energia / Energia

Fork of Arduino for the Texas Instruments LaunchPad's
http://energia.nu
Other
793 stars 673 forks source link

MSP430FR5969: Sketch Upload and Programmer Update Errors #371

Closed rei-vilo closed 9 years ago

rei-vilo commented 10 years ago

As for the MSP430F5529, the MSP430FR5969 requires an update of the programmer.

I'm using Energia 12 on Mac OS X 10.9.2.

capture 2014-04-14 a 20 22 15

Unfortunately, the Tools > Update programmer procedure fails

MSP430_GetNumberOfUsbIfs MSP430_GetNameOfUsbIf Found FET: usbmodem1411 MSP430_Initialize: usbmodem1411 version: -1 Starting firmware update (this may take some time)... FET firmware update is required. Initializing bootloader... Programming new firmware... 20 percent done 40 percent done 60 percent done 80 percent done 100 percent done 100 percent done Update complete Done, finishing... MSP430_VCC: 3000 mV MSP430_OpenDevice tilib: MSP430_OpenDevice: Unknown device (error = 5) tilib: device initialization failed

rei-vilo commented 10 years ago

Same problem on Windows 8: same OOPS and update error messages.

capture 2014-04-14 20-44-21

guoxiangyang commented 10 years ago

Not love yet?

me too!!!

robertinant commented 10 years ago

If this is the latest revision of the MSP430FR5969 LaunchPad (the one with Energy Trace on it) then it is not supported by Energia until we update the programmer DLL in the next release.

If the firmware update fails then it can take up to 3 tries to update the programmer. The reason for this is that there is a timeout in the dll (over which I have no control) that times out before the LaunchPad enumerates.

robertinant commented 10 years ago

p.s. I will add this as documentation in the getting started guide.

v-i-s-h commented 9 years ago

Hello I'm experiencing same problem in Ubuntu 14.04 with FR5969. Still not able to figure out any solution :(

spirilis commented 9 years ago

@v-i-s-h sadly Energia 13 didn't get the new EnergyTrace-enabled DLL; TI is working on coming up with an opensource release of the binary still, so hopefully an updated DLL will become available or the next release ships it.

rei-vilo commented 9 years ago

Even if the library (libmsp430.so or msp430.dll) requires an identification and an authorisation (as for the USB library for the TM4C), is it available?

It would be nice to download it and install it manually.

spirilis commented 9 years ago

CCS has the library and the latest "open source" slac460 download has the code where you can build the library. (Not sure why a build from that couldn't be bundled w/ Energia, but there may be more going on than I'm aware of.) Mspdebug 0.22 required IIRC.

SocalSam commented 9 years ago

Just got my boards and excitedly hooked them up, same issue. I guess the Sept. 5 2014 release didn't fix this problem with the Arduino. Checked TI and no joy there either. Sadly, this means that I will have to go with another solution. Oh well.

elpaso commented 9 years ago

Just got the replacement board. Sadly the new one doesn't work under latest energia nor with latest mspdebug under Linux Ubuntu 14.04 6bit

Stange enough, the original wolverine board (the old rev 1.6) I got with SHARP boosterpack works perfectly.

spirilis commented 9 years ago

Yeah, the DLL shipping with Energia is still way out of date (and pre-EnergyTrace). Robert indicated they're going to try and get the latest DLL with the next release. It's out of our hands for the most part... although I have compiled libmsp430.so under Fedora 64-bit and got it to work fine with mspdebug 0.22.

@elpaso If you want a copy of this libmsp430.so, see here: http://spirilis.net/junk/msp430/energia/libmsp430-so-slac460j.zip

elpaso commented 9 years ago

@spirilis thanks for the update. A makefile or build instructions for Linux 64bit would be highly appreciated.

spirilis commented 9 years ago

@elpaso You can see if you can get this working in Ubuntu (it is written primarily for Fedora but the prereqs should be available in Ubuntu with some hunting around from apt-cache search)

http://spirilis.net/junk/msp430/slac460j_build.zip

elpaso commented 9 years ago

@spirilis

thanks, I've successfully built libmsp430.so following the guide on http://www.colotronics.blogspot.com.ar/2014/08/msp430-toolchain-in-ubuntu-1404-with.html

mspdebug 0.22 now works fine with my LP MSP430FR5969 (I needed to launch it three times before completing the firmware update though):

The following script worked for me for libmsp430.so compilation:

#OPTIONAL TILIB v3 installation, for msp-fet430uif debugger, or newer microcontrollers/boards (see http://forum.43oh.com/topic/5706-use-mspdebug-to-upgrade-msp430fr5969/) ignore if you don't need it.
sudo apt-get install libudev-dev libfox-1.6-0 autotools-dev autoconf automake libtool libboost-all-dev
mkdir tilib
cd tilib
wget http://www.ti.com/lit/sw/slac460i/slac460i.zip

wget https://github.com/downloads/signal11/hidapi/hidapi-0.7.0.zip
unzip slac460i.zip
unzip hidapi-0.7.0.zip
cd MSPDebugStack_OS_Package/ThirdParty/
mkdir lib
mkdir include

cd ../../hidapi-0.7.0/linux/

#Edit makefile of hidapi

sed -i 's/CFLAGS   ?= -Wall -g/CFLAGS   ?= -Wall -g -fPIC/g' Makefile
sed -i 's/CXXFLAGS ?= -Wall -g/CXXFLAGS ?= -Wall -g -fPIC/g' Makefile
sed -i 's/LIBS      = `pkg-config libusb-1.0 libudev --libs`/LIBS      = `pkg-config libusb-1.0 libudev --libs` -lpthread/g' Makefile

#Build hidapi, copy to MSPDebugStack_OS_Package, and build libmsp430.so
make 2>&1 | tee mo
cp hid-libusb.o ../../MSPDebugStack_OS_Package/ThirdParty/lib
cp ../hidapi/hidapi.h ../../MSPDebugStack_OS_Package/ThirdParty/include
cd ../../MSPDebugStack_OS_Package/
make 2>&1 | tee mo
#Copy .so library to system path
sudo cp libmsp430.so /usr/local/lib
rei-vilo commented 9 years ago

With Energia 14 running on Mac OS X 101.0 Yosemite and a LaunchPad MSP430FR5969 rev. 2.0

There's no warning message.

version: 30301004 tilib: MSP430_OpenDevice: Unknown device (error = 5) tilib: device initialization failed

  • Programmer update, done 3x

MSPDebug version 0.20 - debugging tool for MSP430 MCUs Copyright (C) 2009-2012 Daniel Beer dlbeer@gmail.com This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

MSP430_GetNumberOfUsbIfs MSP430_GetNameOfUsbIf Found FET: usbmodem1411 MSP430_Initialize: usbmodem1411 version: 30301004 Firmware version is 30301004 MSP430_VCC: 3000 mV MSP430_OpenDevice tilib: MSP430_OpenDevice: Unknown device (error = 5) tilib: device initialization failed

There's a release 0.22 for MSPdebug available since 18 Jul 2013.

rei-vilo commented 9 years ago

Verbose output of sketch upload

/Applications/IDE/Energia.app/Contents/Resources/Java/hardware/tools/msp430/mspdebug/mspdebug tilib --force-reset prog /var/folders/5d/dky9xc691m32kztqnhkn8bhw0000gn/T/build7515253368519236117.tmp/Blink.cpp.hex

MSPDebug version 0.20 - debugging tool for MSP430 MCUs Copyright (C) 2009-2012 Daniel Beer dlbeer@gmail.com This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

MSP430_GetNumberOfUsbIfs MSP430_GetNameOfUsbIf Found FET: usbmodem1411 MSP430_Initialize: usbmodem1411 version: 30301004 Firmware version is 30301004 MSP430_VCC: 3000 mV MSP430_OpenDevice tilib: MSP430_OpenDevice: Unknown device (error = 5) tilib: device initialization failed

robertinant commented 9 years ago

You are still running the old tools. I uploaded the tools about 30 min after I closed the ticket. Please remove the build/macosx/msp430_tools_mac.zip, do ant clean build to fetch the new tools.

rei-vilo commented 9 years ago

Ok. I've proceeded with the procedure and now I have this error message:

/Applications/IDE/Energia.app/Contents/Resources/Java/hardware/tools/msp430/mspdebug/mspdebug tilib --force-reset prog /var/folders/5d/dky9xc691m32kztqnhkn8bhw0000gn/T/build8775360766045871018.tmp/Blink.cpp.hex dyld: Library not loaded: /opt/local/lib/libreadline.6.2.dylib Referenced from: /Applications/IDE/Energia.app/Contents/Resources/Java/hardware/tools/msp430/mspdebug/mspdebug Reason: image not found

Is the uploader compatible with Mac OS X.10 Yosemite?

There's a libreadline.6.dylib available under /usr/local/opt/readline/lib.

robertinant commented 9 years ago

Good catch!! My mistake, I omitted the WITHOUT_READLINE=1 on the commandline when compiling mspdebug. I'll recompile mspdebug and update the tools..

rei-vilo commented 9 years ago

Everything runs fine now. Thank you!