Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion workspace_tools/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions workspace_tools/toolchains/arm.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ def __init__(self, target, options=None, notify=None):

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",
Expand Down
3 changes: 3 additions & 0 deletions workspace_tools/toolchains/gcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ def __init__(self, target, options=None, notify=None, tool_path=""):

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

Expand Down
3 changes: 3 additions & 0 deletions workspace_tools/toolchains/iar.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ def __init__(self, target, options=None, notify=None):
# 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]
Expand Down