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

hid_bootloader_cli is based on rather older teensy_loader_cli #97

Open
osamuaoki opened this Issue Apr 2, 2017 · 3 comments

Comments

Projects
None yet
4 participants
@osamuaoki
Copy link

osamuaoki commented Apr 2, 2017

It seems teensy_loader_cli which your hid_bootloader_cli is forked from has been updated to accommodate newer arms with larger buffer allocation etc.

I updated newer teensy_loader_cli to accept LUFA firmware. (Unlike your current approach to try for both, I made USB ID choice to be deterministic. If compiled code is called as hid_bootloader_cli, it only works with LUFA firmware.

See it in the branched teensy_loader_cli repo

Also code itself is

I hope this patch set is more easy to track teensy code in future.

Osamu

@maqifrnswa

This comment has been minimized.

Copy link

maqifrnswa commented May 12, 2017

Thank you, this is helpful to me.
I get an error using LUFA's HID uploader on Marlin 3D Printer firmware:

./hid_bootloader_cli -mmcu=at90usb1286 -v /tmp/arduino_build_378673/Marlin.ino.hex
Teensy Loader, Command Line, Version 2.0
error reading intel hex file "/tmp/arduino_build_378673/Marlin.ino.hex"

that I don't get with teensy's newest version (or osamuaoki's version)

./teensy_loader_cli -mmcu=at90usb1286 -v /tmp/arduino_build_378673/Marlin.ino.hex
USB Vendor ID=0X16C0, Product ID=0X0478 **(THIS LINE IS IN OSAMUAOKI'S FORK)**
Teensy Loader, Command Line, Version 2.1
Read "/tmp/arduino_build_378673/Marlin.ino.hex": 70002 bytes, 53.8% usage
Unable to open device
@tenten8401

This comment has been minimized.

Copy link

tenten8401 commented Apr 17, 2018

I'd love to see this one fixed if possible since it's basically preventing me from flashing any .hex file I try with the HID bootloader on my Printrboard F5. I posted a $5 bounty on bountysource if anyone's interested in trying to work on this (or at least fix the error reading issue).

As maqifrnswa stated though, I don't see the issue on the newest teensy version of the loader.

Here's the hex file I'm trying to upload on my Printrboard: firmware.zip

If I'm just being dumb and doing something wrong here then please let me know.

./hid_bootloader_cli -mmcu=at90usb1286 /home/isaaca/Marlin/.pioenvs/printrboard_revf/firmware.hex
Teensy Loader, Command Line, Version 2.0
error reading intel hex file "/home/isaaca/Marlin/.pioenvs/printrboard_revf/firmware.hex"```
@tenten8401

This comment has been minimized.

Copy link

tenten8401 commented Apr 17, 2018

Alright, well I took the new Teensy Loader 2.1 and made a quick fix for it using the following from the current loader:

if (!libusb_teensy_handle)
	libusb_teensy_handle = open_usb_device(0x03eb, 0x2067);

I was able to flash my firmware successfully using it. Here's a gist of my changes: https://gist.github.com/tenten8401/9c575d95c483f64dbf9a378fc0cf9cfb

I'm sure it'll come in useful for someone, unless the main version gets some love.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment