forked from Archive/PX4-Autopilot
Rename mainapp to px4.
This commit is contained in:
parent
3b7ba915a8
commit
b6a9ff756c
|
@ -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
|
||||
|
|
|
@ -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 <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
|
||||
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()
|
||||
|
||||
|
|
|
@ -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 ../
|
||||
|
||||
|
|
|
@ -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" ]
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
```
|
||||
> ./mainapp <startup_file>
|
||||
> ./px4 <startup_file>
|
||||
```
|
||||
|
||||
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.
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue