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.
thanks
Paul

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
CONFIGURATION: https://docs.platformio.org/page/boards/atmelmegaavr/ATmega4809.html
PLATFORM: Atmel megaAVR (1.4.0) > ATmega4809
HARDWARE: ATMEGA4809 16MHz, 6KB RAM, 48KB Flash
PACKAGES:
 - tool-avrdude-megaavr 1.60300.191015 (6.3.0)
 - toolchain-atmelavr 1.70300.191015 (7.3.0)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
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
              {atmega1608,atmega1609,atmega3208,atmega3209,atmega4808,atmega4809,atmega808,atmega809,attiny1604,attiny1606,attiny1607,attiny1614,attiny1616,attiny1617,attiny202,attiny204,attiny212,attiny214,attiny3216,attiny3217,attiny402,attiny404,attiny406,attiny412,attiny414,attiny416,attiny417,attiny804,attiny806,attiny807,attiny814,attiny816,attiny817,avr128da28,avr128da32,avr128da48,avr128da64,avr128db28,avr128db32,avr128db48,avr128db64,avr16dd14,avr16dd20,avr16dd28,avr16dd32,avr32da28,avr32da32,avr32da48,avr32db28,avr32db32,avr32db48,avr32dd14,avr32dd20,avr32dd28,avr32dd32,avr64da28,avr64da32,avr64da48,avr64da64,avr64db28,avr64db32,avr64db48,avr64db64,avr64dd14,avr64dd20,avr64dd28,avr64dd32,mega1608,mega1609,mega3208,mega3209,mega4808,mega4809,mega808,mega809,tiny1604,tiny1606,tiny1607,tiny1614,tiny1616,tiny1617,tiny202,tiny204,tiny212,tiny214,tiny3216,tiny3217,tiny402,tiny404,tiny406,tiny412,tiny414,tiny416,tiny417,tiny804,tiny806,tiny807,tiny814,tiny816,tiny817}
              -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
	
; https://github.com/MCUdude/MegaCoreX/
;
;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
; https://github.com/MCUdude/MegaCoreX/blob/master/PlatformIO.md
; https://docs.platformio.org/page/projectconf.html
; https://docs.platformio.org/en/latest/platforms/atmelmegaavr.html

[platformio]
; Default build target

default_envs = ATmega4809_pyupdi_upload
; Parameters used for all environments
[env]
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 https://github.com/MCUdude/MegaCoreX/blob/master/PlatformIO.md for options 
;build_flags =

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


[env:ATmega4809_pyupdi_upload]
; Upload protocol for UPDI upload - from PIO help pages ; see bottom of this page https://github.com/MCUdude/MegaCoreX/blob/master/PlatformIO.md for install
upload_speed = 115200
upload_flags = 
    -d
    mega4809
    -c
    $UPLOAD_PORT
    -b
    $upload_speed
upload_command = pyupdi $UPLOAD_FLAGS -f $source


; Run the following command to upload with this environment
; pio run -e Upload_UART -t upload
;[env:Upload_UART]
; 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
;[env:fuses_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,
thanks,
Paul