From c50359a5b51d4a1afa9d308a1a1c47d9f1876345 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 8 Mar 2018 08:37:42 +1100 Subject: [PATCH] waf: throw an error if hwdef.dat can't be processed --- Tools/ardupilotwaf/chibios.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Tools/ardupilotwaf/chibios.py b/Tools/ardupilotwaf/chibios.py index 93124f1ff8..c42efcfa70 100644 --- a/Tools/ardupilotwaf/chibios.py +++ b/Tools/ardupilotwaf/chibios.py @@ -232,7 +232,9 @@ def configure(cfg): cmd = 'python %s -D %s %s' % (hwdef_script, hwdef_out, hwdef) ret = subprocess.call(cmd, shell=True) except Exception: - print("Failed to generate hwdef.h") + cfg.fatal("Failed to process hwdef.dat") + if ret != 0: + cfg.fatal("Failed to process hwdef.dat ret=%d" % ret) load_env_vars(cfg.env) if env.HAL_WITH_UAVCAN: