UPDI upload failure with pyupdi

Hi, I’m getting the problem below when attempting to upload code. In the interim, I’m using pymcuprog, but its almost as slow as setting the binary by hand (well perhaps a bit faster :slight_smile: )

any help much appreciated.

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

Processing ATmega4809 (board: ATmega4809; platform: atmelmegaavr; framework: arduino)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: Redirecting...
PLATFORM: Atmel megaAVR (1.4.0) > ATmega4809

  • framework-arduino-megaavr-megacorex @ 1.0.9
  • tool-avrdude-megaavr @ 2.60300.210128 (6.3.0)
  • toolchain-atmelavr @ 2.70300.201015 (7.3.0)
    LDF: Library Dependency Finder → Library Dependency Finder (LDF) — PlatformIO latest documentation
    LDF Modes: Finder ~ chain, Compatibility ~ soft
    Found 12 compatible libraries
    Scanning dependencies…
    Dependency Graph
    |-- SoftwareReset @ 3.0.0
    |-- SPI @ 1.0
    Building in release mode
    Compiling .pio\build\ATmega4809\src\Encoder_Node.cpp.o
    Linking .pio\build\ATmega4809\firmware.elf
    Checking size .pio\build\ATmega4809\firmware.elf
    Building .pio\build\ATmega4809\firmware.hex
    Advanced Memory Usage is available via “PlatformIO Home > Project Inspect”
    RAM: [= ] 7.2% (used 445 bytes from 6144 bytes)
    Flash: [== ] 22.7% (used 11177 bytes from 49152 bytes)
    Configuring upload protocol…
    AVAILABLE: custom
    CURRENT: upload_protocol = custom
    Uploading .pio\build\ATmega4809\firmware.hex
    ‘pyupdi’ is not recognized as an internal or external command,
    operable program or batch file.
    *** [upload] Error 1

Just to say I’ve solved the problem. I had an idea it had happened before, so I searched the posts and found this which is the exact same problem. I used the method in the post to reinstall pyupdi and it works. In summary here’s what I did:

C:\Users\Paul\.platformio\penv\Scripts\python.exe -m pip install https://github.com/mraardvark/pyupdi/archive/master.zip

Could anyone explain why I have had to do this again? Perhaps there’s something I can do to stop pyupdi disappearing?

thanks for help,

1 Like