@@ -361,7 +361,7 @@ class ARMC6(ARM_STD):
361
361
SUPPORTED_CORES = ["Cortex-M0" , "Cortex-M0+" , "Cortex-M3" , "Cortex-M4" ,
362
362
"Cortex-M4F" , "Cortex-M7" , "Cortex-M7F" , "Cortex-M7FD" ,
363
363
"Cortex-M23" , "Cortex-M23-NS" , "Cortex-M33" ,
364
- "CortexM33 -NS" , "Cortex-A9" ]
364
+ "Cortex-M33 -NS" , "Cortex-A9" ]
365
365
ARMCC_RANGE = (LooseVersion ("6.10" ), LooseVersion ("7.0" ))
366
366
367
367
@staticmethod
@@ -393,11 +393,11 @@ 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 target .core .lower (). endswith ( "ns " ):
397
- self .flags ['common' ].append ("-mcpu=%s" % target . core . lower ()[: - 3 ] )
398
- self .flags ['ld ' ].append ("--cpu=%s" % target . core . lower ()[: - 3 ] )
399
- self .SHEBANG += " -mcpu=%s" % target . core . lower ()[: - 3 ]
400
- else :
396
+ elif target .core .startswith ( "Cortex-M33 " ):
397
+ self .flags ['common' ].append ("-mcpu=cortex-m33+nodsp" )
398
+ self .flags ['common ' ].append ("-mfpu=none" )
399
+ self .flags [ 'ld' ]. append ( "--cpu=Cortex-M33.no_dsp.no_fp" )
400
+ elif not target . core . startswith ( "Cortex-M23" ) :
401
401
self .flags ['common' ].append ("-mcpu=%s" % target .core .lower ())
402
402
self .flags ['ld' ].append ("--cpu=%s" % target .core .lower ())
403
403
self .SHEBANG += " -mcpu=%s" % target .core .lower ()
@@ -413,11 +413,10 @@ def __init__(self, target, *args, **kwargs):
413
413
self .flags ['common' ].append ("-mfloat-abi=softfp" )
414
414
elif target .core .startswith ("Cortex-M23" ):
415
415
self .flags ['common' ].append ("-march=armv8-m.base" )
416
- elif target .core .startswith ("Cortex-M33" ):
417
- self .flags ['common' ].append ("-march=armv8-m.main" )
418
416
419
417
if target .core == "Cortex-M23" or target .core == "Cortex-M33" :
420
- self .flags ['common' ].append ("-mcmse" )
418
+ self .flags ['cxx' ].append ("-mcmse" )
419
+ self .flags ['c' ].append ("-mcmse" )
421
420
422
421
# Create Secure library
423
422
if ((target .core == "Cortex-M23" or self .target .core == "Cortex-M33" ) and
@@ -438,7 +437,10 @@ def __init__(self, target, *args, **kwargs):
438
437
"Cortex-M23-NS" : "Cortex-M23" ,
439
438
"Cortex-M33-NS" : "Cortex-M33" }.get (target .core , target .core )
440
439
441
- self .flags ['asm' ].append ("--cpu=%s" % asm_cpu )
440
+ if target .core .startswith ("Cortex-M33" ):
441
+ self .flags ['asm' ].append ("--cpu=Cortex-M33.no_dsp.no_fp" )
442
+ else :
443
+ self .flags ['asm' ].append ("--cpu=%s" % asm_cpu )
442
444
443
445
self .cc = ([join (TOOLCHAIN_PATHS ["ARMC6" ], "armclang" )] +
444
446
self .flags ['common' ] + self .flags ['c' ])
0 commit comments