Skip to content

Commit

Permalink
waf: added -g option to configure
Browse files Browse the repository at this point in the history
this adds debug symbolds to the build without enabling other debug
code. This is needed for analysing watchdog crash dumps
  • Loading branch information
tridge committed Jul 20, 2023
1 parent 30ee2aa commit bf98bfb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Tools/ardupilotwaf/boards.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,10 @@ def configure_env(self, cfg, env):
env.DEFINES.update(
HAL_DEBUG_BUILD = 1,
)
elif cfg.options.g:
env.CFLAGS += [
'-g',
]
if cfg.env.COVERAGE:
env.CFLAGS += [
'-fprofile-arcs',
Expand Down
5 changes: 5 additions & 0 deletions wscript
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,11 @@ def options(opt):
default=False,
help='Configure as debug variant.')

g.add_option('-g',
action='store_true',
default=False,
help='Add debug symbolds to build.')

g.add_option('--disable-watchdog',
action='store_true',
default=False,
Expand Down

0 comments on commit bf98bfb

Please sign in to comment.