mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user