-
Notifications
You must be signed in to change notification settings - Fork 403
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
Add support for AVR-USB-MCU-families ATmegaXYu2/4/6 and AT90USBXYZ6/7 eg. Arduino Uno USB-MCU / Micro #327
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty nice. Very clean and "contained."
Would you add spacing in Makefile.isp comment:
LOCKFUSE ?=3f# = APP protect mode 1, BL protect mode 1
Also, the PR shows a bunch of .hex files moved to a hexfiles directory, but I don't see any changes to the makefiles that would have moved them there, nor the creating of the hexfiles directory, I suspect this was due to an overzealous "commit"; since current "policy" is that the Optiboot "parent" trunk deprecate the inclusion of .hex files (except for a few legacy files), could you fix this?
2dbcfc9
to
0adef43
Compare
Thank you for this compliment. By the way it is possible to enter a space before "3f" but not afterwards, which would result avrdude to fail reading the fuses
Furtermore I tried to add a .gitignore file to prevent developers from getting the same issue like me. But unfortunately the pattern does not seam to match. Cleaning git's cache (git rm -r --cached) and re-adding the files afterwards (git add .) didn't solve the issue for me. |
|
I'm not sure how to undo the hexfiles changes either. Would it bother you if I committed your patches manually instead of via the PR? |
Add support for AVR-USB-MCUs
f6a40cc
to
5dc3bd3
Compare
Sorry for being so stupid for writing a pull request before cleaning my history. Since I liked to have my commits very clean to ensure them to be included directly, I revised my work. The reference to the optiboot fork with RS485 was a great tip, I'll have a close look at it. Until now I think it looks very nice, but there is a lot of code overhead. Finally thank you very much for helping me to improve my git commits. |
Thanks for merging. In my modified version the legacy hexfiles are kept as fallback. |
Hmm. The calculations of the .text address for the large USB microcontrollers seems a bit suspect. I'd rather not have a 2k bootloader at all, until it's actually needed (is there a reason for this?) (Detected while working on setting .text start from the io.h FLASHEND definitions... No need to provide a patch; just an explanation...) |
Extended Optiboot functionality to support ten AVR-USB-MCUs:
The Makefile.usbmcus written by me supports the following parameters:
To distinguish the files after compiling the parameters are represented in the filename!!!
Additionaly I adopted the automakefile created by MCUdude https://github.com/MCUdude to compile all USB-MCUs with selected parameters.
Note: All testing was done with gcc version 5.4. Optiboot for usb-mcus was compiled for and uploaded to Arduino Micro (ATmega32u4) by me only. Other versions haven't been tested so far, but should work too, since the microcontrollers are very similar.
Furthermore I resolved the issues regarding to atmega32u4 support mentioned in #132.
THANKS to dmjlambert https://github.com/dmjlambert for contributing his working atmega32u4 variant
Although it was based on an old version of optiboot from 2015, it was very helpful in creating and extending optiboot to support all 8-bit AVR-USB-MCUs.