Closed NicoHood closed 8 years ago
Also One question: Why does the HID Bootloader has no manufacturer string etc? Is this a matter of code size? I'd rather add it to make it more complete in my version.
Great @NicoHood - I'll close this issue to keep things tidy (but feel free to continue the discussion, I still read comments on all issues) since the PR supersedes it.
Yes, the manufacturer string was removed to save space. I need to re-check with the latest code across all devices, but at least a while ago I was only barely fitting it into the 2KB allotted on the smaller 2 series (ATMEGA*U2
, AT90USB*2
) devices.
With avr-gcc 5.3 and lto it fits FYI: https://github.com/NicoHood/AVR-Development-Environment-Script
Before you merge the PR, just a little note: It would make sense to also apply this patch to the code, as it reduces the code even more: https://github.com/NicoHood/SecureLoader/commit/afda49c36788595e0c3f2e61a35b3e0dfdecf209
Also a do while loop in the main function would improve the loop a tiny bit.
Event though I copied clock_prescale_set(clock_div_1);
from the CBC bootloader, is it really required? Why was this used?
This is also wrong: https://github.com/abcminiuser/lufa/blob/master/Bootloaders/HID/Descriptors.c#L178
Edit: Fix merged!
BTW: I would not close this issue until the PR is merged. But I need some more time for the PR to compare what I've changed in my own Project.
This patch should also be applied to allow the start bootloader command to be successful recognized by the host: https://github.com/abcminiuser/lufa/commit/e3988f19dda2345032f575f31f275693571d9267
Edit: moved to https://github.com/abcminiuser/lufa/issues/116
I tried the c program which seems to work now. However I got serious bootloader problems now:
The sketch will not load. It seems to be a magic key problem but I noticed several weird errors. It must be something simple i guess? I even tried a fixed bootkey address which the arduino team uses:
But only the first led goes on.
Edit: The leds were off because of my wrong bootkey address "fix". The problem was something different, see PR #77