The answer is that the version of avrdude in use by pio does not support jtag2updi.
so I did this:
C:\Windows\System32>pio platform update atmelmegaavr
WARNING: This command is deprecated and will be removed in the next releases.
Please use `pio pkg update` instead.
Platform Manager: Updating atmelmegaavr @ 1.6.0
Platform Manager: Removing atmelmegaavr @ 1.6.0
Platform Manager: atmelmegaavr@1.6.0 has been removed!
Platform Manager: Installing platformio/atmelmegaavr @ 1.9.0
Downloading [####################################] 100%
Unpacking [####################################] 100%
Platform Manager: atmelmegaavr@1.9.0 has been installed!
Tool Manager: toolchain-atmelavr@1.70300.191015 is already installed
Tool Manager: toolchain-atmelavr@1.70300.191015 is already up-to-date
and then when I attempted the code upload, i got this:
Executing task: C:\Users\Paul\.platformio\penv\Scripts\platformio.exe run --target upload
Processing Upload_UPDI (platform: atmelmegaavr; framework: arduino; board: ATmega4809)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Tool Manager: Installing platformio/tool-avrdude @ ~1.70100.0
Downloading [####################################] 100%
Unpacking [####################################] 100%
Tool Manager: tool-avrdude@1.70100.0 has been installed!
and the uload was successful.
So it seems that I am running two machines which have PIO installed as per standard install, but they are configured differently, which I was not expecting. PIO regularly seems to update on both machines, but they remain different.
How can I ensure things get updated to the latest version - in this case the version of avrdude that PIO uses?
thanks
Paul