Arduino vs wiring upload protocol?

What exactly is the difference between arduino and wiring upload protocols?

For example, in boards\uno.json there is:

"upload": {
    "maximum_ram_size": 2048,
    "maximum_size": 32256,
    "protocol": "arduino",
    "require_upload_port": true,
    "speed": 115200
}

While in boards\megaatmega2560.json there is:

"upload": {
    "maximum_ram_size": 8192,
    "maximum_size": 253952,
    "protocol": "wiring",
    "require_upload_port": true,
    "speed": 115200
}

Where is the code for invoking the upload commands based on the selected protocol?

According to these lines from avrdude.config:

#
# PROGRAMMER DEFINITIONS
#

# http://wiring.org.co/
# Basically STK500v2 protocol, with some glue to trigger the
# bootloader.
programmer
  id    = "wiring";
  desc  = "Wiring";
  type  = "wiring";
  connection_type = serial;
;

seems as wiring upload protocol is a modified STK500v2 protocol.

And I think arduino upload protocol is the same as STK500.

Right. “Wiring” is mostly STK500v2, while “Arduino” is STK500. The source files can be found below.

https://github.com/avrdudes/avrdude/blob/v6.4/wiring.c

https://github.com/avrdudes/avrdude/blob/v6.4/arduino.c

1 Like