Cygwin: Enable ARM build of px4fmu-vX_default under Windows Cygwin Environment

This commit is contained in:
Matthias Grob
2018-01-05 14:47:33 -05:00
committed by Daniel Agar
parent 70de169f15
commit 2186f7b1b1
3 changed files with 67 additions and 4 deletions
+9 -1
View File
@@ -43,6 +43,8 @@ px4_add_module(
platforms__common
)
include(cygwin_cygpath)
# include the px4io binary in ROMFS
message(STATUS "Building and including ${config_io_board}")
@@ -60,9 +62,15 @@ add_custom_command(OUTPUT ${fw_io_exe}
COMMENT "Building ${config_io_board}"
USES_TERMINAL
)
# only in the cygwin environment: convert paths for
# binary in and output to mixed windows paths (C:/...)
CYGPATH(fw_io_exe fw_io_exe_cyg)
CYGPATH(fw_io_bin fw_io_bin_cyg)
add_custom_command(OUTPUT ${fw_io_bin}
COMMAND mkdir -p ${PX4_BINARY_DIR}/ROMFS/${config_romfs_root}/extras/
COMMAND ${OBJCOPY} -O binary ${fw_io_exe} ${fw_io_bin}
COMMAND ${OBJCOPY} -O binary ${fw_io_exe_cyg} ${fw_io_bin_cyg}
DEPENDS ${fw_io_exe}
COMMENT "Copying ${config_io_board} to ROMFS extras"
)