@@ -166,7 +166,7 @@ def parse_output(self, output):
166
166
msg = None
167
167
else :
168
168
msg ['text' ] += line + "\n "
169
-
169
+
170
170
if msg is not None :
171
171
self .notify .cc_info (msg )
172
172
@@ -304,7 +304,7 @@ def archive(self, objects, lib_path):
304
304
@hook_tool
305
305
def binary (self , resources , elf , bin ):
306
306
_ , fmt = splitext (bin )
307
- # On .hex format, combine multiple .hex files (for multiple load regions) into one
307
+ # On .hex format, combine multiple .hex files (for multiple load regions) into one
308
308
bin_arg = {".bin" : "--bin" , ".hex" : "--i32combined" }[fmt ]
309
309
cmd = [self .elf2bin , bin_arg , '-o' , bin , elf ]
310
310
cmd = self .hook .get_cmdline_binary (cmd )
@@ -364,7 +364,8 @@ class ARMC6(ARM_STD):
364
364
SUPPORTED_CORES = ["Cortex-M0" , "Cortex-M0+" , "Cortex-M3" , "Cortex-M4" ,
365
365
"Cortex-M4F" , "Cortex-M7" , "Cortex-M7F" , "Cortex-M7FD" ,
366
366
"Cortex-M23" , "Cortex-M23-NS" , "Cortex-M33" , "Cortex-M33F" ,
367
- "Cortex-M33-NS" , "Cortex-M33F-NS" , "Cortex-A9" ]
367
+ "Cortex-M33-NS" , "Cortex-M33F-NS" , "Cortex-M33FD-NS" , "Cortex-M33FD" ,
368
+ "Cortex-A9" ]
368
369
ARMCC_RANGE = (LooseVersion ("6.10" ), LooseVersion ("7.0" ))
369
370
370
371
@staticmethod
@@ -392,6 +393,10 @@ def __init__(self, target, *args, **kwargs):
392
393
self .flags ['common' ].append ("-mcpu=%s" % target .core .lower ()[:- 2 ])
393
394
self .flags ['ld' ].append ("--cpu=%s" % target .core .lower ()[:- 2 ])
394
395
self .SHEBANG += " -mcpu=%s" % target .core .lower ()[:- 2 ]
396
+ elif target .core .lower ().endswith ("fd-ns" ):
397
+ self .flags ['common' ].append ("-mcpu=%s" % target .core .lower ()[:- 5 ])
398
+ self .flags ['ld' ].append ("--cpu=%s" % target .core .lower ()[:- 5 ])
399
+ self .SHEBANG += " -mcpu=%s" % target .core .lower ()[:- 5 ]
395
400
elif target .core .lower ().endswith ("f" ):
396
401
self .flags ['common' ].append ("-mcpu=%s" % target .core .lower ()[:- 1 ])
397
402
self .flags ['ld' ].append ("--cpu=%s" % target .core .lower ()[:- 1 ])
@@ -420,18 +425,25 @@ def __init__(self, target, *args, **kwargs):
420
425
self .flags ['common' ].append ("-mfpu=fpv5-sp-d16" )
421
426
self .flags ['common' ].append ("-mfloat-abi=softfp" )
422
427
423
- if target .core == "Cortex-M23" or target .core == "Cortex-M33" :
428
+ if ((target .core .startswith ("Cortex-M23" ) or
429
+ target .core .startswith ("Cortex-M33" )) and
430
+ not target .core .endswith ("-NS" )):
424
431
self .flags ['cxx' ].append ("-mcmse" )
425
432
self .flags ['c' ].append ("-mcmse" )
426
433
427
434
# Create Secure library
428
- if ((target .core == "Cortex-M23" or self .target .core == "Cortex-M33" ) and
435
+ if ((target .core .startswith ("Cortex-M23" ) or
436
+ target .core .startswith ("Cortex-M33" )) and
437
+ not target .core .endswith ("-NS" ) and
429
438
kwargs .get ('build_dir' , False )):
430
439
build_dir = kwargs ['build_dir' ]
431
440
secure_file = join (build_dir , "cmse_lib.o" )
432
441
self .flags ["ld" ] += ["--import_cmse_lib_out=%s" % secure_file ]
442
+
433
443
# Add linking time preprocessor macro DOMAIN_NS
434
- if target .core == "Cortex-M23-NS" or self .target .core == "Cortex-M33-NS" :
444
+ if ((target .core .startswith ("Cortex-M23" ) or
445
+ target .core .startswith ("Cortex-M33" )) and
446
+ target .core .endswith ("-NS" )):
435
447
define_string = self .make_ld_define ("DOMAIN_NS" , "0x1" )
436
448
self .flags ["ld" ].append (define_string )
437
449
0 commit comments