diff --git a/Documentation/px4_hil/UserGuide.md b/Documentation/px4_hil/UserGuide.md index 28483498da..30da6d453a 100644 --- a/Documentation/px4_hil/UserGuide.md +++ b/Documentation/px4_hil/UserGuide.md @@ -66,8 +66,8 @@ Linux or Eagle with a working IP interface (?? does this need further instructio > adb shell # bash root@linaro-developer:/# cd ??? -root@linaro-developer:/# ./mainapp -App name: mainapp +root@linaro-developer:/# ./px4 +App name: px4 Enter a command and its args: uorb start muorb start diff --git a/Tools/decode_backtrace.py b/Tools/decode_backtrace.py index 62a9c16b46..64f8a8ea30 100755 --- a/Tools/decode_backtrace.py +++ b/Tools/decode_backtrace.py @@ -43,10 +43,10 @@ import subprocess # If the following lines were pasted into the shell after running decode_backtrace.py # # INFO Backtrace: 10 -# INFO ./mainapp(px4_backtrace+0x27) [0x42b212] -# INFO ./mainapp() [0x42d608] -# INFO ./mainapp() [0x42d57e] -# INFO ./mainapp() [0x4ba48d] +# INFO ./px4(px4_backtrace+0x27) [0x42b212] +# INFO ./px4() [0x42d608] +# INFO ./px4() [0x42d57e] +# INFO ./px4() [0x4ba48d] # # The output would be: # @@ -63,7 +63,7 @@ def usage(): msg = """ Usage: Tools/decode_backtrace.py -This will load the symbols for /src/firmware/posix/mainapp +This will load the symbols for /src/firmware/posix/px4 The user just needs to copy and paste the backtrace into the terminal where decode_backtrace.py is running. @@ -75,7 +75,7 @@ func = [] # Load the symbols from the binary def load_symbol_map(): - output = subprocess.check_output(["nm", "-p", "-C", os.sys.argv[1]+"/src/firmware/posix/mainapp"]) + output = subprocess.check_output(["nm", "-p", "-C", os.sys.argv[1]+"/src/firmware/posix/px4"]) data = output.split("\n") data.sort() diff --git a/Tools/sitl_multiple_run.sh b/Tools/sitl_multiple_run.sh index 1378931899..f306679edd 100755 --- a/Tools/sitl_multiple_run.sh +++ b/Tools/sitl_multiple_run.sh @@ -16,7 +16,7 @@ src_path=`pwd` rc_script="posix-configs/SITL/init/rcS_multiple" build_path=${src_path}/build_posix_sitl_default -pkill mainapp +pkill px4 sleep 2 cd $build_path/src/firmware/posix @@ -39,7 +39,7 @@ while [ $n -le $sitl_num ]; do cd $n - sudo -b -u $user ../mainapp -d rcS >out.log 2>err.log + sudo -b -u $user ../px4 -d rcS >out.log 2>err.log cd ../ diff --git a/Tools/sitl_run.sh b/Tools/sitl_run.sh index fbb93c86fa..6e467c31fd 100755 --- a/Tools/sitl_run.sh +++ b/Tools/sitl_run.sh @@ -43,7 +43,7 @@ fi # kill process names that might stil # be running from last time pkill gazebo -pkill mainapp +pkill px4 jmavsim_pid=`jps | grep Simulator | cut -d" " -f1` if [ -n "$jmavsim_pid" ] then @@ -117,18 +117,18 @@ set +e # Start Java simulator if [ "$debugger" == "lldb" ] then - lldb -- mainapp ../../../../${rc_script}_${program}_${model} + lldb -- px4 ../../../../${rc_script}_${program}_${model} elif [ "$debugger" == "gdb" ] then - gdb --args mainapp ../../../../${rc_script}_${program}_${model} + gdb --args px4 ../../../../${rc_script}_${program}_${model} elif [ "$debugger" == "ddd" ] then - ddd --debugger gdb --args mainapp ../../../../${rc_script}_${program}_${model} + ddd --debugger gdb --args px4 ../../../../${rc_script}_${program}_${model} elif [ "$debugger" == "valgrind" ] then - valgrind ./mainapp ../../../../${rc_script}_${program}_${model} + valgrind ./px4 ../../../../${rc_script}_${program}_${model} else - $sudo_enabled ./mainapp $chroot_enabled ../../../../${rc_script}_${program}_${model} + $sudo_enabled ./px4 $chroot_enabled ../../../../${rc_script}_${program}_${model} fi if [ "$program" == "jmavsim" ] diff --git a/cmake/test/px4_simple_app_correct.txt b/cmake/test/px4_simple_app_correct.txt index 317d4f5982..9504a8e27a 100644 --- a/cmake/test/px4_simple_app_correct.txt +++ b/cmake/test/px4_simple_app_correct.txt @@ -2,7 +2,7 @@ INFO Shell id is 47996278451456 WARN 1 starting task wkr_high (file /home/jgoppert/git/px4/cmake-Firmware/src/platforms/posix/px4_layer/px4_posix_tasks.cpp line 146) WARN 54 starting task wkr_low (file /home/jgoppert/git/px4/cmake-Firmware/src/platforms/posix/px4_layer/px4_posix_tasks.cpp line 146) WARN 100 starting task wkr_hrt (file /home/jgoppert/git/px4/cmake-Firmware/src/platforms/posix/px4_layer/px4_posix_tasks.cpp line 146) -App name: mainapp +App name: px4 Enter a command and its args: ---------------------------------- Running: uorb diff --git a/posix-configs/SITL/README.md b/posix-configs/SITL/README.md index 20ed19fd4a..2588c4b09b 100644 --- a/posix-configs/SITL/README.md +++ b/posix-configs/SITL/README.md @@ -39,12 +39,12 @@ NOTE: This is only necessary if you are not using the instructions above. 1. Launch PX4 from the SITL build directory "`./Firmware/Build/posix_sitl.build/`" using the command below. The optional `` can be used to cause a set of commands to be entered into the PX4 shell at startup. ``` -> ./mainapp +> ./px4 ``` There is a sample startup script at `posix_configs/SITL/init/rcS`. ``` -> ./mainapp ../../posix-configs/SITL/init/rcS +> ./px4 ../../posix-configs/SITL/init/rcS ``` Without the ``, the commands can be entered at the shell prompt one at a time. An example startup file is given below. This example shows that the "mavlink" module has selected port 14556 for its socket server (as shown in the SITL diagram) and will listen for connections on this port. diff --git a/posix-configs/bebop/mainapp.config b/posix-configs/bebop/px4.config similarity index 100% rename from posix-configs/bebop/mainapp.config rename to posix-configs/bebop/px4.config diff --git a/posix-configs/rpi/mainapp.config b/posix-configs/rpi/px4.config similarity index 100% rename from posix-configs/rpi/mainapp.config rename to posix-configs/rpi/px4.config diff --git a/src/firmware/posix/CMakeLists.txt b/src/firmware/posix/CMakeLists.txt index 6a43db5c11..2cb46d1ce0 100644 --- a/src/firmware/posix/CMakeLists.txt +++ b/src/firmware/posix/CMakeLists.txt @@ -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}) diff --git a/src/firmware/qurt/CMakeLists.txt b/src/firmware/qurt/CMakeLists.txt index bacebe70ef..81be14afc5 100644 --- a/src/firmware/qurt/CMakeLists.txt +++ b/src/firmware/qurt/CMakeLists.txt @@ -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() diff --git a/src/platforms/posix/main.cpp b/src/platforms/posix/main.cpp index 34c879419f..646b94610f 100644 --- a/src/platforms/posix/main.cpp +++ b/src/platforms/posix/main.cpp @@ -134,10 +134,10 @@ static void run_cmd(const vector &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 << " - 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) { diff --git a/src/platforms/qurt/px4_layer/main.cpp b/src/platforms/qurt/px4_layer/main.cpp index 0e6953afdf..39006cc1f1 100644 --- a/src/platforms/qurt/px4_layer/main.cpp +++ b/src/platforms/qurt/px4_layer/main.cpp @@ -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