Skip to content

Add support for pluggable discovery #112

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

Merged
merged 1 commit into from
Oct 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ uno2018.name=Arduino Uno WiFi Rev2

uno2018.vid.0=0x03eb
uno2018.pid.0=0x2145
uno2018.upload_port.0.vid=0x03eb
uno2018.upload_port.0.pid=0x2145
uno2018.upload_port.1.board=uno2018

uno2018.upload.tool=avrdude
uno2018.upload.tool.default=avrdude
uno2018.upload.tool.network=arduino_ota
uno2018.upload.protocol=xplainedmini_updi
uno2018.upload.maximum_size=48640
uno2018.upload.maximum_data_size=6144
Expand All @@ -25,6 +30,7 @@ uno2018.build.extra_flags={build.328emulation} -DMILLIS_USE_TIMERB3
#uno2018.build.extra_flags=-B{runtime.tools.atpack.path}/gcc/dev/{build.mcu}

uno2018.bootloader.tool=avrdude
uno2018.bootloader.tool.default=avrdude
uno2018.bootloader.file=atmega4809_uart_bl.hex
uno2018.bootloader.SYSCFG0=0xC9
uno2018.bootloader.BOOTEND=0x02
Expand All @@ -43,8 +49,13 @@ nona4809.name=Arduino Nano Every

nona4809.vid.0=0x2341
nona4809.pid.0=0x0058
nona4809.upload_port.0.vid=0x2341
nona4809.upload_port.0.pid=0x0058
nona4809.upload_port.1.board=nona4809

nona4809.upload.tool=avrdude
nona4809.upload.tool.default=avrdude
nona4809.upload.tool.network=arduino_ota
nona4809.upload.protocol=jtag2updi
nona4809.upload.maximum_size=49152
nona4809.upload.maximum_data_size=6144
Expand All @@ -62,6 +73,7 @@ nona4809.build.extra_flags={build.328emulation} -DMILLIS_USE_TIMERB3 -DNO_EXTERN
#nona4809.build.extra_flags=-B{runtime.tools.atpack.path}/gcc/dev/{build.mcu}

nona4809.bootloader.tool=avrdude
nona4809.bootloader.tool.default=avrdude
nona4809.bootloader.file=atmega4809_uart_bl.hex
nona4809.bootloader.SYSCFG0=0xC9
nona4809.bootloader.BOOTEND=0x00
Expand Down
17 changes: 14 additions & 3 deletions platform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,19 @@ recipe.preproc.includes="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags}
preproc.macros.flags=-w -x c++ -E -CC
recipe.preproc.macros="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} {preproc.macros.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} "-I{build.core.path}/api/deprecated" {includes} "{source_file}" -o "{preprocessed_file_path}"

# Required discoveries and monitors
# ---------------------------------
pluggable_discovery.required.0=builtin:serial-discovery
pluggable_discovery.required.1=builtin:mdns-discovery
pluggable_monitor.required.serial=builtin:serial-monitor

# AVR Uploader/Programmers tools
# ------------------------------

tools.avrdude.path={runtime.tools.avrdude-6.3.0-arduino17.path}
tools.avrdude.cmd.path={path}/bin/avrdude
tools.avrdude.config.path={path}/etc/avrdude.conf

tools.avrdude.network_cmd={runtime.tools.arduinoOTA-1.3.0.path}/bin/arduinoOTA

tools.avrdude.upload.params.verbose=-v
tools.avrdude.upload.params.quiet=-q -q
# tools.avrdude.upload.verify is needed for backwards compatibility with IDE 1.6.8 or older, IDE 1.6.9 or newer overrides this value
Expand All @@ -124,7 +128,14 @@ tools.avrdude.bootloader.pattern="{cmd.path}" "-C{config.path}" {bootloader.verb

tools.avrdude_remote.upload.pattern=/usr/bin/run-avrdude /tmp/sketch.hex {upload.verbose} -p{build.mcu}

tools.avrdude.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -d -v
# this is deprecated by pluggable discovery:
tools.avrdude.upload.network_pattern="{tools.arduino_ota.cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -d -v

# ArduinoOTA
tools.arduino_ota.cmd={runtime.tools.arduinoOTA-1.3.0.path}/bin/arduinoOTA
tools.arduino_ota.upload.field.password=Password
tools.arduino_ota.upload.field.password.secret=true
tools.arduino_ota.upload.pattern="{tools.arduino_ota.cmd}" -address {upload.port.address} -port 65280 -username arduino -password "{upload.field.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -d -v

# USB Default Flags
# Default blank usb manufacturer will be filled in at compile time
Expand Down
3 changes: 2 additions & 1 deletion programmers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ medbg.communication=usb
medbg.protocol=xplainedmini_updi
medbg.program.protocol=xplainedmini_updi
medbg.program.tool=avrdude
medbg.program.extra_params=-Pusb
medbg.program.tool.default=avrdude
medbg.program.extra_params=-Pusb