Cygwin: enable arm nuttx upload within cygwin

In the Cygwin environment the native Windows serial COM# ports get mapped
to /dev/ttyS# for POSIX compatibility. While # is one number lower inside
the environment than the COM port number because it's 0 indexed instead
of 1.

I added the necessary handling to all the dependent parts I found which
allows uploading to /dev/ttyS# when the cygwin platform is detected.
Now the usual "make px4fmu-v4 upload" and
"./Tools/upload.sh build/px4fmu-v4_default/px4fmu-v4_default.px4" work.
This commit is contained in:
Matthias Grob
2018-05-08 19:12:29 +01:00
committed by Beat Küng
parent c6b0d5c76a
commit 58dd7be12a
3 changed files with 14 additions and 1 deletions

View File

@@ -166,6 +166,10 @@ if (TARGET parameters_xml AND TARGET airframes_xml)
list(APPEND serial_ports
/dev/tty.usbmodemPX*,/dev/tty.usbmodem*
)
elseif(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "CYGWIN")
list(APPEND serial_ports
/dev/ttyS*
)
elseif(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows")
foreach(port RANGE 32 0)
list(APPEND serial_ports