Skip to content
This repository was archived by the owner on Jul 20, 2019. It is now read-only.

Commit b6a9ff7

Browse files
jgoppertjulianoes
authored andcommitted
Rename mainapp to px4.
1 parent 3b7ba91 commit b6a9ff7

File tree

12 files changed

+49
-49
lines changed

12 files changed

+49
-49
lines changed

Documentation/px4_hil/UserGuide.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ Linux or Eagle with a working IP interface (?? does this need further instructio
6666
> adb shell
6767
# bash
6868
root@linaro-developer:/# cd ???
69-
root@linaro-developer:/# ./mainapp
70-
App name: mainapp
69+
root@linaro-developer:/# ./px4
70+
App name: px4
7171
Enter a command and its args:
7272
uorb start
7373
muorb start

Tools/decode_backtrace.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@
4343
# If the following lines were pasted into the shell after running decode_backtrace.py
4444
#
4545
# INFO Backtrace: 10
46-
# INFO ./mainapp(px4_backtrace+0x27) [0x42b212]
47-
# INFO ./mainapp() [0x42d608]
48-
# INFO ./mainapp() [0x42d57e]
49-
# INFO ./mainapp() [0x4ba48d]
46+
# INFO ./px4(px4_backtrace+0x27) [0x42b212]
47+
# INFO ./px4() [0x42d608]
48+
# INFO ./px4() [0x42d57e]
49+
# INFO ./px4() [0x4ba48d]
5050
#
5151
# The output would be:
5252
#
@@ -63,7 +63,7 @@ def usage():
6363
msg = """
6464
Usage: Tools/decode_backtrace.py <builddir>
6565
66-
This will load the symbols for <builddir>/src/firmware/posix/mainapp
66+
This will load the symbols for <builddir>/src/firmware/posix/px4
6767
The user just needs to copy and paste the backtrace into the terminal
6868
where decode_backtrace.py is running.
6969
@@ -75,7 +75,7 @@ def usage():
7575

7676
# Load the symbols from the binary
7777
def load_symbol_map():
78-
output = subprocess.check_output(["nm", "-p", "-C", os.sys.argv[1]+"/src/firmware/posix/mainapp"])
78+
output = subprocess.check_output(["nm", "-p", "-C", os.sys.argv[1]+"/src/firmware/posix/px4"])
7979
data = output.split("\n")
8080
data.sort()
8181

Tools/sitl_multiple_run.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ src_path=`pwd`
1616
rc_script="posix-configs/SITL/init/rcS_multiple"
1717
build_path=${src_path}/build_posix_sitl_default
1818

19-
pkill mainapp
19+
pkill px4
2020
sleep 2
2121

2222
cd $build_path/src/firmware/posix
@@ -39,7 +39,7 @@ while [ $n -le $sitl_num ]; do
3939

4040
cd $n
4141

42-
sudo -b -u $user ../mainapp -d rcS >out.log 2>err.log
42+
sudo -b -u $user ../px4 -d rcS >out.log 2>err.log
4343

4444
cd ../
4545

Tools/sitl_run.sh

+6-6
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ fi
4343
# kill process names that might stil
4444
# be running from last time
4545
pkill gazebo
46-
pkill mainapp
46+
pkill px4
4747
jmavsim_pid=`jps | grep Simulator | cut -d" " -f1`
4848
if [ -n "$jmavsim_pid" ]
4949
then
@@ -117,18 +117,18 @@ set +e
117117
# Start Java simulator
118118
if [ "$debugger" == "lldb" ]
119119
then
120-
lldb -- mainapp ../../../../${rc_script}_${program}_${model}
120+
lldb -- px4 ../../../../${rc_script}_${program}_${model}
121121
elif [ "$debugger" == "gdb" ]
122122
then
123-
gdb --args mainapp ../../../../${rc_script}_${program}_${model}
123+
gdb --args px4 ../../../../${rc_script}_${program}_${model}
124124
elif [ "$debugger" == "ddd" ]
125125
then
126-
ddd --debugger gdb --args mainapp ../../../../${rc_script}_${program}_${model}
126+
ddd --debugger gdb --args px4 ../../../../${rc_script}_${program}_${model}
127127
elif [ "$debugger" == "valgrind" ]
128128
then
129-
valgrind ./mainapp ../../../../${rc_script}_${program}_${model}
129+
valgrind ./px4 ../../../../${rc_script}_${program}_${model}
130130
else
131-
$sudo_enabled ./mainapp $chroot_enabled ../../../../${rc_script}_${program}_${model}
131+
$sudo_enabled ./px4 $chroot_enabled ../../../../${rc_script}_${program}_${model}
132132
fi
133133

134134
if [ "$program" == "jmavsim" ]

cmake/test/px4_simple_app_correct.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ INFO Shell id is 47996278451456
22
WARN 1 starting task wkr_high (file /home/jgoppert/git/px4/cmake-Firmware/src/platforms/posix/px4_layer/px4_posix_tasks.cpp line 146)
33
WARN 54 starting task wkr_low (file /home/jgoppert/git/px4/cmake-Firmware/src/platforms/posix/px4_layer/px4_posix_tasks.cpp line 146)
44
WARN 100 starting task wkr_hrt (file /home/jgoppert/git/px4/cmake-Firmware/src/platforms/posix/px4_layer/px4_posix_tasks.cpp line 146)
5-
App name: mainapp
5+
App name: px4
66
Enter a command and its args:
77
----------------------------------
88
Running: uorb

posix-configs/SITL/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ NOTE: This is only necessary if you are not using the instructions above.
3939

4040
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.
4141
```
42-
> ./mainapp <startup_file>
42+
> ./px4 <startup_file>
4343
```
4444

4545
There is a sample startup script at `posix_configs/SITL/init/rcS`.
4646
```
47-
> ./mainapp ../../posix-configs/SITL/init/rcS
47+
> ./px4 ../../posix-configs/SITL/init/rcS
4848
```
4949

5050
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.
File renamed without changes.
File renamed without changes.

src/firmware/posix/CMakeLists.txt

+21-21
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ if ("${BOARD}" STREQUAL "eagle" OR ("${BOARD}" STREQUAL "excelsior"))
1313

1414
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-missing-prototypes -Wno-missing-declarations")
1515
LINUX_APP(
16-
APP_NAME mainapp
16+
APP_NAME px4
1717
IDL_NAME px4muorb
1818
APPS_DEST "/home/linaro"
1919
SOURCES
@@ -32,19 +32,19 @@ if ("${BOARD}" STREQUAL "eagle" OR ("${BOARD}" STREQUAL "excelsior"))
3232
px4_add_adb_push(OUT upload
3333
OS ${OS}
3434
BOARD ${BOARD}
35-
FILES ${CMAKE_CURRENT_BINARY_DIR}/mainapp
36-
${CMAKE_SOURCE_DIR}/posix-configs/eagle/flight/mainapp.config
37-
DEPENDS mainapp
35+
FILES ${CMAKE_CURRENT_BINARY_DIR}/px4
36+
${CMAKE_SOURCE_DIR}/posix-configs/eagle/flight/px4.config
37+
DEPENDS px4
3838
DEST /home/linaro)
3939

4040
elseif ("${BOARD}" STREQUAL "rpi")
4141

42-
add_executable(mainapp
42+
add_executable(px4
4343
${CMAKE_SOURCE_DIR}/src/platforms/posix/main.cpp
4444
apps.h
4545
)
4646

47-
target_link_libraries(mainapp
47+
target_link_libraries(px4
4848
-Wl,--start-group
4949
${module_libraries}
5050
df_driver_framework
@@ -56,31 +56,31 @@ elseif ("${BOARD}" STREQUAL "rpi")
5656
px4_add_scp_push(OUT upload
5757
OS ${OS}
5858
BOARD ${BOARD}
59-
FILES ${CMAKE_CURRENT_BINARY_DIR}/mainapp
60-
${CMAKE_SOURCE_DIR}/posix-configs/rpi/mainapp.config
61-
DEPENDS mainapp
59+
FILES ${CMAKE_CURRENT_BINARY_DIR}/px4
60+
${CMAKE_SOURCE_DIR}/posix-configs/rpi/px4.config
61+
DEPENDS px4
6262
DEST /home/pi)
6363

6464
elseif ("${BOARD}" STREQUAL "bebop")
6565

6666
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static")
6767
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static")
6868

69-
add_executable(mainapp
69+
add_executable(px4
7070
${CMAKE_SOURCE_DIR}/src/platforms/posix/main.cpp
7171
apps.h
7272
)
7373

7474
if (NOT APPLE)
75-
target_link_libraries(mainapp
75+
target_link_libraries(px4
7676
-Wl,--start-group
7777
${module_libraries}
7878
${df_driver_libs}
7979
pthread m rt
8080
-Wl,--end-group
8181
)
8282
else()
83-
target_link_libraries(mainapp
83+
target_link_libraries(px4
8484
${module_libraries}
8585
${df_driver_libs}
8686
pthread m
@@ -90,27 +90,27 @@ elseif ("${BOARD}" STREQUAL "bebop")
9090
px4_add_adb_push_to_bebop(OUT upload
9191
OS ${OS}
9292
BOARD ${BOARD}
93-
FILES ${CMAKE_CURRENT_BINARY_DIR}/mainapp
94-
${CMAKE_SOURCE_DIR}/posix-configs/bebop/mainapp.config
95-
DEPENDS mainapp
93+
FILES ${CMAKE_CURRENT_BINARY_DIR}/px4
94+
${CMAKE_SOURCE_DIR}/posix-configs/bebop/px4.config
95+
DEPENDS px4
9696
DEST /usr/bin)
9797

9898
else()
9999

100-
add_executable(mainapp
100+
add_executable(px4
101101
${CMAKE_SOURCE_DIR}/src/platforms/posix/main.cpp
102102
apps.h
103103
)
104104
if (NOT APPLE)
105-
target_link_libraries(mainapp
105+
target_link_libraries(px4
106106
-Wl,--start-group
107107
${module_libraries}
108108
${df_driver_libs}
109109
pthread m rt
110110
-Wl,--end-group
111111
)
112112
else()
113-
target_link_libraries(mainapp
113+
target_link_libraries(px4
114114
${module_libraries}
115115
${df_driver_libs}
116116
pthread m
@@ -124,7 +124,7 @@ add_custom_target(run_config
124124
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
125125
USES_TERMINAL
126126
)
127-
add_dependencies(run_config mainapp)
127+
add_dependencies(run_config px4)
128128

129129
foreach(viewer none jmavsim gazebo replay)
130130
foreach(debugger none gdb lldb ddd valgrind)
@@ -149,7 +149,7 @@ foreach(viewer none jmavsim gazebo replay)
149149
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
150150
USES_TERMINAL
151151
)
152-
add_dependencies(${_targ_name} mainapp)
152+
add_dependencies(${_targ_name} px4)
153153
endforeach()
154154
endforeach()
155155
endforeach()
@@ -158,7 +158,7 @@ endforeach()
158158
# install
159159
#
160160

161-
install(TARGETS mainapp DESTINATION bin)
161+
install(TARGETS px4 DESTINATION bin)
162162
install(DIRECTORY ${PROJECT_SOURCE_DIR}/ROMFS DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME})
163163
install(DIRECTORY ${PROJECT_SOURCE_DIR}/posix-configs DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME})
164164

src/firmware/qurt/CMakeLists.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ if ("${QURT_ENABLE_STUBS}" STREQUAL "1")
1919
${CMAKE_CURRENT_BINARY_DIR}
2020
${FASTRPC_DSP_INCLUDES}
2121
)
22-
add_executable(mainapp
22+
add_executable(px4
2323
${CMAKE_BINARY_DIR}/src/firmware/qurt/px4muorb_skel.c
2424
${CMAKE_BINARY_DIR}/apps.h)
2525

26-
target_link_libraries(mainapp
26+
target_link_libraries(px4
2727
-Wl,--start-group
2828
${module_libraries}
2929
${target_libraries}
@@ -37,7 +37,7 @@ else()
3737
message("module_external_libraries = ${module_external_libraries}")
3838
# Generate the DSP lib and stubs but not the apps side executable
3939
# The Apps side executable is generated via the posix_eagle_xxxx target
40-
QURT_LIB(LIB_NAME mainapp
40+
QURT_LIB(LIB_NAME px4
4141
IDL_NAME px4muorb
4242
SOURCES
4343
${CMAKE_BINARY_DIR}/apps.h
@@ -52,10 +52,10 @@ else()
5252
px4_add_adb_push(OUT upload
5353
OS ${OS}
5454
BOARD ${BOARD}
55-
FILES ${CMAKE_CURRENT_BINARY_DIR}/libmainapp.so
55+
FILES ${CMAKE_CURRENT_BINARY_DIR}/libpx4.so
5656
${CMAKE_CURRENT_BINARY_DIR}/libpx4muorb_skel.so
5757
${CMAKE_SOURCE_DIR}/posix-configs/eagle/flight/px4.config
58-
DEPENDS mainapp px4muorb_skel
58+
DEPENDS px4 px4muorb_skel
5959
DEST /usr/share/data/adsp)
6060
endif()
6161

src/platforms/posix/main.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,10 @@ static void run_cmd(const vector<string> &appargs, bool exit_on_fail, bool silen
134134
static void usage()
135135
{
136136

137-
cout << "./mainapp [-d] [startup_config] -h" << std::endl;
137+
cout << "./px4 [-d] [startup_config] -h" << std::endl;
138138
cout << " -d - Optional flag to run the app in daemon mode and does not listen for user input." <<
139139
std::endl;
140-
cout << " This is needed if mainapp is intended to be run as a upstart job on linux" << std::endl;
140+
cout << " This is needed if px4 is intended to be run as a upstart job on linux" << std::endl;
141141
cout << "<startup_config> - config file for starting/stopping px4 modules" << std::endl;
142142
cout << " -h - help/usage information" << std::endl;
143143
}
@@ -243,7 +243,7 @@ int main(int argc, char **argv)
243243
DriverFramework::Framework::initialize();
244244
px4::init_once();
245245

246-
px4::init(argc, argv, "mainapp");
246+
px4::init(argc, argv, "px4");
247247

248248
// if commandfile is present, process the commands from the file
249249
if (commands_file != nullptr) {

src/platforms/qurt/px4_layer/main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ int dspal_entry(int argc, char *argv[])
216216
init_app_map(apps);
217217
DriverFramework::Framework::initialize();
218218
px4::init_once();
219-
px4::init(argc, (char **)argv, "mainapp");
219+
px4::init(argc, (char **)argv, "px4");
220220
process_commands(apps, get_commands());
221221
sleep(1); // give time for all commands to execute before starting external function
222222

0 commit comments

Comments
 (0)