Merge pull request #10 from spectaclelabs/debug-option

Add debug-info option
pull/11/head
Emilio Monti 2013-07-03 06:40:41 -07:00
commit b85343e4f3
4 changed files with 10 additions and 1 deletions

View File

@ -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

View File

@ -31,6 +31,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",

View File

@ -39,6 +39,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

View File

@ -28,6 +28,9 @@ class IAR(mbedToolchain):
# Pa082: Operation involving two values from two registers (ie: (float)(*obj->MR)/(float)(LPC_PWM1->MR0))
"--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]