Merge pull request #40 from 0xc0170/fix_debug_symbols

Add debug tables to all builds (release/debug)
Bogdan Marinescu 2016-04-12 13:32:00 +03:00
commit b37d50e8ec
3 changed files with 6 additions and 3 deletions

View File

@ -53,10 +53,11 @@ class ARM(mbedToolchain):
common.extend(["--asm", "--interleave"]) common.extend(["--asm", "--interleave"])
if "debug-info" in self.options: if "debug-info" in self.options:
common.append("-g")
common.append("-O0") common.append("-O0")
else: else:
common.append("-O3") common.append("-O3")
# add debug symbols for all builds
common.append("-g")
common_c = [ common_c = [
"--md", "--no_depend_system_headers", "--md", "--no_depend_system_headers",

View File

@ -75,10 +75,11 @@ class GCC(mbedToolchain):
common_flags.append("-save-temps") common_flags.append("-save-temps")
if "debug-info" in self.options: if "debug-info" in self.options:
common_flags.append("-g")
common_flags.append("-O0") common_flags.append("-O0")
else: else:
common_flags.append("-O2") common_flags.append("-O2")
# add debug symbols for all builds
common_flags.append("-g")
main_cc = join(tool_path, "arm-none-eabi-gcc") main_cc = join(tool_path, "arm-none-eabi-gcc")
main_cppc = join(tool_path, "arm-none-eabi-g++") main_cppc = join(tool_path, "arm-none-eabi-g++")

View File

@ -53,10 +53,11 @@ class IAR(mbedToolchain):
if "debug-info" in self.options: if "debug-info" in self.options:
c_flags.append("-r")
c_flags.append("-On") c_flags.append("-On")
else: else:
c_flags.append("-Oh") c_flags.append("-Oh")
# add debug symbols for all builds
c_flags.append("-r")
IAR_BIN = join(IAR_PATH, "bin") IAR_BIN = join(IAR_PATH, "bin")
main_cc = join(IAR_BIN, "iccarm") main_cc = join(IAR_BIN, "iccarm")