-
Notifications
You must be signed in to change notification settings - Fork 153
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
Uploading code to ARM MCU's from OSX #11
Comments
Hi vishnubob, I can confirm you that it is possible to uploading code on Teensy3.0 on OSX as I do it. |
You probably do not need to modify the teensy_loader_cli repository. Now, IMHO, since Paul refers to use Linux, I think that the best thing to use the most maintained and updated code is to use the code that is meant for linux by using Libusb on your OSX. |
It is incredibly easy, if you do it with brew. Do you know brew ? If yes brew install libusb-compat If no then you can check it out here http://brew.sh (there are different libusb available, 0.1 and 1.0, but libusb-compat is exactly what you need as it gives you the interface of 0.1, which is used by the teensy loader code, but using the engine of the latest and more maintained and available 1.0 version. compat stands for compatibility in this case ) |
Then in the Makefile you actually want to leave OS ?= LINUX and NOT Because what OS ?= LINUX already does is setting for you:
|
If too verbose, here is a recap for you:
it should do give you the binary that you request, just tested on OSX Yosemite :D 👍 |
[the following is over the scope of your question question, please ignore if you are ok with the process above or other answers will solve your problem] go get github.com/neonsoftware/teeloader you get a compiled and created binary of the loader on linux, osx, and win (did not check on every every architecture) at $GOPATH/bin/teeloader-cli of your system The project is just a quite bare golang wrapper around this repo that includes compilation and dependencies to provide cli binaries using the golang compilation system. Note :
|
Teensy 3.0, 3.1 and LC implement buffering, where a USB stall indicates not ready. Previously a stall indicated error. Now, an error needs to be treated as "not ready" and a retry-and-timeout approach needs to be used. If you look at the 4 sets of code, you'll see the retry and timeout was added on the Linux libusb code. The Mac IOkit, Windows WIN32 and BSD versions simply abort on the first error, rather than implementing tries and a timeout. |
Hardly anyone uses this command line tool on platforms other than Linux, so reworking the other 3 sets of USB code is pretty much at the bottom of my priority list... meaning it'll probably never happen. |
Hi Paul (et al). Thanks for the Teensy project, the hardware combined with the libraries are an outstanding contribution to the maker community.
I would like to modify the command line tool to support uploading code to a Teensy3.0 on OSX. The documentation states this is only possible for Linux, and before I start digging through the code, I was wondering if you could explain why this is. Is there something special about the boot loader and/or the USB libraries on Linux?
The text was updated successfully, but these errors were encountered: