diff --git a/tools/profiles/debug.json b/tools/profiles/debug.json index 5aced11431..b463f0ab7c 100644 --- a/tools/profiles/debug.json +++ b/tools/profiles/debug.json @@ -22,6 +22,16 @@ "cxx": ["--cpp", "--no_rtti", "--no_vla"], "ld": [] }, + "uARM": { + "common": ["-c", "--gnu", "-Otime", "--split_sections", + "--apcs=interwork", "--brief_diagnostics", "--restrict", + "--multibyte_chars", "-O0", "-D__MICROLIB", "-g" + "--library_type=microlib", "-DMBED_RTOS_SINGLE_THREAD"], + "asm": [], + "c": ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"], + "cxx": ["--cpp", "--no_rtti", "--no_vla"], + "ld": ["--library_type=microlib"] + }, "IAR": { "common": [ "--no_wrap_diagnostics", "non-native end of line sequence", "-e", diff --git a/tools/profiles/default.json b/tools/profiles/default.json index 49c7c95286..d4755e9b81 100644 --- a/tools/profiles/default.json +++ b/tools/profiles/default.json @@ -22,6 +22,16 @@ "cxx": ["--cpp", "--no_rtti", "--no_vla"], "ld": [] }, + "uARM": { + "common": ["-c", "--gnu", "-Otime", "--split_sections", + "--apcs=interwork", "--brief_diagnostics", "--restrict", + "--multibyte_chars", "-O3", "-D__MICROLIB", + "--library_type=microlib", "-DMBED_RTOS_SINGLE_THREAD"], + "asm": [], + "c": ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"], + "cxx": ["--cpp", "--no_rtti", "--no_vla"], + "ld": ["--library_type=microlib"] + }, "IAR": { "common": [ "--no_wrap_diagnostics", "-e", diff --git a/tools/profiles/save-asm.json b/tools/profiles/save-asm.json index fe4c0c8efd..04128176d9 100644 --- a/tools/profiles/save-asm.json +++ b/tools/profiles/save-asm.json @@ -12,5 +12,12 @@ "c": [], "cxx": [], "ld": [] + }, + "uARM": { + "common": ["--asm", "--interleave"], + "asm": [], + "c": [], + "cxx": [], + "ld": [] } } diff --git a/tools/toolchains/arm.py b/tools/toolchains/arm.py index fc543959d5..5eb5387187 100644 --- a/tools/toolchains/arm.py +++ b/tools/toolchains/arm.py @@ -240,37 +240,5 @@ class ARM_MICRO(ARM): ARM.__init__(self, target, notify, macros, silent, extra_verbose=extra_verbose, build_profile=build_profile) - # Extend flags - self.flags['common'].extend(["-D__MICROLIB"]) - self.flags['c'].extend(["--library_type=microlib"]) - self.flags['ld'].extend(["--library_type=microlib"]) - # Run-time values - self.asm += ["-D__MICROLIB"] - self.cc += ["-D__MICROLIB", "--library_type=microlib"] - self.cppc += ["-D__MICROLIB", "--library_type=microlib"] - self.ld += ["--library_type=microlib"] - - # Only allow a single thread - self.cc += ["-DMBED_RTOS_SINGLE_THREAD"] - self.cppc += ["-DMBED_RTOS_SINGLE_THREAD"] - - # We had to patch microlib to add C++ support - # In later releases this patch should have entered mainline - if ARM_MICRO.PATCHED_LIBRARY: - # Run-time values - self.flags['ld'].extend(["--noscanlib"]) - # Run-time values - self.ld += ["--noscanlib"] - - # System Libraries - self.sys_libs.extend([join(TOOLCHAIN_PATHS['ARM'], "lib", "microlib", lib+".l") for lib in ["mc_p", "mf_p", "m_ps"]]) - - if target.core == "Cortex-M3": - self.sys_libs.extend([join(TOOLCHAIN_PATHS['ARM'], "lib", "cpplib", lib+".l") for lib in ["cpp_ws", "cpprt_w"]]) - - elif target.core in ["Cortex-M0", "Cortex-M0+"]: - self.sys_libs.extend([join(TOOLCHAIN_PATHS['ARM'], "lib", "cpplib", lib+".l") for lib in ["cpp_ps", "cpprt_p"]]) - else: - # Run-time values - self.ld.extend(["--libpath", join(TOOLCHAIN_PATHS['ARM'], "lib")]) + self.ld.extend(["--libpath", join(TOOLCHAIN_PATHS['ARM'], "lib")])