platformio / platform-atmelavr

Atmel AVR: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/atmelavr
Apache License 2.0
140 stars 105 forks source link

Updated PIO, build now fails with "KeyError: 'tool-avrdude," but I'm not even using avrdude #306

Closed MrSurly closed 1 year ago

MrSurly commented 1 year ago

Versions:

Appears to be similar to #269

My project is here: https://gitlab.com/nuance-systems/dragonfly-can-expander

To re-create error, simply enter the firmware subdirectory and do make or pio run

I was trying to solve a …relocation truncated to fit: R_AVR_13_PCREL against symbol…" error, when I decided to do pio pkg update, which is when this new KeyError error began.

This project doesn't even use avrdude, since it's a TINY0 project, which uses pymcuprog

Full CLI dump:

(base) epoulsen@strawberry:~/workspaces/dragonfly-can-expander/firmware$ pio run
Processing attinyx06 (platform: atmelmegaavr; board: ATtiny806)
-----------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
KeyError: 'tool-avrdude':
  File "/home/epoulsen/miniconda3/lib/python3.8/site-packages/platformio/builder/main.py", line 188:
    env.SConscript("$BUILD_SCRIPT")
  File "/home/epoulsen/.platformio/packages/tool-scons/scons-local-4.4.0/SCons/Script/SConscript.py", line 597:
    return _SConscript(self.fs, *files, **subst_kw)
  File "/home/epoulsen/.platformio/packages/tool-scons/scons-local-4.4.0/SCons/Script/SConscript.py", line 285:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
  File "/home/epoulsen/.platformio/platforms/atmelmegaavr/builder/main.py", line 77:
    env.PioPlatform().get_package_dir(
  File "/home/epoulsen/miniconda3/lib/python3.8/site-packages/platformio/platform/_packages.py", line 32:
    pkg = self.get_package(name)
  File "/home/epoulsen/miniconda3/lib/python3.8/site-packages/platformio/platform/_packages.py", line 29:
    return self.pm.get_package(spec or self.get_package_spec(name))
  File "/home/epoulsen/miniconda3/lib/python3.8/site-packages/platformio/platform/_packages.py", line 21:
    owner=self.packages[name].get("owner"),
====================================================== [FAILED] Took 0.23 seconds ======================================================
(base) epoulsen@strawberry:~/workspaces/dragonfly-can-expander/firmware$ 
MrSurly commented 1 year ago

Update: Fixed this for myself by doing pio pkg install -t tool-avrdude, but it doesn't fix the underlying problem. I suspect that since my board is ATtiny806, it doesn't have a dependency for avrdude, but it seems a reference to avrdude is hard-coded somewhere.

valeros commented 1 year ago

Duplicate of https://github.com/platformio/platform-atmelmegaavr/issues/58