@@ -289,18 +289,21 @@ class Armc5(Arm):
289289 @classmethod
290290 def is_target_supported (cls , target_name ):
291291 target = TARGET_MAP [target_name ]
292- if int (target .build_tools_metadata ["version" ]) > 0 :
293- #Although toolchain name is set to ARM above we should check for ARMC5 for 5.12/onwards
294- if "ARMC5" not in target .supported_toolchains :
295- return False
296-
297- arm_res = apply_supported_whitelist (
298- "ARM" , cls .POST_BINARY_WHITELIST , target
299- )
300- armc5_res = apply_supported_whitelist (
301- "ARMC5" , cls .POST_BINARY_WHITELIST , target
302- )
303- return arm_res or armc5_res
292+ if not target .is_TFM_target :
293+ if int (target .build_tools_metadata ["version" ]) > 0 :
294+ # Although toolchain name is set to ARM above we should check for ARMC5 for 5.12/onwards
295+ if "ARMC5" not in target .supported_toolchains :
296+ return False
297+
298+ arm_res = apply_supported_whitelist (
299+ "ARM" , cls .POST_BINARY_WHITELIST , target
300+ )
301+ armc5_res = apply_supported_whitelist (
302+ "ARMC5" , cls .POST_BINARY_WHITELIST , target
303+ )
304+ return arm_res or armc5_res
305+ else :
306+ return False
304307
305308class Armc6 (Arm ):
306309 """ARM Compiler 6 (armclang) specific generic makefile target"""
@@ -310,23 +313,25 @@ class Armc6(Arm):
310313 @classmethod
311314 def is_target_supported (cls , target_name ):
312315 target = TARGET_MAP [target_name ]
313-
314- if int (target .build_tools_metadata ["version" ]) > 0 :
315- if not (len (set (target .supported_toolchains ).intersection (
316- set (["ARM" , "ARMC6" ]))) > 0 ):
317- return False
318-
319- if not apply_supported_whitelist (
320- cls .TOOLCHAIN , cls .POST_BINARY_WHITELIST , target ):
321- #ARMC6 is not in the list, but also check for ARM as ARM represents ARMC6 for 5.12/onwards
322- #and still keep cls.TOOLCHAIN as ARMC6 as thats the toolchain we want to use
323- return apply_supported_whitelist (
324- "ARM" , cls .POST_BINARY_WHITELIST , target )
316+ if not target .is_TFM_target :
317+ if int (target .build_tools_metadata ["version" ]) > 0 :
318+ if not (len (set (target .supported_toolchains ).intersection (
319+ set (["ARM" , "ARMC6" ]))) > 0 ):
320+ return False
321+
322+ if not apply_supported_whitelist (
323+ cls .TOOLCHAIN , cls .POST_BINARY_WHITELIST , target ):
324+ # ARMC6 is not in the list, but also check for ARM as ARM represents ARMC6 for 5.12/onwards
325+ # and still keep cls.TOOLCHAIN as ARMC6 as thats the toolchain we want to use
326+ return apply_supported_whitelist (
327+ "ARM" , cls .POST_BINARY_WHITELIST , target )
328+ else :
329+ return True
325330 else :
326- return True
331+ return apply_supported_whitelist (
332+ cls .TOOLCHAIN , cls .POST_BINARY_WHITELIST , target )
327333 else :
328- return apply_supported_whitelist (
329- cls .TOOLCHAIN , cls .POST_BINARY_WHITELIST , target )
334+ return
330335
331336
332337class IAR (Makefile ):
0 commit comments