mirror of https://github.com/ARMmbed/mbed-os.git
Add debug-info option
parent
df9e56f638
commit
bd7554f6aa
|
|
@ -19,6 +19,6 @@ def get_default_options_parser():
|
|||
help="clean the build directory")
|
||||
|
||||
parser.add_option("-o", "--options", action="append",
|
||||
help='Add a build option ("save-asm": save the asm generated by the compiler)')
|
||||
help='Add a build option ("save-asm": save the asm generated by the compiler, "debug-info": generate debugging information)')
|
||||
|
||||
return parser
|
||||
|
|
|
|||
|
|
@ -32,6 +32,9 @@ class ARM(mbedToolchain):
|
|||
if "save-asm" in self.options:
|
||||
common.extend(["--asm", "--interleave"])
|
||||
|
||||
if "debug-info" in self.options:
|
||||
common.append("-g")
|
||||
|
||||
common_c = [
|
||||
"--md", "--no_depend_system_headers",
|
||||
'-I%s' % ARM_INC
|
||||
|
|
|
|||
|
|
@ -40,6 +40,9 @@ class GCC(mbedToolchain):
|
|||
if "save-asm" in self.options:
|
||||
common_flags.append("-save-temps")
|
||||
|
||||
if "debug-info" in self.options:
|
||||
common_flags.append("-g")
|
||||
|
||||
self.asm = [join(tool_path, "arm-none-eabi-as")] + self.cpu
|
||||
|
||||
self.cc = [join(tool_path, "arm-none-eabi-gcc"), "-std=gnu99"] + common_flags
|
||||
|
|
|
|||
|
|
@ -29,6 +29,9 @@ class IAR(mbedToolchain):
|
|||
"--diag_suppress=Pa050,Pa084,Pa093,Pa082",
|
||||
]
|
||||
|
||||
if "debug-info" in self.options:
|
||||
c_flags.append("-r")
|
||||
|
||||
IAR_BIN = join(IAR_PATH, "bin")
|
||||
self.asm = [join(IAR_BIN, "iasmarm")] + ["--cpu", target.core]
|
||||
self.cc = [join(IAR_BIN, "iccarm")] + c_flags
|
||||
|
|
|
|||
Loading…
Reference in New Issue