Skip to content

Commit b37d50e

Browse files
committed
Merge pull request #40 from 0xc0170/fix_debug_symbols
Add debug tables to all builds (release/debug)
2 parents 5828ebd + 75d04a3 commit b37d50e

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

tools/toolchains/arm.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,11 @@ def __init__(self, target, options=None, notify=None, macros=None, silent=False,
5353
common.extend(["--asm", "--interleave"])
5454

5555
if "debug-info" in self.options:
56-
common.append("-g")
5756
common.append("-O0")
5857
else:
5958
common.append("-O3")
59+
# add debug symbols for all builds
60+
common.append("-g")
6061

6162
common_c = [
6263
"--md", "--no_depend_system_headers",

tools/toolchains/gcc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,11 @@ def __init__(self, target, options=None, notify=None, macros=None, silent=False,
7575
common_flags.append("-save-temps")
7676

7777
if "debug-info" in self.options:
78-
common_flags.append("-g")
7978
common_flags.append("-O0")
8079
else:
8180
common_flags.append("-O2")
81+
# add debug symbols for all builds
82+
common_flags.append("-g")
8283

8384
main_cc = join(tool_path, "arm-none-eabi-gcc")
8485
main_cppc = join(tool_path, "arm-none-eabi-g++")

tools/toolchains/iar.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,11 @@ def __init__(self, target, options=None, notify=None, macros=None, silent=False,
5353

5454

5555
if "debug-info" in self.options:
56-
c_flags.append("-r")
5756
c_flags.append("-On")
5857
else:
5958
c_flags.append("-Oh")
59+
# add debug symbols for all builds
60+
c_flags.append("-r")
6061

6162
IAR_BIN = join(IAR_PATH, "bin")
6263
main_cc = join(IAR_BIN, "iccarm")

0 commit comments

Comments
 (0)