Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename platforms/ -> os/ (PX4 layers discussion) #11232

Closed
wants to merge 1 commit into from
Closed
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
8 changes: 4 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@
path = src/modules/micrortps_bridge/micro-CDR
url = https://github.com/eProsima/micro-CDR.git
branch = master
[submodule "platforms/nuttx/NuttX/nuttx"]
path = platforms/nuttx/NuttX/nuttx
[submodule "os/nuttx/NuttX/nuttx"]
path = os/nuttx/NuttX/nuttx
url = https://github.com/PX4/NuttX.git
branch = px4_firmware_nuttx-7.22+
[submodule "platforms/nuttx/NuttX/apps"]
path = platforms/nuttx/NuttX/apps
[submodule "os/nuttx/NuttX/apps"]
path = os/nuttx/NuttX/apps
url = https://github.com/PX4/NuttX-apps.git
branch = px4_firmware_nuttx-7.22+
[submodule "cmake/configs/uavcan_board_ident"]
Expand Down
22 changes: 11 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
# * Common functions should be included in px_base.cmake.
#
# * OS/ board specific fucntions should be include in
# px_impl_${PX4_PLATFORM}.cmake or px4_impl_${PX4_PLATFORM}_${PX4_BOARD}.cmake.
# px_impl_${PX4_OS}.cmake or px4_impl_${PX4_OS}_${PX4_BOARD}.cmake.
#
# Formatting
# ---------------------------------------------------------------------------
Expand Down Expand Up @@ -92,9 +92,9 @@
# ---------------------------------------------------------------------------
#
# * If referencing a string variable, don't put it in quotes.
# Don't do "${PX4_PLATFORM}" STREQUAL "posix",
# instead type ${PX4_PLATFORM} STREQUAL "posix". This will throw an
# error when ${PX4_PLATFORM} is not defined instead of silently
# Don't do "${PX4_OS}" STREQUAL "posix",
# instead type ${PX4_OS} STREQUAL "posix". This will throw an
# error when ${PX4_OS} is not defined instead of silently
# evaluating to false.
#
#=============================================================================
Expand Down Expand Up @@ -214,7 +214,7 @@ message(STATUS "PX4 config file: ${PX4_CONFIG_FILE}")
include(px4_add_board)
include(${PX4_CONFIG_FILE})
message(STATUS "PX4 config: ${PX4_CONFIG}")
message(STATUS "PX4 platform: ${PX4_PLATFORM}")
message(STATUS "PX4 platform: ${PX4_OS}")

if (ENABLE_LOCKSTEP_SCHEDULER)
add_definitions(-DENABLE_LOCKSTEP_SCHEDULER)
Expand All @@ -232,12 +232,12 @@ endif()

set_property(GLOBAL PROPERTY PX4_MODULE_CONFIG_FILES)

include(platforms/${PX4_PLATFORM}/cmake/px4_impl_os.cmake)
list(APPEND CMAKE_MODULE_PATH ${PX4_SOURCE_DIR}/platforms/${PX4_PLATFORM}/cmake)
include(os/${PX4_OS}/cmake/px4_impl_os.cmake)
list(APPEND CMAKE_MODULE_PATH ${PX4_SOURCE_DIR}/os/${PX4_OS}/cmake)

# CMake build type (Debug Release RelWithDebInfo MinSizeRel Coverage)
if (NOT CMAKE_BUILD_TYPE)
if (${PX4_PLATFORM} STREQUAL "nuttx")
if (${PX4_OS} STREQUAL "nuttx")
set(PX4_BUILD_TYPE "MinSizeRel")
else()
set(PX4_BUILD_TYPE "RelWithDebInfo")
Expand Down Expand Up @@ -279,7 +279,7 @@ endif()
#=============================================================================

# Setup install paths
if (${PX4_PLATFORM} STREQUAL "posix")
if (${PX4_OS} STREQUAL "posix")

# This makes it possible to dynamically load code which depends on symbols
# inside the px4 executable.
Expand Down Expand Up @@ -367,7 +367,7 @@ px4_generate_airframes_xml(BOARD ${PX4_BOARD})
# DriverFramework
#
px4_add_git_submodule(TARGET git_driverframework PATH "src/lib/DriverFramework")
set(OS ${PX4_PLATFORM})
set(OS ${PX4_OS})
add_subdirectory(src/lib/DriverFramework/framework)

# List the DriverFramework drivers
Expand Down Expand Up @@ -435,7 +435,7 @@ add_subdirectory(src/lib/parameters EXCLUDE_FROM_ALL)
target_link_libraries(parameters_interface INTERFACE parameters)

# firmware added last to generate the builtin for included modules
add_subdirectory(platforms/${PX4_PLATFORM})
add_subdirectory(os/${PX4_OS})

#=============================================================================
# uORB graph generation: add a custom target 'uorb_graph'
Expand Down
4 changes: 2 additions & 2 deletions Tools/astyle/files_to_check_code_style.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ then
PATTERN="$1"
fi

