mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 18:47:21 +08:00
Port PX4 to BeagleBone Blue Board using library librobotcontrol instead of a submodule
This commit is contained in:
@@ -69,6 +69,24 @@ if ("${BOARD}" STREQUAL "rpi")
|
||||
USES_TERMINAL
|
||||
)
|
||||
|
||||
elseif ("${BOARD}" STREQUAL "bbblue")
|
||||
target_link_libraries(px4 PRIVATE robotcontrol)
|
||||
|
||||
add_custom_target(upload
|
||||
COMMAND scp -r ${PX4_SOURCE_DIR}/posix-configs/bbblue/*.config debian@BBBluePX4:/home/debian/px4/posix-configs
|
||||
COMMAND scp -r ${PX4_SOURCE_DIR}/ROMFS $<TARGET_FILE:px4> debian@BBBluePX4:/home/debian/px4
|
||||
DEPENDS px4
|
||||
COMMENT "uploading px4 and data files"
|
||||
USES_TERMINAL
|
||||
)
|
||||
|
||||
add_custom_target(upload_px4
|
||||
COMMAND scp -r $<TARGET_FILE:px4> debian@BBBluePX4:/home/debian/px4
|
||||
DEPENDS px4
|
||||
COMMENT "uploading px4"
|
||||
USES_TERMINAL
|
||||
)
|
||||
|
||||
elseif ("${BOARD}" STREQUAL "bebop")
|
||||
|
||||
add_custom_target(upload
|
||||
|
||||
@@ -283,6 +283,20 @@ function(px4_os_add_flags)
|
||||
elseif ("${BOARD}" STREQUAL "bebop")
|
||||
# TODO: Wmissing-field-initializers ignored on older toolchain, can be removed eventually
|
||||
list(APPEND added_cxx_flags -Wno-missing-field-initializers)
|
||||
|
||||
elseif ("${BOARD}" STREQUAL "bbblue")
|
||||
set(BBBLUE_COMPILE_FLAGS -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=hard -mtune=cortex-a8)
|
||||
list(APPEND added_c_flags ${BBBLUE_COMPILE_FLAGS})
|
||||
list(APPEND added_cxx_flags ${BBBLUE_COMPILE_FLAGS})
|
||||
|
||||
# TODO: Wmissing-field-initializers ignored on older toolchain, can be removed eventually
|
||||
# On cross compile host system and native build system:
|
||||
# a) install robotcontrol.h and rc/* into /usr/local/include
|
||||
# b) install pre-built native (ARM) version of librobotcontrol.* into /usr/local/lib
|
||||
list(APPEND added_cxx_flags -I/usr/local/include -Wno-missing-field-initializers)
|
||||
list(APPEND added_c_flags -I/usr/local/include)
|
||||
|
||||
list(APPEND added_exe_linker_flags -L/usr/local/lib)
|
||||
endif()
|
||||
|
||||
# output
|
||||
|
||||
@@ -335,8 +335,10 @@ int main(int argc, char **argv)
|
||||
string data_path;
|
||||
string node_name;
|
||||
|
||||
bool skippingOutputRedirect = false;
|
||||
|
||||
// parse arguments
|
||||
while (index < argc) {
|
||||
while (index < argc && !skippingOutputRedirect) {
|
||||
//cout << "arg: " << index << " : " << argv[index] << endl;
|
||||
|
||||
if (argv[index][0] == '-') {
|
||||
@@ -366,6 +368,9 @@ int main(int argc, char **argv)
|
||||
cout << "node name: " << node_name << endl;
|
||||
}
|
||||
|
||||
} else if (strchr(argv[index], '>')) {
|
||||
skippingOutputRedirect = true;
|
||||
|
||||
} else {
|
||||
//cout << "positional argument" << endl;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user