Skip to content
This repository has been archived by the owner on Oct 1, 2021. It is now read-only.

VRBRAIN: changed some cmake files for building with waf #63

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmake/common/px4_base.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ function(px4_add_upload)
list(APPEND serial_ports
/dev/serial/by-id/usb-3D_Robotics*
/dev/serial/by-id/pci-3D_Robotics*
/dev/serial/by-id/usb-Laser_Navigation*
)
elseif(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Darwin")
list(APPEND serial_ports
Expand Down
48 changes: 48 additions & 0 deletions cmake/nuttx/px4_impl_nuttx.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,54 @@ function(px4_os_add_flags)
-mthumb
-march=armv7-m
)
elseif (${BOARD} STREQUAL "vrbrain-v51")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason to do it that way? You could use elseif (${BOARD} MATCHES "vrbrain-.*"), no?

set(cpu_flags
-mcpu=cortex-m4
-mthumb
-march=armv7e-m
-mfpu=fpv4-sp-d16
-mfloat-abi=hard
)
elseif (${BOARD} STREQUAL "vrbrain-v52")
set(cpu_flags
-mcpu=cortex-m4
-mthumb
-march=armv7e-m
-mfpu=fpv4-sp-d16
-mfloat-abi=hard
)
elseif (${BOARD} STREQUAL "vrbrain-v54")
set(cpu_flags
-mcpu=cortex-m4
-mthumb
-march=armv7e-m
-mfpu=fpv4-sp-d16
-mfloat-abi=hard
)
elseif (${BOARD} STREQUAL "vrubrain-v51")
set(cpu_flags
-mcpu=cortex-m4
-mthumb
-march=armv7e-m
-mfpu=fpv4-sp-d16
-mfloat-abi=hard
)
elseif (${BOARD} STREQUAL "vrubrain-v52")
set(cpu_flags
-mcpu=cortex-m4
-mthumb
-march=armv7e-m
-mfpu=fpv4-sp-d16
-mfloat-abi=hard
)
elseif (${BOARD} STREQUAL "vrcore-v10")
set(cpu_flags
-mcpu=cortex-m4
-mthumb
-march=armv7e-m
-mfpu=fpv4-sp-d16
-mfloat-abi=hard
)
endif()
list(APPEND c_flags ${cpu_flags})
list(APPEND cxx_flags ${cpu_flags})
Expand Down