Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

st-flash: dyld: Library not loaded: /usr/local/lib/libusb-1.0.0.dylib #596

Closed
sstaub opened this issue Mar 25, 2016 · 15 comments
Closed

st-flash: dyld: Library not loaded: /usr/local/lib/libusb-1.0.0.dylib #596

sstaub opened this issue Mar 25, 2016 · 15 comments
Assignees
Labels
Milestone

Comments

@sstaub
Copy link

sstaub commented Mar 25, 2016

I can't upload code to my Seeeduino Arch Max. Here a screenshot with the error code. OS X 10.10.5
Last version of Plarformio, IDE and mbed framework. I can compile the code on the mbed online IDE.
upload seed arch max

@ivankravets ivankravets changed the title Can't upload code to seeeduino Arch Max ST Link doesn't work under Mac Mar 25, 2016
@ivankravets
Copy link
Member

Mac OS doesn't allow via GCC to build program with -static libs. Temporary solution:

  1. Install Homebrew
  2. $ brew install libusb

@ivankravets ivankravets changed the title ST Link doesn't work under Mac st-flash: dyld: Library not loaded: /usr/local/lib/libusb-1.0.0.dylib Mar 25, 2016
@sstaub
Copy link
Author

sstaub commented Mar 26, 2016

I installed libusb via macports, but it doesn't work.

@sstaub
Copy link
Author

sstaub commented Mar 26, 2016

Maybe that is problem with OS X yosemite.

@ivankravets
Copy link
Member

Please try brew

@sstaub
Copy link
Author

sstaub commented Mar 26, 2016

I installed with homebrew, but I get another error. The board has the last firmware installed.
upload error

@ivankravets
Copy link
Member

I've just rebuilt tool-stlink for Mac. Please download tool-stlink.zip manually. Unzip it. Replace with files in /Users/sstaub/.platformio/packages/tool-stlink.

If it works for you, I'll update package globally.

@ivankravets ivankravets self-assigned this Mar 27, 2016
@sstaub
Copy link
Author

sstaub commented Mar 27, 2016

It doesn't work, I get the same error again. Maybe that is a board specific problem. I can upload
to a STM32F303 Nucleo board without a problem.
I think on installation for mac, the 'libusb' should also installed.

@ivankravets ivankravets removed their assignment Mar 27, 2016
@ivankravets
Copy link
Member

@valeros do you have any ideas?

@sstaub
Copy link
Author

sstaub commented Mar 27, 2016

I think the upload must work like on other mbed boards like the Arch Pro. The code is uploaded to USB-drive 'mbed', It seems that the ST-Link don't use this way.

@ivankravets
Copy link
Member

Do you have mbed disk drive?

@sstaub
Copy link
Author

sstaub commented Mar 27, 2016

Yes. The board doesn't have an ST-Link debugger. See: http://www.seeedstudio.com/wiki/Arch_Max

@ivankravets
Copy link
Member

It looks strange because mbed should be used. See https://github.com/platformio/platformio/blob/develop/platformio/builder/scripts/ststm32.py#L106

Please contact me@ikravets.com with TeamViewer session.

@ivankravets
Copy link
Member

Fixed in bc3d8d2

@ivankravets ivankravets self-assigned this Mar 29, 2016
@ivankravets ivankravets added this to the 2.8.7 milestone Mar 29, 2016
@thinkyhead
Copy link
Contributor

thinkyhead commented Aug 4, 2021

Strangely, now seeing this with tool-dfuutil 1.9.200310 (on an M1).

dyld: Library not loaded: /usr/local/opt/libusb/lib/libusb-1.0.0.dylib

Unfortunately MacPorts is no help in the default install, due to it being ARM64-only:

> mkdir -p /usr/local/opt/libusb/lib
> sudo ln -s /opt/local/lib/libusb-1.0.0.dylib /usr/local/opt/libusb/lib/libusb-1.0.0.dylib

> file /opt/local/lib/libusb-1.0.0.dylib
/opt/local/lib/libusb-1.0.0.dylib: Mach-O 64-bit dynamically linked shared library arm64

And also unfortunate, this fails with Error: Failed to configure m4

> sudo port install libusb +universal

@ivankravets
Copy link
Member

Could you try brew install libusb?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants