Skip to content

Commit 14319ad

Browse files
author
Cruz Monrreal
authored
Merge pull request #7792 from deepikabhavnani/fix_m33
Build tool fixes for Musca support
2 parents 3f5cd54 + ed58ff0 commit 14319ad

File tree

5 files changed

+15
-17
lines changed

5 files changed

+15
-17
lines changed

tools/profiles/debug.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
"asm": [],
2424
"c": ["-D__ASSERT_MSG", "-std=gnu99"],
2525
"cxx": ["-fno-rtti", "-std=gnu++98"],
26-
"ld": ["--verbose", "--remove", "--legacyalign", "--no_strict_wchar_size",
27-
"--no_strict_enum_size", "--show_full_path"]
26+
"ld": ["--verbose", "--remove", "--show_full_path"]
2827
},
2928
"ARM": {
3029
"common": ["-c", "--gnu", "-Otime", "--split_sections",

tools/profiles/develop.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"asm": [],
2323
"c": ["-D__ASSERT_MSG", "-std=gnu99"],
2424
"cxx": ["-fno-rtti", "-std=gnu++98"],
25-
"ld": ["--legacyalign", "--no_strict_wchar_size", "--no_strict_enum_size", "--show_full_path"]
25+
"ld": ["--show_full_path"]
2626
},
2727
"ARM": {
2828
"common": ["-c", "--gnu", "-Otime", "--split_sections",

tools/profiles/release.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
"asm": [],
2323
"c": ["-D__ASSERT_MSG", "-std=gnu99"],
2424
"cxx": ["-fno-rtti", "-std=gnu++98"],
25-
"ld": ["--legacyalign", "--no_strict_wchar_size", "--no_strict_enum_size",
26-
"--show_full_path"]
25+
"ld": ["--show_full_path"]
2726
},
2827
"ARM": {
2928
"common": ["-c", "--gnu", "-Ospace", "--split_sections",

tools/toolchains/arm.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ class ARMC6(ARM_STD):
361361
SUPPORTED_CORES = ["Cortex-M0", "Cortex-M0+", "Cortex-M3", "Cortex-M4",
362362
"Cortex-M4F", "Cortex-M7", "Cortex-M7F", "Cortex-M7FD",
363363
"Cortex-M23", "Cortex-M23-NS", "Cortex-M33",
364-
"CortexM33-NS", "Cortex-A9"]
364+
"Cortex-M33-NS", "Cortex-A9"]
365365
ARMCC_RANGE = (LooseVersion("6.10"), LooseVersion("7.0"))
366366

367367
@staticmethod
@@ -393,11 +393,11 @@ def __init__(self, target, *args, **kwargs):
393393
self.flags['common'].append("-mcpu=%s" % target.core.lower()[:-1])
394394
self.flags['ld'].append("--cpu=%s" % target.core.lower()[:-1])
395395
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"):
401401
self.flags['common'].append("-mcpu=%s" % target.core.lower())
402402
self.flags['ld'].append("--cpu=%s" % target.core.lower())
403403
self.SHEBANG += " -mcpu=%s" % target.core.lower()
@@ -413,11 +413,10 @@ def __init__(self, target, *args, **kwargs):
413413
self.flags['common'].append("-mfloat-abi=softfp")
414414
elif target.core.startswith("Cortex-M23"):
415415
self.flags['common'].append("-march=armv8-m.base")
416-
elif target.core.startswith("Cortex-M33"):
417-
self.flags['common'].append("-march=armv8-m.main")
418416

419417
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")
421420

422421
# Create Secure library
423422
if ((target.core == "Cortex-M23" or self.target.core == "Cortex-M33") and
@@ -438,7 +437,10 @@ def __init__(self, target, *args, **kwargs):
438437
"Cortex-M23-NS": "Cortex-M23",
439438
"Cortex-M33-NS": "Cortex-M33" }.get(target.core, target.core)
440439

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)
442444

443445
self.cc = ([join(TOOLCHAIN_PATHS["ARMC6"], "armclang")] +
444446
self.flags['common'] + self.flags['c'])

tools/toolchains/gcc.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,6 @@ def link(self, output, objects, libraries, lib_dirs, mem_map):
262262
# Exec command
263263
self.notify.cc_verbose("Link: %s" % ' '.join(cmd))
264264
self.default_cmd(cmd)
265-
if self.target.core == "Cortex-M23" or self.target.core == "Cortex-M33":
266-
self.notify.info("Secure Library Object %s" %secure_file)
267265

268266
@hook_tool
269267
def archive(self, objects, lib_path):

0 commit comments

Comments
 (0)