-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add support for pluggable discovery #426
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
Conversation
Memory usage change @ d2832a6
Click for full report table
Click for full report CSV
|
d2832a6
to
9e80e07
Compare
Memory usage change @ 3054e8e
Click for full report table
Click for full report CSV
|
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.
It looks good to me.
I tried it out on a Mega with Ethernet Shield by using the ArduinoOTA
library in combination with the supplemental my_boards:avr
platform, to which I made the equivalent modifications:
diff --git a/avr/boards.txt b/avr/boards.txt
index cfbd79a..21bfde8 100644
--- a/avr/boards.txt
+++ b/avr/boards.txt
@@ -19,2 +19,4 @@ mega.pid.5=0x0242
mega.upload.tool=arduino:avrdude
+mega.upload.tool.serial=arduino:avrdude
+mega.upload.tool.network=arduino:arduino_ota
mega.upload.protocol=arduino
@@ -43,2 +45,4 @@ badio.name=Badio 1284p (Optiboot)
badio.upload.tool=arduino:avrdude
+badio.upload.tool.serial=arduino:avrdude
+badio.upload.tool.network=arduino:arduino_ota
badio.upload.protocol=arduino
@@ -67,2 +71,4 @@ badio_sd.name=Badio 1284p (SD boot)
badio_sd.upload.tool=arduino:avrdude
+badio_sd.upload.tool.serial=arduino:avrdude
+badio_sd.upload.tool.network=arduino:arduino_ota
badio_sd.upload.protocol=stk500
@@ -92,2 +98,4 @@ uno_bob.name=Uno/Nano/Mini (Big Optiboot)
uno_bob.upload.tool=arduino:avrdude
+uno_bob.upload.tool.serial=arduino:avrdude
+uno_bob.upload.tool.network=arduino:arduino_ota
uno_bob.upload.protocol=arduino
diff --git a/avr/platform.txt b/avr/platform.txt
index 597527c..4255f30 100644
--- a/avr/platform.txt
+++ b/avr/platform.txt
@@ -4,3 +4,5 @@ recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" -O binary {co
-tools.avrdude.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password password -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b
+tools.avrdude.upload.network_pattern="{tools.arduino_ota.cmd}" -address {serial.port} -port 65280 -username arduino -password password -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b
+
+tools.arduino_ota.upload.pattern="{cmd}" -address {upload.port.address} -port 65280 -username arduino -password password -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b
but that test didn't actually use much of anything from this PR, since arduino:avr
doesn't work with the ArduinoOTA library out of the box. It would be best to try it out with the Uno WiFi (NOT Rev2), since that was the whole reason the network upload capability was added to arduino:avr
in the first place. Unfortunately, I don't have that board. If someone else has one, please give it a try with Arduino CLI.
3054e8e
to
5d74fcc
Compare
5d74fcc
to
c34151f
Compare
This PR adds supports for the new upload syntax following the pluggable discovery specification.