@@ -393,7 +393,9 @@ def __init__(self, target, *args, **kwargs):
393
393
self .flags ['common' ].append ("-mcpu=%s" % target .core .lower ()[:- 1 ])
394
394
self .flags ['ld' ].append ("--cpu=%s" % target .core .lower ()[:- 1 ])
395
395
self .SHEBANG += " -mcpu=%s" % target .core .lower ()[:- 1 ]
396
- elif not target .core .startswith ("Cortex-M23" ) and not target .core .startswith ("Cortex-M33" ):
396
+ elif target .core .startswith ("Cortex-M33" ):
397
+ self .flags ['ld' ].append ("--cpu=8-M.Main" )
398
+ elif not target .core .startswith ("Cortex-M23" ):
397
399
self .flags ['common' ].append ("-mcpu=%s" % target .core .lower ())
398
400
self .flags ['ld' ].append ("--cpu=%s" % target .core .lower ())
399
401
self .SHEBANG += " -mcpu=%s" % target .core .lower ()
@@ -410,10 +412,12 @@ def __init__(self, target, *args, **kwargs):
410
412
elif target .core .startswith ("Cortex-M23" ):
411
413
self .flags ['common' ].append ("-march=armv8-m.base" )
412
414
elif target .core .startswith ("Cortex-M33" ):
413
- self .flags ['common' ].append ("-march=armv8-m.main" )
415
+ self .flags ['c' ].append ("-march=armv8-m.main" )
416
+ self .flags ['cxx' ].append ("-march=armv8-m.main" )
414
417
415
418
if target .core == "Cortex-M23" or target .core == "Cortex-M33" :
416
- self .flags ['common' ].append ("-mcmse" )
419
+ self .flags ['cxx' ].append ("-mcmse" )
420
+ self .flags ['c' ].append ("-mcmse" )
417
421
418
422
# Create Secure library
419
423
if ((target .core == "Cortex-M23" or self .target .core == "Cortex-M33" ) and
@@ -434,7 +438,10 @@ def __init__(self, target, *args, **kwargs):
434
438
"Cortex-M23-NS" : "Cortex-M23" ,
435
439
"Cortex-M33-NS" : "Cortex-M33" }.get (target .core , target .core )
436
440
437
- self .flags ['asm' ].append ("--cpu=%s" % asm_cpu )
441
+ if target .core .startswith ("Cortex-M33" ):
442
+ self .flags ['asm' ].append ("--cpu=8-M.Main" )
443
+ else :
444
+ self .flags ['asm' ].append ("--cpu=%s" % asm_cpu )
438
445
439
446
self .cc = ([join (TOOLCHAIN_PATHS ["ARMC6" ], "armclang" )] +
440
447
self .flags ['common' ] + self .flags ['c' ])
0 commit comments