Rename mainapp to px4.

This commit is contained in:
James Goppert 2016-07-28 09:52:46 -04:00 committed by Julian Oes
parent 3b7ba915a8
commit b6a9ff756c
12 changed files with 49 additions and 49 deletions

View File

@ -66,8 +66,8 @@ Linux or Eagle with a working IP interface (?? does this need further instructio
> adb shell > adb shell
# bash # bash
root@linaro-developer:/# cd ??? root@linaro-developer:/# cd ???
root@linaro-developer:/# ./mainapp root@linaro-developer:/# ./px4
App name: mainapp App name: px4
Enter a command and its args: Enter a command and its args:
uorb start uorb start
muorb start muorb start

View File

@ -43,10 +43,10 @@ import subprocess
# If the following lines were pasted into the shell after running decode_backtrace.py # If the following lines were pasted into the shell after running decode_backtrace.py
# #
# INFO Backtrace: 10 # INFO Backtrace: 10
# INFO ./mainapp(px4_backtrace+0x27) [0x42b212] # INFO ./px4(px4_backtrace+0x27) [0x42b212]
# INFO ./mainapp() [0x42d608] # INFO ./px4() [0x42d608]
# INFO ./mainapp() [0x42d57e] # INFO ./px4() [0x42d57e]
# INFO ./mainapp() [0x4ba48d] # INFO ./px4() [0x4ba48d]
# #
# The output would be: # The output would be:
# #
@ -63,7 +63,7 @@ def usage():
msg = """ msg = """
Usage: Tools/decode_backtrace.py <builddir> Usage: Tools/decode_backtrace.py <builddir>
This will load the symbols for <builddir>/src/firmware/posix/mainapp This will load the symbols for <builddir>/src/firmware/posix/px4
The user just needs to copy and paste the backtrace into the terminal The user just needs to copy and paste the backtrace into the terminal
where decode_backtrace.py is running. where decode_backtrace.py is running.
@ -75,7 +75,7 @@ func = []
# Load the symbols from the binary # Load the symbols from the binary
def load_symbol_map(): 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 = output.split("\n")
data.sort() data.sort()

View File

@ -16,7 +16,7 @@ src_path=`pwd`
rc_script="posix-configs/SITL/init/rcS_multiple" rc_script="posix-configs/SITL/init/rcS_multiple"
build_path=${src_path}/build_posix_sitl_default build_path=${src_path}/build_posix_sitl_default
pkill mainapp pkill px4
sleep 2 sleep 2
cd $build_path/src/firmware/posix cd $build_path/src/firmware/posix
@ -39,7 +39,7 @@ while [ $n -le $sitl_num ]; do
cd $n 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 ../ cd ../

View File

@ -43,7 +43,7 @@ fi
# kill process names that might stil # kill process names that might stil
# be running from last time # be running from last time
pkill gazebo pkill gazebo
pkill mainapp pkill px4
jmavsim_pid=`jps | grep Simulator | cut -d" " -f1` jmavsim_pid=`jps | grep Simulator | cut -d" " -f1`
if [ -n "$jmavsim_pid" ] if [ -n "$jmavsim_pid" ]
then then
@ -117,18 +117,18 @@ set +e
# Start Java simulator # Start Java simulator
if [ "$debugger" == "lldb" ] if [ "$debugger" == "lldb" ]
then then
lldb -- mainapp ../../../../${rc_script}_${program}_${model} lldb -- px4 ../../../../${rc_script}_${program}_${model}
elif [ "$debugger" == "gdb" ] elif [ "$debugger" == "gdb" ]
then then
gdb --args mainapp ../../../../${rc_script}_${program}_${model} gdb --args px4 ../../../../${rc_script}_${program}_${model}
elif [ "$debugger" == "ddd" ] elif [ "$debugger" == "ddd" ]
then then
ddd --debugger gdb --args mainapp ../../../../${rc_script}_${program}_${model} ddd --debugger gdb --args px4 ../../../../${rc_script}_${program}_${model}
elif [ "$debugger" == "valgrind" ] elif [ "$debugger" == "valgrind" ]
then then
valgrind ./mainapp ../../../../${rc_script}_${program}_${model} valgrind ./px4 ../../../../${rc_script}_${program}_${model}
else else
$sudo_enabled ./mainapp $chroot_enabled ../../../../${rc_script}_${program}_${model} $sudo_enabled ./px4 $chroot_enabled ../../../../${rc_script}_${program}_${model}
fi fi
if [ "$program" == "jmavsim" ] if [ "$program" == "jmavsim" ]

View File

@ -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 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 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) 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: Enter a command and its args:
---------------------------------- ----------------------------------
Running: uorb Running: uorb

View File

