-
-
Notifications
You must be signed in to change notification settings - Fork 104
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
Support Arduino Nano #1016
Support Arduino Nano #1016
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.
Really cool change. Thanks!
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.
I think it would make sense to include the nano board json for which this is all done and then we could also call #579 done.
I also would propose to set all other boards' retry value to 1 because we don't expect that a retry is required. So if it fails, it can fail fast
Json added, updated retries on the other boards. |
Once this merges we'll still need to update the firmware builds to build the nano firmware, update the vs project to include it in desktop builds, and I think that's it? |
Yeah, why not do that and then we can include the .hex file right away with this PR? and then this is really the complete nano support. |
i really would like to merge it but without the nano hex file it feels incomplete. |
Nano firmware PR: MobiFlight/MobiFlight-FirmwareSource#223 |
…enns/MobiFlight-Connector into multiple-baud-rate-flashing
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.
Mercy boocoo!
Fixes #579
This adds support for trying different baud rates when flashing a given board. It is primarily intended to resolve the "which baud rate should we use for a Nano" problem, but is done in a general fashion that could apply to any device that uses avrdude to flash.
Changes include:
-x attempts
command line parameter. (I pulled the x86 version of avrdude). We need this for nano flashing so we can reduce the attempts from10
to1
. Otherwise Nano flash failure takes way, way, way too long.TimeoutForFirmwareUpdate
property in the.board.json
file to remove a hard-coded timeout value I missed in the original .board.json implementationAttempts
property in the.board.json
file to control how many times avrdude should attempt connections to a boardBaudRate
property toBaudRates
(an array) in the.board.json
filesMigrate()
method on theBoard
object to ensure any random old.board.json
files that might exist will still workRunAvrDude()
to use theAttempts
property and to loop over theBaudRates
until one works. This really is the meat of the change to make this all work and is pretty small.The baud rates are attempted in the order they are listed in the
.board.json
file which makes it easy for us to prioritize a given baud rate. For the Nano we'll likely want to list115200
first and57600
second assuming the new, fast, bootloader is more common.Changes tested by @elral (both old and new Nanos) and Jamie (new Nano) and me (new Nano).