exec find boards src platforms \
-path platforms/nuttx/NuttX -prune -o \
exec find boards src os \
-path os/nuttx/NuttX -prune -o \
-path src/lib/DriverFramework -prune -o \
-path src/lib/ecl -prune -o \
-path src/lib/matrix -prune -o \
Expand Down
2 changes: 1 addition & 1 deletion boards/aerotenna/ocpoc/ubuntu.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ px4_add_board(
VENDOR aerotenna
MODEL ocpoc
LABEL ubuntu
PLATFORM posix
OS posix
ARCHITECTURE cortex-a9
TOOLCHAIN arm-linux-gnueabihf
TESTING
Expand Down
2 changes: 1 addition & 1 deletion boards/airmind/mindpx-v2/default.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

px4_add_board(
PLATFORM nuttx
OS nuttx
VENDOR airmind
MODEL mindpx-v2
TOOLCHAIN arm-none-eabi
Expand Down
4 changes: 2 additions & 2 deletions boards/atlflight/eagle/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@
# Upload
############################################################################

if("${PX4_PLATFORM}" MATCHES "qurt")
if("${PX4_OS}" MATCHES "qurt")

add_custom_target(upload
COMMAND
${CMAKE_CURRENT_SOURCE_DIR}/scripts/adb_upload.sh
${PX4_BINARY_DIR}/platforms/qurt/libpx4.so ${PX4_BINARY_DIR}/platforms/qurt/libpx4muorb_skel.so ${PX4_SOURCE_DIR}/posix-configs/eagle/flight/px4.config # source
${PX4_BINARY_DIR}/os/qurt/libpx4.so ${PX4_BINARY_DIR}/os/qurt/libpx4muorb_skel.so ${PX4_SOURCE_DIR}/posix-configs/eagle/flight/px4.config # source
/usr/share/data/adsp # destination
DEPENDS px4 px4muorb_skel
COMMENT "uploading px4"
Expand Down
2 changes: 1 addition & 1 deletion boards/atlflight/eagle/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ add_definitions(
)

px4_add_board(
PLATFORM posix
OS posix
VENDOR atlflight
MODEL eagle
LABEL default
Expand Down
2 changes: 1 addition & 1 deletion boards/atlflight/eagle/qurt-default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ set(DISABLE_PARAMS_MODULE_SCOPING TRUE)
add_definitions(-D__PX4_QURT_EAGLE)

px4_add_board(
PLATFORM qurt
OS qurt
VENDOR atlflight
MODEL eagle
LABEL qurt-default
Expand Down
2 changes: 1 addition & 1 deletion boards/atlflight/excelsior/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ add_definitions(
)

px4_add_board(
PLATFORM posix
OS posix
VENDOR atlflight
MODEL excelsior
LABEL default
Expand Down
2 changes: 1 addition & 1 deletion boards/atlflight/excelsior/qurt-default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ set(DISABLE_PARAMS_MODULE_SCOPING TRUE)
add_definitions(-D__PX4_QURT_EXCELSIOR)

px4_add_board(
PLATFORM qurt
OS qurt
VENDOR atlflight
MODEL excelsior
LABEL qurt-default
Expand Down
2 changes: 1 addition & 1 deletion boards/atmel/same70xplained/default.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

px4_add_board(
PLATFORM nuttx
OS nuttx
VENDOR atmel
MODEL same70xplained
TOOLCHAIN arm-none-eabi
Expand Down
2 changes: 1 addition & 1 deletion boards/auav/esc35-v1/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ px4_make_uavcan_bootloadable(
)

px4_add_board(
PLATFORM nuttx
OS nuttx
VENDOR auav
MODEL esc35-v1
TOOLCHAIN arm-none-eabi
Expand Down
2 changes: 1 addition & 1 deletion boards/auav/x21/default.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

px4_add_board(
PLATFORM nuttx
OS nuttx
VENDOR auav
MODEL x21
TOOLCHAIN arm-none-eabi
Expand Down
2 changes: 1 addition & 1 deletion boards/av/x-v1/default.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

px4_add_board(
PLATFORM nuttx
OS nuttx
VENDOR av
MODEL x-v1
TOOLCHAIN arm-none-eabi
Expand Down
2 changes: 1 addition & 1 deletion boards/beaglebone/blue/cross.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ px4_add_board(
VENDOR beaglebone
MODEL blue
LABEL cross
PLATFORM posix
OS posix
ARCHITECTURE cortex-a8
TOOLCHAIN arm-linux-gnueabihf
TESTING
Expand Down
2 changes: 1 addition & 1 deletion boards/beaglebone/blue/native.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ px4_add_board(
VENDOR beaglebone
MODEL blue
LABEL native
PLATFORM posix
OS posix
TESTING

DRIVERS
Expand Down
2 changes: 1 addition & 1 deletion boards/bitcraze/crazyflie/default.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

px4_add_board(
PLATFORM nuttx
OS nuttx
VENDOR bitcraze
MODEL crazyflie
TOOLCHAIN arm-none-eabi
Expand Down
2 changes: 1 addition & 1 deletion boards/emlid/navio2/cross.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ px4_add_board(
VENDOR emlid
MODEL navio2
LABEL cross
PLATFORM posix
OS posix
ARCHITECTURE cortex-a53
TOOLCHAIN arm-linux-gnueabihf
TESTING
Expand Down
2 changes: 1 addition & 1 deletion boards/emlid/navio2/native.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ px4_add_board(
VENDOR emlid
MODEL navio2
LABEL native
PLATFORM posix
OS posix
TESTING

DRIVERS
Expand Down
2 changes: 1 addition & 1 deletion boards/gumstix/aerocore2/default.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

px4_add_board(
PLATFORM nuttx
OS nuttx
VENDOR gumstix
MODEL aerocore2
TOOLCHAIN arm-none-eabi
Expand Down
2 changes: 1 addition & 1 deletion boards/intel/aerofc-v1/default.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

px4_add_board(
PLATFORM nuttx
OS nuttx
VENDOR intel
MODEL aerofc-v1
TOOLCHAIN arm-none-eabi
Expand Down
2 changes: 1 addition & 1 deletion boards/intel/aerofc-v1/rtps.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

px4_add_board(
PLATFORM nuttx
OS nuttx
VENDOR intel
MODEL aerofc-v1
LABEL rtsp
Expand Down
2 changes: 1 addition & 1 deletion boards/nxp/fmuk66-v3/default.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

px4_add_board(
PLATFORM nuttx
OS nuttx
VENDOR nxp
MODEL fmuk66-v3
TOOLCHAIN arm-none-eabi
Expand Down
2 changes: 1 addition & 1 deletion boards/omnibus/f4sd/default.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

px4_add_board(
PLATFORM nuttx
OS nuttx
VENDOR omnibus
MODEL f4sd
TOOLCHAIN arm-none-eabi
Expand Down
2 changes: 1 addition & 1 deletion boards/parrot/bebop/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
px4_add_board(
VENDOR parrot
MODEL bebop
PLATFORM posix
OS posix
ARCHITECTURE cortex-a53
TOOLCHAIN arm-linux-gnueabihf

Expand Down
2 changes: 1 addition & 1 deletion boards/px4/cannode-v1/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ px4_make_uavcan_bootloadable(
)

px4_add_board(
PLATFORM nuttx
OS nuttx
VENDOR px4
MODEL cannode-v1
TOOLCHAIN arm-none-eabi
Expand Down
2 changes: 1 addition & 1 deletion boards/px4/esc-v1/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ px4_make_uavcan_bootloadable(
)

px4_add_board(
PLATFORM nuttx
OS nuttx
VENDOR px4
MODEL esc-v1
TOOLCHAIN arm-none-eabi
Expand Down
2 changes: 1 addition & 1 deletion boards/px4/fmu-v2/default.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

px4_add_board(
PLATFORM nuttx
OS nuttx
VENDOR px4
MODEL fmu-v2
TOOLCHAIN arm-none-eabi
Expand Down
2 changes: 1 addition & 1 deletion boards/px4/fmu-v2/lpe.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

px4_add_board(
PLATFORM nuttx
OS nuttx
VENDOR px4
MODEL fmu-v2
LABEL lpe
Expand Down
2 changes: 1 addition & 1 deletion boards/px4/fmu-v2/test.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

px4_add_board(
PLATFORM nuttx
OS nuttx
VENDOR px4
MODEL fmu-v2
LABEL test
Expand Down
2 changes: 1 addition & 1 deletion boards/px4/fmu-v3/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# FMUv3 is FMUv2 with access to the full 2MB flash

px4_add_board(
PLATFORM nuttx
OS nuttx
VENDOR px4
MODEL fmu-v3
LABEL default
Expand Down
2 changes: 1 addition & 1 deletion boards/px4/fmu-v3/rtps.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# FMUv3 is FMUv2 with access to the full 2MB flash

px4_add_board(
PLATFORM nuttx
OS nuttx
VENDOR px4
MODEL fmu-v3
LABEL rtps
Expand Down
2 changes: 1 addition & 1 deletion boards/px4/fmu-v3/stackcheck.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# FMUv3 is FMUv2 with access to the full 2MB flash

px4_add_board(
PLATFORM nuttx
OS nuttx
VENDOR px4
MODEL fmu-v3
LABEL stackcheck
Expand Down
2 changes: 1 addition & 1 deletion boards/px4/fmu-v4/default.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

px4_add_board(
PLATFORM nuttx
OS nuttx
VENDOR px4
MODEL fmu-v4
LABEL default
Expand Down
2 changes: 1 addition & 1 deletion boards/px4/fmu-v4/rtps.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

px4_add_board(
PLATFORM nuttx
OS nuttx
VENDOR px4
MODEL fmu-v4
LABEL rtps
Expand Down
2 changes: 1 addition & 1 deletion boards/px4/fmu-v4/stackcheck.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

px4_add_board(
PLATFORM nuttx
OS nuttx
VENDOR px4
MODEL fmu-v4
LABEL stackcheck
Expand Down
2 changes: 1 addition & 1 deletion boards/px4/fmu-v4pro/default.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

px4_add_board(
PLATFORM nuttx
OS nuttx
VENDOR px4
MODEL fmu-v4pro
LABEL default
Expand Down
Loading