waf: auto-build abin files for ChibiOS

This commit is contained in:
Andrew Tridgell 2018-01-18 19:42:59 +11:00
parent d208dc69d3
commit b0c16f7eb9

View File

@ -62,7 +62,8 @@ class generate_fw(Task.Task):
color='CYAN'
run_str='${OBJCOPY} -O binary ${SRC} ${SRC}.bin && \
python ${UPLOAD_TOOLS}/px_mkfw.py --image ${SRC}.bin \
--prototype ${BUILDROOT}/apj.prototype > ${TGT}'
--prototype ${BUILDROOT}/apj.prototype > ${TGT} && \
${CHIBIOS_SCRIPTS}/make_abin.sh ${SRC}.bin ${SRC}.abin'
always_run = True
def keyword(self):
return "Generating"
@ -115,6 +116,7 @@ def configure(cfg):
env.BUILDROOT = bldpath('')
env.PT_DIR = srcpath('Tools/ardupilotwaf/chibios/image')
env.UPLOAD_TOOLS = srcpath('Tools/ardupilotwaf')
env.CHIBIOS_SCRIPTS = srcpath('libraries/AP_HAL_ChibiOS/hwdef/scripts')
env.APJ_TOOL = srcpath('Tools/scripts/apj_tool.py')
env.SERIAL_PORT = srcpath('/dev/serial/by-id/*_STLink*')