Skip to content

Commit 64d09e1

Browse files
committed
Adding uARM support default build profiles
1 parent e0b0ad0 commit 64d09e1

File tree

4 files changed

+28
-33
lines changed

4 files changed

+28
-33
lines changed

tools/profiles/debug.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@
2222
"cxx": ["--cpp", "--no_rtti", "--no_vla"],
2323
"ld": []
2424
},
25+
"uARM": {
26+
"common": ["-c", "--gnu", "-Otime", "--split_sections",
27+
"--apcs=interwork", "--brief_diagnostics", "--restrict",
28+
"--multibyte_chars", "-O0", "-D__MICROLIB", "-g"
29+
"--library_type=microlib", "-DMBED_RTOS_SINGLE_THREAD"],
30+
"asm": [],
31+
"c": ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"],
32+
"cxx": ["--cpp", "--no_rtti", "--no_vla"],
33+
"ld": ["--library_type=microlib"]
34+
},
2535
"IAR": {
2636
"common": [
2737
"--no_wrap_diagnostics", "non-native end of line sequence", "-e",

tools/profiles/default.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@
2222
"cxx": ["--cpp", "--no_rtti", "--no_vla"],
2323
"ld": []
2424
},
25+
"uARM": {
26+
"common": ["-c", "--gnu", "-Otime", "--split_sections",
27+
"--apcs=interwork", "--brief_diagnostics", "--restrict",
28+
"--multibyte_chars", "-O3", "-D__MICROLIB",
29+
"--library_type=microlib", "-DMBED_RTOS_SINGLE_THREAD"],
30+
"asm": [],
31+
"c": ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"],
32+
"cxx": ["--cpp", "--no_rtti", "--no_vla"],
33+
"ld": ["--library_type=microlib"]
34+
},
2535
"IAR": {
2636
"common": [
2737
"--no_wrap_diagnostics", "-e",

tools/profiles/save-asm.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,12 @@
1212
"c": [],
1313
"cxx": [],
1414
"ld": []
15+
},
16+
"uARM": {
17+
"common": ["--asm", "--interleave"],
18+
"asm": [],
19+
"c": [],
20+
"cxx": [],
21+
"ld": []
1522
}
1623
}

tools/toolchains/arm.py

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -240,37 +240,5 @@ def __init__(self, target, notify=None, macros=None,
240240
ARM.__init__(self, target, notify, macros, silent,
241241
extra_verbose=extra_verbose, build_profile=build_profile)
242242

243-
# Extend flags
244-
self.flags['common'].extend(["-D__MICROLIB"])
245-
self.flags['c'].extend(["--library_type=microlib"])
246-
self.flags['ld'].extend(["--library_type=microlib"])
247-
248243
# Run-time values
249-
self.asm += ["-D__MICROLIB"]
250-
self.cc += ["-D__MICROLIB", "--library_type=microlib"]
251-
self.cppc += ["-D__MICROLIB", "--library_type=microlib"]
252-
self.ld += ["--library_type=microlib"]
253-
254-
# Only allow a single thread
255-
self.cc += ["-DMBED_RTOS_SINGLE_THREAD"]
256-
self.cppc += ["-DMBED_RTOS_SINGLE_THREAD"]
257-
258-
# We had to patch microlib to add C++ support
259-
# In later releases this patch should have entered mainline
260-
if ARM_MICRO.PATCHED_LIBRARY:
261-
# Run-time values
262-
self.flags['ld'].extend(["--noscanlib"])
263-
# Run-time values
264-
self.ld += ["--noscanlib"]
265-
266-
# System Libraries
267-
self.sys_libs.extend([join(TOOLCHAIN_PATHS['ARM'], "lib", "microlib", lib+".l") for lib in ["mc_p", "mf_p", "m_ps"]])
268-
269-
if target.core == "Cortex-M3":
270-
self.sys_libs.extend([join(TOOLCHAIN_PATHS['ARM'], "lib", "cpplib", lib+".l") for lib in ["cpp_ws", "cpprt_w"]])
271-
272-
elif target.core in ["Cortex-M0", "Cortex-M0+"]:
273-
self.sys_libs.extend([join(TOOLCHAIN_PATHS['ARM'], "lib", "cpplib", lib+".l") for lib in ["cpp_ps", "cpprt_p"]])
274-
else:
275-
# Run-time values
276-
self.ld.extend(["--libpath", join(TOOLCHAIN_PATHS['ARM'], "lib")])
244+
self.ld.extend(["--libpath", join(TOOLCHAIN_PATHS['ARM'], "lib")])

0 commit comments

Comments
 (0)