Help to configure PIO.ini for MicroUPDI

Hi, I have acquired and been looking at microUPDI in the hope it will give me faster upload times to my avr4809. I’m currently using pymcuprog from the command line.

My pio.ini (below) is configured for use with pyupdi and I’d like to make changes to use microUPDI for code uploads.

I found from the megacorex help pages that I should use

upload_protocol = xplainedmini_updi

but not sure wht the new upload_command should be, or if any other changes are required.

Thanks for help


[env:ATmega4809]

board = ATmega4809

platform = atmelmegaavr

framework = arduino

board_build.variant = 40pin-standard

board_build.f_cpu = 20000000L

upload_protocol =custom

upload_speed = 250000

upload_port = COM3

upload_flags =

-d

atmega4809

-c

$UPLOAD_PORT

-b

$UPLOAD_SPEED

upload_command = pyupdi $UPLOAD_FLAGS -f $SOURCE

lib_extra_dirs =

C:\Users\Paul\Documents\PlatformIO\Projects\Development\

monitor_port = COM3

monitor_speed = 19200

lib_deps =

waspinator/AccelStepper@^1.61

qub1750ul/SoftwareReset@^3.0.0

[platformio]

description = The ASCOM control box


I found a possible solution from an old post, If that doesn’t sork I’ll post again.
the solution in an older post was:

upload_protocol = custom
upload_flags =
    -C
    $PROJECT_PACKAGES_DIR/tool-avrdude-megaavr/avrdude.conf
    -p
    $BOARD_MCU
    -c
    xplainedmini_updi
    -Pusb
    -b115200
upload_command = avrdude $UPLOAD_FLAGS -U flash:w:$SOURCE:i