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

Esplora? #33

Open
xcvista opened this issue Jul 17, 2016 · 5 comments
Open

Esplora? #33

xcvista opened this issue Jul 17, 2016 · 5 comments

Comments

@xcvista
Copy link

xcvista commented Jul 17, 2016

I actually have an Arduino Esplora. I know that putting the Leonardo loader into it won't really affect it but what about an Esplora-specific version that still have the correct VID/PID?

@NicoHood
Copy link
Owner

You are free to recompile the source yourself. I will not recompile tons of firmwares, sorry. And having it look like a leonardo is not a real problem, as this is only in bootloader mode. If the sketch runs, you will see the device you set in the IDe (since the sketch uses its own usb core).

@xcvista
Copy link
Author

xcvista commented Jul 17, 2016

Is there any pointers on how to do that?

Or maybe make it easier by allowing setting build-time variables for VID and PID, which means a build script can quickly munch through a list and build a bunch of HoodLoader variants. Something like this:

#!/bin/bash
cat vidpid.txt | while read variant vid pid rest; do
    make clean
    make VID=$vid PID=$pid hoodloader_$variant.ihex
    mv hoodloader_$variant.ihex hoodloader_$variant_$vid_$pid.ihex
done

And the pidvid.txt file would incude three fields: variant (8u2 or 16u2 or 16u4 or 32u4), target USB VID and PID.

@NicoHood
Copy link
Owner

And you'd also need a name. This is a good idea. I do not know that much about makefiles, but if you have a script like this I'd merge it and possibly also recompile some more firmwares as you wish. I compiled all of them manually. I really like the idea!

@xcvista
Copy link
Author

xcvista commented Jul 18, 2016

So is there any pointers on how to modify your code into that flexible form? (hint: use -DVID=$(VID) -DPID=$(PID) in Makefiles to make the VID/PID seen as global #define's)

@NicoHood
Copy link
Owner

Just use those definitions:
https://github.com/NicoHood/HoodLoader2/blob/master/avr/bootloaders/HoodLoader2/makefile#L44

The names are found inside the code (for leonardo etc) but you can pass real values in the makefile as far as i remember. The rest is a matter of makefile knowledge. Maybe you need to modify the makewile with a ?= so you can overwrite the values.

@NicoHood NicoHood reopened this Jul 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants