File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 20
20
from tools .export .gnuarmeclipse import GNUARMEclipse
21
21
from tools .export .gnuarmeclipse import UID
22
22
from tools .build_api import prepare_toolchain
23
+ from tools .targets import TARGET_MAP
23
24
from sys import flags , platform
24
25
25
26
# Global random number generator instance.
@@ -281,7 +282,14 @@ class Sw4STM32(GNUARMEclipse):
281
282
},
282
283
}
283
284
284
- TARGETS = BOARDS .keys ()
285
+
286
+ @classmethod
287
+ def is_target_supported (cls , target_name ):
288
+ target = TARGET_MAP [target_name ]
289
+ target_supported = bool (set (target .resolution_order_names )
290
+ .intersection (set (cls .BOARDS .keys ())))
291
+ toolchain_supported = cls .TOOLCHAIN in target .supported_toolchains
292
+ return target_supported and toolchain_supported
285
293
286
294
def __gen_dir (self , dir_name ):
287
295
"""
You can’t perform that action at this time.
0 commit comments