@ -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 `<startup_file>` can be used to cause a set of commands to be entered into the PX4 shell at startup. 1. Launch PX4 from the SITL build directory "`./Firmware/Build/posix_sitl.build/`" using the command below. The optional `<startup_file>` can be used to cause a set of commands to be entered into the PX4 shell at startup.
``` ```
> ./mainapp <startup_file> > ./px4 <startup_file>
``` ```
There is a sample startup script at `posix_configs/SITL/init/rcS`. 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 `<startup_file>`, 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. Without the `<startup_file>`, 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.

View File

@ -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") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-missing-prototypes -Wno-missing-declarations")
LINUX_APP( LINUX_APP(
APP_NAME mainapp APP_NAME px4
IDL_NAME px4muorb IDL_NAME px4muorb
APPS_DEST "/home/linaro" APPS_DEST "/home/linaro"
SOURCES SOURCES
@ -32,19 +32,19 @@ if ("${BOARD}" STREQUAL "eagle" OR ("${BOARD}" STREQUAL "excelsior"))
px4_add_adb_push(OUT upload px4_add_adb_push(OUT upload
OS ${OS} OS ${OS}
BOARD ${BOARD} BOARD ${BOARD}
FILES ${CMAKE_CURRENT_BINARY_DIR}/mainapp FILES ${CMAKE_CURRENT_BINARY_DIR}/px4
${CMAKE_SOURCE_DIR}/posix-configs/eagle/flight/mainapp.config ${CMAKE_SOURCE_DIR}/posix-configs/eagle/flight/px4.config
DEPENDS mainapp DEPENDS px4
DEST /home/linaro) DEST /home/linaro)
elseif ("${BOARD}" STREQUAL "rpi") elseif ("${BOARD}" STREQUAL "rpi")
add_executable(mainapp add_executable(px4
${CMAKE_SOURCE_DIR}/src/platforms/posix/main.cpp ${CMAKE_SOURCE_DIR}/src/platforms/posix/main.cpp
apps.h apps.h
) )
target_link_libraries(mainapp target_link_libraries(px4
-Wl,--start-group -Wl,--start-group
${module_libraries} ${module_libraries}
df_driver_framework df_driver_framework
@ -56,9 +56,9 @@ elseif ("${BOARD}" STREQUAL "rpi")
px4_add_scp_push(OUT upload px4_add_scp_push(OUT upload
OS ${OS} OS ${OS}
BOARD ${BOARD} BOARD ${BOARD}
FILES ${CMAKE_CURRENT_BINARY_DIR}/mainapp FILES ${CMAKE_CURRENT_BINARY_DIR}/px4
${CMAKE_SOURCE_DIR}/posix-configs/rpi/mainapp.config ${CMAKE_SOURCE_DIR}/posix-configs/rpi/px4.config
DEPENDS mainapp DEPENDS px4
DEST /home/pi) DEST /home/pi)
elseif ("${BOARD}" STREQUAL "bebop") elseif ("${BOARD}" STREQUAL "bebop")
@ -66,13 +66,13 @@ elseif ("${BOARD}" STREQUAL "bebop")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static")
add_executable(mainapp add_executable(px4
${CMAKE_SOURCE_DIR}/src/platforms/posix/main.cpp ${CMAKE_SOURCE_DIR}/src/platforms/posix/main.cpp
apps.h apps.h
) )
if (NOT APPLE) if (NOT APPLE)
target_link_libraries(mainapp target_link_libraries(px4
-Wl,--start-group -Wl,--start-group
${module_libraries} ${module_libraries}
${df_driver_libs} ${df_driver_libs}
@ -80,7 +80,7 @@ elseif ("${BOARD}" STREQUAL "bebop")
-Wl,--end-group -Wl,--end-group
) )
else() else()
target_link_libraries(mainapp target_link_libraries(px4
${module_libraries} ${module_libraries}
${df_driver_libs} ${df_driver_libs}
pthread m pthread m
@ -90,19 +90,19 @@ elseif ("${BOARD}" STREQUAL "bebop")
px4_add_adb_push_to_bebop(OUT upload px4_add_adb_push_to_bebop(OUT upload
OS ${OS} OS ${OS}
BOARD ${BOARD} BOARD ${BOARD}
FILES ${CMAKE_CURRENT_BINARY_DIR}/mainapp FILES ${CMAKE_CURRENT_BINARY_DIR}/px4
${CMAKE_SOURCE_DIR}/posix-configs/bebop/mainapp.config ${CMAKE_SOURCE_DIR}/posix-configs/bebop/px4.config
DEPENDS mainapp DEPENDS px4
DEST /usr/bin) DEST /usr/bin)
else() else()
add_executable(mainapp add_executable(px4
${CMAKE_SOURCE_DIR}/src/platforms/posix/main.cpp ${CMAKE_SOURCE_DIR}/src/platforms/posix/main.cpp
apps.h apps.h
) )
if (NOT APPLE) if (NOT APPLE)
target_link_libraries(mainapp target_link_libraries(px4
-Wl,--start-group -Wl,--start-group
${module_libraries} ${module_libraries}
${df_driver_libs} ${df_driver_libs}
@ -110,7 +110,7 @@ else()
-Wl,--end-group -Wl,--end-group
) )
else() else()
target_link_libraries(mainapp target_link_libraries(px4
${module_libraries} ${module_libraries}
${df_driver_libs} ${df_driver_libs}
pthread m pthread m
@ -124,7 +124,7 @@ add_custom_target(run_config
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
USES_TERMINAL USES_TERMINAL
) )
add_dependencies(run_config mainapp) add_dependencies(run_config px4)
foreach(viewer none jmavsim gazebo replay) foreach(viewer none jmavsim gazebo replay)
foreach(debugger none gdb lldb ddd valgrind) foreach(debugger none gdb lldb ddd valgrind)
@ -149,7 +149,7 @@ foreach(viewer none jmavsim gazebo replay)
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
USES_TERMINAL USES_TERMINAL
) )
add_dependencies(${_targ_name} mainapp) add_dependencies(${_targ_name} px4)
endforeach() endforeach()
endforeach() endforeach()
endforeach() endforeach()
@ -158,7 +158,7 @@ endforeach()
# install # 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}/ROMFS DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME})
install(DIRECTORY ${PROJECT_SOURCE_DIR}/posix-configs DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}) install(DIRECTORY ${PROJECT_SOURCE_DIR}/posix-configs DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME})

View File

@ -19,11 +19,11 @@ if ("${QURT_ENABLE_STUBS}" STREQUAL "1")
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
${FASTRPC_DSP_INCLUDES} ${FASTRPC_DSP_INCLUDES}
) )
add_executable(mainapp add_executable(px4
${CMAKE_BINARY_DIR}/src/firmware/qurt/px4muorb_skel.c ${CMAKE_BINARY_DIR}/src/firmware/qurt/px4muorb_skel.c
${CMAKE_BINARY_DIR}/apps.h) ${CMAKE_BINARY_DIR}/apps.h)
target_link_libraries(mainapp target_link_libraries(px4
-Wl,--start-group -Wl,--start-group
${module_libraries} ${module_libraries}
${target_libraries} ${target_libraries}
@ -37,7 +37,7 @@ else()
message("module_external_libraries = ${module_external_libraries}") message("module_external_libraries = ${module_external_libraries}")
# Generate the DSP lib and stubs but not the apps side executable # Generate the DSP lib and stubs but not the apps side executable
# The Apps side executable is generated via the posix_eagle_xxxx target # 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 IDL_NAME px4muorb
SOURCES SOURCES
${CMAKE_BINARY_DIR}/apps.h ${CMAKE_BINARY_DIR}/apps.h
@ -52,10 +52,10 @@ else()
px4_add_adb_push(OUT upload px4_add_adb_push(OUT upload
OS ${OS} OS ${OS}
BOARD ${BOARD} BOARD ${BOARD}
FILES ${CMAKE_CURRENT_BINARY_DIR}/libmainapp.so FILES ${CMAKE_CURRENT_BINARY_DIR}/libpx4.so
${CMAKE_CURRENT_BINARY_DIR}/libpx4muorb_skel.so ${CMAKE_CURRENT_BINARY_DIR}/libpx4muorb_skel.so
${CMAKE_SOURCE_DIR}/posix-configs/eagle/flight/px4.config ${CMAKE_SOURCE_DIR}/posix-configs/eagle/flight/px4.config
DEPENDS mainapp px4muorb_skel DEPENDS px4 px4muorb_skel
DEST /usr/share/data/adsp) DEST /usr/share/data/adsp)
endif() endif()

View File

@ -134,10 +134,10 @@ static void run_cmd(const vector<string> &appargs, bool exit_on_fail, bool silen
static void usage() 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." << cout << " -d - Optional flag to run the app in daemon mode and does not listen for user input." <<
std::endl; 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 << "<startup_config> - config file for starting/stopping px4 modules" << std::endl;
cout << " -h - help/usage information" << std::endl; cout << " -h - help/usage information" << std::endl;
} }
@ -243,7 +243,7 @@ int main(int argc, char **argv)
DriverFramework::Framework::initialize(); DriverFramework::Framework::initialize();
px4::init_once(); px4::init_once();
px4::init(argc, argv, "mainapp"); px4::init(argc, argv, "px4");
// if commandfile is present, process the commands from the file // if commandfile is present, process the commands from the file
if (commands_file != nullptr) { if (commands_file != nullptr) {

View File

@ -216,7 +216,7 @@ int dspal_entry(int argc, char *argv[])
init_app_map(apps); init_app_map(apps);
DriverFramework::Framework::initialize(); DriverFramework::Framework::initialize();
px4::init_once(); px4::init_once();
px4::init(argc, (char **)argv, "mainapp"); px4::init(argc, (char **)argv, "px4");
process_commands(apps, get_commands()); process_commands(apps, get_commands());
sleep(1); // give time for all commands to execute before starting external function sleep(1); // give time for all commands to execute before starting external function