Error using pyupdi

Hi, I am using a baremetal avr4809 with a blink led program as the source code. I’ve configured pyupdi following the pyupdi guidance (I think) but get this error below on upload. Any help much appreciated.

Compiler/ upload output:

> Executing task: C:\Users\Paul\.platformio\penv\Scripts\pio.exe run --target upload <

Processing ATmega4809_pyupdi_upload (platform: atmelmegaavr; board: ATmega4809)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
PLATFORM: Atmel megaAVR (1.4.0) > ATmega4809
 - tool-avrdude-megaavr 1.60300.191015 (6.3.0)
 - toolchain-atmelavr 1.70300.191015 (7.3.0)
LDF: Library Dependency Finder ->
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Compiling .pio\build\ATmega4809_pyupdi_upload\src\main.o
Linking .pio\build\ATmega4809_pyupdi_upload\firmware.elf
Checking size .pio\build\ATmega4809_pyupdi_upload\firmware.elf
Building .pio\build\ATmega4809_pyupdi_upload\firmware.hex
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [          ]   0.0% (used 0 bytes from 6144 bytes)
Flash: [          ]   0.5% (used 248 bytes from 49152 bytes)
Configuring upload protocol...
AVAILABLE: jtag2updi
CURRENT: upload_protocol = jtag2updi
Looking for upload port...
Auto-detected: COM9
Forcing reset using 1200bps open/close on port COM9
Uploading .pio\build\ATmega4809_pyupdi_upload\firmware.hex
usage: pyupdi [-h] -d
              -c COMPORT [-e] [-b BAUDRATE] [-f FLASH] [-r] [-i]
              [-fs [FUSES [FUSES ...]]] [-fr] [-v]
pyupdi: error: argument -b/--baudrate: expected one argument
*** [upload] Error 2
================================================================================================== [FAILED] Took 1.69 seconds ==================================================================================================
The terminal process "C:\Users\Paul\.platformio\penv\Scripts\pio.exe 'run', '--target', 'upload'" terminated with exit code: 1.

my PIO.ini file is below:

; PlatformIO template configuration file for MegaCoreX and pyupdi
;Build variant is 4809 40 pin DIP - PK 

;   Build options: build flags, source filter
;   Hardware options: oscillator type, BOD, UART number, EEPROM retain
;   Upload options: custom upload port, speed, and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
; Please visit documentation for the other options

; Default build target

default_envs = ATmega4809_pyupdi_upload
; Parameters used for all environments
platform = atmelmegaavr
; framework = arduino

; Chip in use
board = ATmega4809
; Clock frequency in [Hz]
board_build.f_cpu = 16000000L
; Oscillator type (internal or external)
board_hardware.oscillator = internal
; Arduino pinout variant
board_build.variant = 40pin-default 

; Unflag build flags
;build_unflags =

; Extra build flags PK - see for options 
;build_flags =

; Monitor port is auto detected. Override here
;monitor_port = 
; Serial monitor baud rate
monitor_speed = 115200

; Upload protocol for UPDI upload - from PIO help pages ; see bottom of this page for install
upload_speed = 115200
upload_flags = 
upload_command = pyupdi $UPLOAD_FLAGS -f $source

; Run the following command to upload with this environment
; pio run -e Upload_UART -t upload
; Upload protocol for serial uploads (using Optiboot)
;upload_protocol = arduino
;upload_flags =
;upload_port = /dev/cu.usbserial*

; run the following command to set fuses
; pio run -e fuses_bootloader -t fuses
; run the following command to set fuses + burn bootloader
; pio run -e fuses_bootloader -t bootloader
; Upload protocol for used to set fuses/bootloader
;upload_protocol = ${env:Upload_UPDI.upload_protocol}
;upload_flags =

; Hardware settings
board_hardware.bod = 2.7v
board_hardware.eesave = yes
board_hardware.uart = no_bootloader
board_hardware.rstpin = reset

OK, I got it, there were a few errors, e.g using lower case for upload param macros - attention to detail.
It’s uploaded fine,