energia / Energia

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

OS X 10.11 — Energia 1.6.10E18 fails to upload to MSP430G2553 #938

Open steeley opened 7 years ago

steeley commented 7 years ago

This version produces an error when trying to upload a sketch(launchpad 1.5 board):

An error occurred while uploading the sketch dyld: Library not loaded: /opt/local/lib/libusb-0.1.4.dylib Referenced from: /Users/ian/Downloads/Energia.app/Contents/Java/hardware/tools/msp430/bin/mspdebug Reason: image not found

Sketches can be uploaded to this board if I use an old Energia (101e015).

rei-vilo commented 7 years ago

Which OS please?

steeley commented 7 years ago

Sorry forgot to say: OSX 10.11.6

rei-vilo commented 7 years ago

Which MSP430 exactly?

I have no issue uploading on macOS Sierra.

steeley commented 7 years ago

MSP 430g2553. Why is it looking for an old libusb library?? I can upload to a new 432 board with the new Energia, so that works.

rei-vilo commented 7 years ago

MSP430G2553 uses the old mspdebug while MSP432 relies on DSLite.

Both work for me.

steeley commented 7 years ago

But this does not explain why the older version of Energia DOES work ok and the new version fails!

rei-vilo commented 7 years ago

As said before, uploading to the MSP430G2553 works fine for me with Energia 18 on macOS Sierra.

Please provide a copy of the trace with the message for the error.

steeley commented 7 years ago
Sketch uses 760 bytes (4%) of program storage space. Maximum is 16,384 bytes.
Global variables use 20 bytes (3%) of dynamic memory, leaving 492 bytes for local variables. Maximum is 512 bytes.
/Users/ian/Downloads/Energia.app/Contents/Java/hardware/tools/msp430/bin/mspdebug rf2500 --force-reset prog /var/folders/t0/vvzmr4l91jvdq7b2nkxb3cgm0000gn/T/build934c897db08bb52eb726f454b68c7bff.tmp/Blink.ino.hex 
dyld: Library not loaded: /opt/local/lib/libusb-0.1.4.dylib
An error occurred while uploading the sketch
  Referenced from: /Users/ian/Downloads/Energia.app/Contents/Java/hardware/tools/msp430/bin/mspdebug
  Reason: image not found
rei-vilo commented 7 years ago

See the instructions at Setup Energia on Mac OS X

MSP-EXP430G2 and MSP-EXP430FR5739 LaunchPad

  • Download the LaunchPad drivers for Mac OS X: LaunchPad CDC drivers zip file for Mac OS X. This driver has been signed and works on Mac OS X 10.x (Yosemite).
  • Unzip and double click MSP430LPCDC 1.0.3b-Signed.pkg
  • Follow the instructions.
steeley commented 7 years ago

Tried this, exactly the same result... Old version of Energia uploads, new one doesn't. Same error message.

rei-vilo commented 7 years ago

Strange. Please open a Terminal window and launch

$ /Applications/IDE/Energia.app/Contents/Java/hardware/tools/msp430/bin/mspdebug --version
MSPDebug version 0.23 - debugging tool for MSP430 MCUs
Copyright (C) 2009-2015 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.
Chip info database from MSP430.dll v3.3.1.4 Copyright (C) 2013 TI, Inc.
steeley commented 7 years ago

/Energia.app/Contents/Java/hardware/tools/msp430/bin/mspdebug --version -bash: ./Energia.app/Contents/Java/hardware/tools/msp430/bin/mspdebug: No such file or directory

BUT: If I look at the old Energis (v15): macybookPro-2:~ ian$ cd /Applications/Energia15.app/Contents/Resources/Java/hardware/tools/msp430/mspdebug macybookPro-2:mspdebug ian$ ls libmsp430.dylib mspdebug macybookPro-2:mspdebug ian$ ./mspdebug --version MSPDebug version 0.22 - debugging tool for MSP430 MCUs Copyright (C) 2009-2013 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. macybookPro-2:mspdebug ian$

I do not have libusb - and I see nothing in the instructions about installing it. The error seems to be generated by this missing file: dyld: Library not loaded: /opt/local/lib/libusb-0.1.4.dylib

rei-vilo commented 7 years ago

Open the folder Energia.app and go down to mspdebug.

If necessary, reinstall Energia.

steeley commented 7 years ago

Reinstalling Energia makes absoulutely no difference.

steeley commented 7 years ago

OK.... I downloaded the previous version of Energia (17) and copied mspdebug and libmsp430.dylib into Energia18.app/Contents/Java/hardware/tools/msp430/bin/mspdebug and it now works ok.

So the problem is definitely with the version of mspdebug in 018.

mspdebug --version now shows: "MSPDebug version 0.22 - debugging tool for MSP430 MCUs"

robertinant commented 7 years ago

Attached is the right version of mspdebug that does not rely on libusb-0.1.4.dylib. mspdebug.zip

  1. unzip
  2. Control click Energia.app and select "Show Package Content"
  3. Browse to Contents/Java/hardware/tools/msp430/bin/
  4. Drag the unzipped mspdebug into that folder
cyoung commented 7 years ago

I got the same error as @steeley under the same conditions (except on macOS Sierra - 10.12.1).

The mspdebug.zip fix by @robertinant resolved the issue for me.

wchundak commented 7 years ago

Had same issue with Energia R18 and libusb-0.1.4.dylib on MacOS Sierra 10.12.2. Thanks @robertinant for fix!

worayoot commented 7 years ago

Thanks to @robertinant ^-^

rossb93 commented 7 years ago

Same issue on Sierra 10.12.2. @robertinant fix did the trick

rpilotte commented 7 years ago

Still the same issue on Sierra 10.12.3 with Energia 1.6.10E18. Thanks to @robertinant for the workaround!

gagath commented 7 years ago

Same issue on El Captain 10.11.6 with Energia 1.6.10E18. The @robertinant workaround worked too.

indirtwetrust commented 7 years ago

Thank You @robertinant !!!! I made an account just to comment and thank you for this solution. I've been loading Energia sketches through CCS, kind of a pain.

buffstop commented 7 years ago

Thanks to @robertinant

IdlePhysicist commented 6 years ago

Yosemite 10.10.5 with Energia 1.6.10E18 has this problem. @robertinant sadly your fix didn't work, I am unsure why though!

peterjbaylis commented 6 years ago

thanks @robertinant your fix worked for me on OSX 10.13.5

mringwal commented 6 years ago

thanks for providing a workaround.

Following up: It would be great to add the solution to the Mac install guide or at least link to this thread in guide. Otherwise, every new user will: follow the instructions, fail, and haves to rely on Google to find a solution for me.