@@ -19,15 +19,22 @@ class AtmelmegaavrPlatform(PlatformBase):
1919
2020 def configure_default_packages (self , variables , targets ):
2121 if not variables .get ("board" ):
22- return super ().configure_default_packages (
23- variables , targets )
22+ return super ().configure_default_packages (variables , targets )
2423
2524 build_core = variables .get (
26- "board_build.core" , self .board_config (variables .get ("board" )).get (
27- "build.core" , "arduino" ))
28-
29- if "arduino" in variables .get ("pioframework" , []) and build_core != "arduino" :
30- framework_package = "framework-arduino-megaavr-%s" % build_core .lower ()
25+ "board_build.core" ,
26+ self .board_config (variables .get ("board" )).get (
27+ "build.core" , "arduino"
28+ ),
29+ )
30+
31+ if (
32+ "arduino" in variables .get ("pioframework" , [])
33+ and build_core != "arduino"
34+ ):
35+ framework_package = (
36+ "framework-arduino-megaavr-%s" % build_core .lower ()
37+ )
3138 self .frameworks ["arduino" ]["package" ] = framework_package
3239 self .packages [framework_package ]["optional" ] = False
3340 self .packages ["framework-arduino-megaavr" ]["optional" ] = True
@@ -36,17 +43,18 @@ def configure_default_packages(self, variables, targets):
3643 self .packages ["toolchain-atmelavr" ]["version" ] = "~3.70300.0"
3744
3845 if build_core in ("MegaCoreX" , "megatinycore" , "dxcore" ):
39- # MegaCoreX and megatinycore require AVRDUDE v7 .1 currently available
40- # only in atmelavr platform
46+ # MegaCoreX and megatinycore require AVRDUDE v8 .1 currently
47+ # available only in atmelavr platform
4148 self .packages .pop ("tool-avrdude-megaavr" , None )
49+ self .packages ["tool-avrdude" ]["optional" ] = False
4250 else :
4351 self .packages .pop ("tool-avrdude" , None )
52+ self .packages ["tool-avrdude-megaavr" ]["optional" ] = False
4453
4554 if any (t in targets for t in ("fuses" , "bootloader" )):
4655 if build_core in ("MegaCoreX" , "megatinycore" , "dxcore" ):
4756 self .packages ["tool-avrdude" ]["optional" ] = False
4857 else :
4958 self .packages ["tool-avrdude-megaavr" ]["optional" ] = False
5059
51- return super ().configure_default_packages (
52- variables , targets )
60+ return super ().configure_default_packages (variables , targets )
0 commit comments