|
|
|
@ -99,7 +99,7 @@ def relwaf():
@@ -99,7 +99,7 @@ def relwaf():
|
|
|
|
|
return "./modules/waf/waf-light" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def waf_configure(board, j=None, debug=False, math_check_indexes=False, coverage=False, ekf_single=False, postype_single=False, sitl_32bit=False, ubsan=False, ubsan_abort=False, extra_args=[], extra_hwdef=None): |
|
|
|
|
def waf_configure(board, j=None, debug=False, math_check_indexes=False, coverage=False, ekf_single=False, postype_single=False, sitl_32bit=False, extra_args=[], extra_hwdef=None, ubsan=False, ubsan_abort=False, extra_defines={}): |
|
|
|
|
cmd_configure = [relwaf(), "configure", "--board", board] |
|
|
|
|
if debug: |
|
|
|
|
cmd_configure.append('--debug') |
|
|
|
@ -119,6 +119,8 @@ def waf_configure(board, j=None, debug=False, math_check_indexes=False, coverage
@@ -119,6 +119,8 @@ def waf_configure(board, j=None, debug=False, math_check_indexes=False, coverage
|
|
|
|
|
cmd_configure.append('--ubsan-abort') |
|
|
|
|
if extra_hwdef is not None: |
|
|
|
|
cmd_configure.extend(['--extra-hwdef', extra_hwdef]) |
|
|
|
|
for nv in extra_defines.items(): |
|
|
|
|
cmd_configure.extend(['--define', "%s=%s" % nv]) |
|
|
|
|
if j is not None: |
|
|
|
|
cmd_configure.extend(['-j', str(j)]) |
|
|
|
|
pieces = [shlex.split(x) for x in extra_args] |
|
|
|
@ -137,8 +139,23 @@ def waf_build(target=None):
@@ -137,8 +139,23 @@ def waf_build(target=None):
|
|
|
|
|
cmd.append(target) |
|
|
|
|
run_cmd(cmd, directory=topdir(), checkfail=True) |
|
|
|
|
|
|
|
|
|
def build_SITL(build_target, j=None, debug=False, board='sitl', clean=True, configure=True, math_check_indexes=False, coverage=False, |
|
|
|
|
ekf_single=False, postype_single=False, sitl_32bit=False, ubsan=False, ubsan_abort=False, extra_configure_args=[]): |
|
|
|
|
def build_SITL( |
|
|
|
|
build_target, |
|
|
|
|
board='sitl', |
|
|
|
|
clean=True, |
|
|
|
|
configure=True, |
|
|
|
|
coverage=False, |
|
|
|
|
debug=False, |
|
|
|
|
ekf_single=False, |
|
|
|
|
extra_configure_args=[], |
|
|
|
|
extra_defines={}, |
|
|
|
|
j=None, |
|
|
|
|
math_check_indexes=False, |
|
|
|
|
postype_single=False, |
|
|
|
|
sitl_32bit=False, |
|
|
|
|
ubsan=False, |
|
|
|
|
ubsan_abort=False, |
|
|
|
|
): |
|
|
|
|
|
|
|
|
|
# first configure |
|
|
|
|
if configure: |
|
|
|
@ -152,6 +169,7 @@ def build_SITL(build_target, j=None, debug=False, board='sitl', clean=True, conf
@@ -152,6 +169,7 @@ def build_SITL(build_target, j=None, debug=False, board='sitl', clean=True, conf
|
|
|
|
|
sitl_32bit=sitl_32bit, |
|
|
|
|
ubsan=ubsan, |
|
|
|
|
ubsan_abort=ubsan_abort, |
|
|
|
|
extra_defines=extra_defines, |
|
|
|
|
extra_args=extra_configure_args) |
|
|
|
|
|
|
|
|
|
# then clean |
|
|
|
|