@@ -81,7 +81,7 @@ def __init__(self, target, notify=None, macros=None,
81
81
self .ar = join (ARM_BIN , "armar" )
82
82
self .elf2bin = join (ARM_BIN , "fromelf" )
83
83
84
- self .SHEBANG += " --cpu=%s" % target . core . lower ()
84
+ self .SHEBANG += " --cpu=%s" % cpu
85
85
86
86
def parse_dependencies (self , dep_path ):
87
87
dependencies = []
@@ -312,15 +312,19 @@ def __init__(self, target, *args, **kwargs):
312
312
if target .core .lower ().endswith ("fd" ):
313
313
self .flags ['common' ].append ("-mcpu=%s" % target .core .lower ()[:- 2 ])
314
314
self .flags ['ld' ].append ("--cpu=%s" % target .core .lower ()[:- 2 ])
315
+ self .SHEBANG += " -mcpu=%s" % target .core .lower ()[:- 2 ]
315
316
elif target .core .lower ().endswith ("f" ):
316
317
self .flags ['common' ].append ("-mcpu=%s" % target .core .lower ()[:- 1 ])
317
318
self .flags ['ld' ].append ("--cpu=%s" % target .core .lower ()[:- 1 ])
319
+ self .SHEBANG += " -mcpu=%s" % target .core .lower ()[:- 1 ]
318
320
elif target .core .lower ().endswith ("ns" ):
319
321
self .flags ['common' ].append ("-mcpu=%s" % target .core .lower ()[:- 3 ])
320
322
self .flags ['ld' ].append ("--cpu=%s" % target .core .lower ()[:- 3 ])
323
+ self .SHEBANG += " -mcpu=%s" % target .core .lower ()[:- 3 ]
321
324
else :
322
325
self .flags ['common' ].append ("-mcpu=%s" % target .core .lower ())
323
326
self .flags ['ld' ].append ("--cpu=%s" % target .core .lower ())
327
+ self .SHEBANG += " -mcpu=%s" % target .core .lower ()
324
328
325
329
if target .core == "Cortex-M4F" :
326
330
self .flags ['common' ].append ("-mfpu=fpv4-sp-d16" )
@@ -358,8 +362,6 @@ def __init__(self, target, *args, **kwargs):
358
362
self .ar = [join (TOOLCHAIN_PATHS ["ARMC6" ], "armar" )]
359
363
self .elf2bin = join (TOOLCHAIN_PATHS ["ARMC6" ], "fromelf" )
360
364
361
- self .SHEBANG += " -mcpu=%s" % target .core .lower ()
362
-
363
365
def parse_dependencies (self , dep_path ):
364
366
return mbedToolchain .parse_dependencies (self , dep_path )
365
367
0 commit comments