Description
I'm not sure wether this is a problem in the avr platform, a documentation issue, a misunderstanding on my part or something else.
So please bear with me.
I tried to implement the burn bootloader functionality as described in:
https://arduino.github.io/arduino-cli/latest/platform-specification/#burn-bootloader
The documentation described this as a 2 step activity and I fail to reproduce the Arduino IDE created erase command for the avr uno board for platform version 1.8.3
The platform.txt file on my system contains the following erase pattern
tools.avrdude.erase.pattern="{cmd.path}" "-C{config.path}" {erase.verbose} -p{build.mcu} -c{protocol} {program.extra_params} -e -Ulock:w:{bootloader.unlock_bits}:m -Uefuse:w:{bootloader.extended_fuses}:m -Uhfuse:w:{bootloader.high_fuses}:m -Ulfuse:w:{bootloader.low_fuses}:m
As you can see, this command contains {protocol}
. The same can be found in the github repository here
https://github.com/arduino/ArduinoCore-avr/blob/master/platform.txt#L117
However I do not find where protocol is defined.
When I run the burn bootloader command in the arduino IDE I see protocol resolves to stk500v2. There are several references to stk500v2 in platform.txt boards.txt and programmers.txt but none that I can confidently map.
Can you please advice how to resolve protocol
properly?
Thanks