mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 01:53:33 +08:00
Rename mainapp to px4.
This commit is contained in:
committed by
Julian Oes
parent
3b7ba915a8
commit
b6a9ff756c
@@ -13,7 +13,7 @@ if ("${BOARD}" STREQUAL "eagle" OR ("${BOARD}" STREQUAL "excelsior"))
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-missing-prototypes -Wno-missing-declarations")
|
||||
LINUX_APP(
|
||||
APP_NAME mainapp
|
||||
APP_NAME px4
|
||||
IDL_NAME px4muorb
|
||||
APPS_DEST "/home/linaro"
|
||||
SOURCES
|
||||
@@ -32,19 +32,19 @@ if ("${BOARD}" STREQUAL "eagle" OR ("${BOARD}" STREQUAL "excelsior"))
|
||||
px4_add_adb_push(OUT upload
|
||||
OS ${OS}
|
||||
BOARD ${BOARD}
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/mainapp
|
||||
${CMAKE_SOURCE_DIR}/posix-configs/eagle/flight/mainapp.config
|
||||
DEPENDS mainapp
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/px4
|
||||
${CMAKE_SOURCE_DIR}/posix-configs/eagle/flight/px4.config
|
||||
DEPENDS px4
|
||||
DEST /home/linaro)
|
||||
|
||||
elseif ("${BOARD}" STREQUAL "rpi")
|
||||
|
||||
add_executable(mainapp
|
||||
add_executable(px4
|
||||
${CMAKE_SOURCE_DIR}/src/platforms/posix/main.cpp
|
||||
apps.h
|
||||
)
|
||||
|
||||
target_link_libraries(mainapp
|
||||
target_link_libraries(px4
|
||||
-Wl,--start-group
|
||||
${module_libraries}
|
||||
df_driver_framework
|
||||
@@ -56,9 +56,9 @@ elseif ("${BOARD}" STREQUAL "rpi")
|
||||
px4_add_scp_push(OUT upload
|
||||
OS ${OS}
|
||||
BOARD ${BOARD}
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/mainapp
|
||||
${CMAKE_SOURCE_DIR}/posix-configs/rpi/mainapp.config
|
||||
DEPENDS mainapp
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/px4
|
||||
${CMAKE_SOURCE_DIR}/posix-configs/rpi/px4.config
|
||||
DEPENDS px4
|
||||
DEST /home/pi)
|
||||
|
||||
elseif ("${BOARD}" STREQUAL "bebop")
|
||||
@@ -66,13 +66,13 @@ elseif ("${BOARD}" STREQUAL "bebop")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static")
|
||||
|
||||
add_executable(mainapp
|
||||
add_executable(px4
|
||||
${CMAKE_SOURCE_DIR}/src/platforms/posix/main.cpp
|
||||
apps.h
|
||||
)
|
||||
|
||||
if (NOT APPLE)
|
||||
target_link_libraries(mainapp
|
||||
target_link_libraries(px4
|
||||
-Wl,--start-group
|
||||
${module_libraries}
|
||||
${df_driver_libs}
|
||||
@@ -80,7 +80,7 @@ elseif ("${BOARD}" STREQUAL "bebop")
|
||||
-Wl,--end-group
|
||||
)
|
||||
else()
|
||||
target_link_libraries(mainapp
|
||||
target_link_libraries(px4
|
||||
${module_libraries}
|
||||
${df_driver_libs}
|
||||
pthread m
|
||||
@@ -90,19 +90,19 @@ elseif ("${BOARD}" STREQUAL "bebop")
|
||||
px4_add_adb_push_to_bebop(OUT upload
|
||||
OS ${OS}
|
||||
BOARD ${BOARD}
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/mainapp
|
||||
${CMAKE_SOURCE_DIR}/posix-configs/bebop/mainapp.config
|
||||
DEPENDS mainapp
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/px4
|
||||
${CMAKE_SOURCE_DIR}/posix-configs/bebop/px4.config
|
||||
DEPENDS px4
|
||||
DEST /usr/bin)
|
||||
|
||||
else()
|
||||
|
||||
add_executable(mainapp
|
||||
add_executable(px4
|
||||
${CMAKE_SOURCE_DIR}/src/platforms/posix/main.cpp
|
||||
apps.h
|
||||
)
|
||||
if (NOT APPLE)
|
||||
target_link_libraries(mainapp
|
||||
target_link_libraries(px4
|
||||
-Wl,--start-group
|
||||
${module_libraries}
|
||||
${df_driver_libs}
|
||||
@@ -110,7 +110,7 @@ else()
|
||||
-Wl,--end-group
|
||||
)
|
||||
else()
|
||||
target_link_libraries(mainapp
|
||||
target_link_libraries(px4
|
||||
${module_libraries}
|
||||
${df_driver_libs}
|
||||
pthread m
|
||||
@@ -124,7 +124,7 @@ add_custom_target(run_config
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
USES_TERMINAL
|
||||
)
|
||||
add_dependencies(run_config mainapp)
|
||||
add_dependencies(run_config px4)
|
||||
|
||||
foreach(viewer none jmavsim gazebo replay)
|
||||
foreach(debugger none gdb lldb ddd valgrind)
|
||||
@@ -149,7 +149,7 @@ foreach(viewer none jmavsim gazebo replay)
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
USES_TERMINAL
|
||||
)
|
||||
add_dependencies(${_targ_name} mainapp)
|
||||
add_dependencies(${_targ_name} px4)
|
||||
endforeach()
|
||||
endforeach()
|
||||
endforeach()
|
||||
@@ -158,7 +158,7 @@ endforeach()
|
||||
# install
|
||||
#
|
||||
|
||||
install(TARGETS mainapp DESTINATION bin)
|
||||
install(TARGETS px4 DESTINATION bin)
|
||||
install(DIRECTORY ${PROJECT_SOURCE_DIR}/ROMFS DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME})
|
||||
install(DIRECTORY ${PROJECT_SOURCE_DIR}/posix-configs DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME})
|
||||
|
||||
|
||||
@@ -19,11 +19,11 @@ if ("${QURT_ENABLE_STUBS}" STREQUAL "1")
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FASTRPC_DSP_INCLUDES}
|
||||
)
|
||||
add_executable(mainapp
|
||||
add_executable(px4
|
||||
${CMAKE_BINARY_DIR}/src/firmware/qurt/px4muorb_skel.c
|
||||
${CMAKE_BINARY_DIR}/apps.h)
|
||||
|
||||
target_link_libraries(mainapp
|
||||
target_link_libraries(px4
|
||||
-Wl,--start-group
|
||||
${module_libraries}
|
||||
${target_libraries}
|
||||
@@ -37,7 +37,7 @@ else()
|
||||
message("module_external_libraries = ${module_external_libraries}")
|
||||
# Generate the DSP lib and stubs but not the apps side executable
|
||||
# The Apps side executable is generated via the posix_eagle_xxxx target
|
||||
QURT_LIB(LIB_NAME mainapp
|
||||
QURT_LIB(LIB_NAME px4
|
||||
IDL_NAME px4muorb
|
||||
SOURCES
|
||||
${CMAKE_BINARY_DIR}/apps.h
|
||||
@@ -52,10 +52,10 @@ else()
|
||||
px4_add_adb_push(OUT upload
|
||||
OS ${OS}
|
||||
BOARD ${BOARD}
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libmainapp.so
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libpx4.so
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libpx4muorb_skel.so
|
||||
${CMAKE_SOURCE_DIR}/posix-configs/eagle/flight/px4.config
|
||||
DEPENDS mainapp px4muorb_skel
|
||||
DEPENDS px4 px4muorb_skel
|
||||
DEST /usr/share/data/adsp)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -134,10 +134,10 @@ static void run_cmd(const vector<string> &appargs, bool exit_on_fail, bool silen
|
||||
static void usage()
|
||||
{
|
||||
|
||||
cout << "./mainapp [-d] [startup_config] -h" << std::endl;
|
||||
cout << "./px4 [-d] [startup_config] -h" << std::endl;
|
||||
cout << " -d - Optional flag to run the app in daemon mode and does not listen for user input." <<
|
||||
std::endl;
|
||||
cout << " This is needed if mainapp is intended to be run as a upstart job on linux" << std::endl;
|
||||
cout << " This is needed if px4 is intended to be run as a upstart job on linux" << std::endl;
|
||||
cout << "<startup_config> - config file for starting/stopping px4 modules" << std::endl;
|
||||
cout << " -h - help/usage information" << std::endl;
|
||||
}
|
||||
@@ -243,7 +243,7 @@ int main(int argc, char **argv)
|
||||
DriverFramework::Framework::initialize();
|
||||
px4::init_once();
|
||||
|
||||
px4::init(argc, argv, "mainapp");
|
||||
px4::init(argc, argv, "px4");
|
||||
|
||||
// if commandfile is present, process the commands from the file
|
||||
if (commands_file != nullptr) {
|
||||
|
||||
@@ -216,7 +216,7 @@ int dspal_entry(int argc, char *argv[])
|
||||
init_app_map(apps);
|
||||
DriverFramework::Framework::initialize();
|
||||
px4::init_once();
|
||||
px4::init(argc, (char **)argv, "mainapp");
|
||||
px4::init(argc, (char **)argv, "px4");
|
||||
process_commands(apps, get_commands());
|
||||
sleep(1); // give time for all commands to execute before starting external function
|
||||
|
||||
|
||||
Reference in New Issue
Block a user