mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-06 05:40:35 +08:00
Remove size optimization for individual modules
It makes more sense to set the optimization flags on a platform basis instead of individually for each module. This allows for different optimization options for SITL, NuttX, Snapdragon, etc.
This commit is contained in:
@@ -35,7 +35,6 @@ px4_add_module(
|
||||
MODULE modules__attitude_estimator_q
|
||||
MAIN attitude_estimator_q
|
||||
COMPILE_FLAGS
|
||||
-Os
|
||||
STACK_MAIN 1200
|
||||
STACK_MAX 1600
|
||||
SRCS
|
||||
@@ -43,4 +42,4 @@ px4_add_module(
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
@@ -35,10 +35,9 @@ px4_add_module(
|
||||
MAIN bottle_drop
|
||||
STACK_MAIN 1200
|
||||
COMPILE_FLAGS
|
||||
-Os
|
||||
SRCS
|
||||
bottle_drop.cpp
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
@@ -36,7 +36,6 @@ px4_add_module(
|
||||
STACK_MAIN 4096
|
||||
STACK_MAX 2450
|
||||
COMPILE_FLAGS
|
||||
-Os
|
||||
SRCS
|
||||
commander.cpp
|
||||
state_machine_helper.cpp
|
||||
@@ -53,4 +52,4 @@ px4_add_module(
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
@@ -34,11 +34,10 @@ px4_add_module(
|
||||
MODULE modules__controllib_test
|
||||
MAIN controllib_test
|
||||
COMPILE_FLAGS
|
||||
-Os
|
||||
SRCS
|
||||
controllib_test_main.cpp
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
@@ -35,10 +35,9 @@ px4_add_module(
|
||||
MAIN dataman
|
||||
STACK_MAIN 1200
|
||||
COMPILE_FLAGS
|
||||
-Os
|
||||
SRCS
|
||||
dataman.c
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
@@ -34,10 +34,9 @@ px4_add_module(
|
||||
MODULE modules__dummy
|
||||
MAIN tone_alarm
|
||||
COMPILE_FLAGS
|
||||
-Os
|
||||
SRCS
|
||||
tone_alarm.c
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
px4_add_module(
|
||||
MODULE modules__ekf2
|
||||
MAIN ekf2
|
||||
COMPILE_FLAGS -Os
|
||||
COMPILE_FLAGS
|
||||
STACK_MAIN 2500
|
||||
STACK_MAX 4000
|
||||
SRCS
|
||||
@@ -42,4 +42,4 @@ px4_add_module(
|
||||
platforms__common
|
||||
git_ecl
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
@@ -35,7 +35,6 @@ px4_add_module(
|
||||
MAIN fw_att_control
|
||||
STACK_MAIN 1200
|
||||
COMPILE_FLAGS
|
||||
-Os
|
||||
SRCS
|
||||
fw_att_control_main.cpp
|
||||
DEPENDS
|
||||
@@ -43,4 +42,4 @@ px4_add_module(
|
||||
git_ecl
|
||||
lib__ecl
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
@@ -35,7 +35,7 @@ px4_add_module(
|
||||
MAIN fw_pos_control_l1
|
||||
STACK_MAIN 1200
|
||||
COMPILE_FLAGS
|
||||
-Os -Weffc++
|
||||
-Weffc++
|
||||
SRCS
|
||||
fw_pos_control_l1_main.cpp
|
||||
landingslope.cpp
|
||||
@@ -45,4 +45,4 @@ px4_add_module(
|
||||
lib__external_lgpl
|
||||
lib__ecl
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
@@ -34,10 +34,9 @@ px4_add_module(
|
||||
MODULE modules__gpio_led
|
||||
MAIN gpio_led
|
||||
COMPILE_FLAGS
|
||||
-Os
|
||||
SRCS
|
||||
gpio_led.c
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
@@ -35,7 +35,6 @@ px4_add_module(
|
||||
MAIN land_detector
|
||||
STACK_MAIN 1200
|
||||
COMPILE_FLAGS
|
||||
-Os
|
||||
SRCS
|
||||
land_detector_main.cpp
|
||||
LandDetector.cpp
|
||||
@@ -45,4 +44,4 @@ px4_add_module(
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
@@ -34,7 +34,7 @@ px4_add_module(
|
||||
MODULE modules__load_mon
|
||||
MAIN load_mon
|
||||
STACK_MAIN 1200
|
||||
COMPILE_FLAGS -Os
|
||||
COMPILE_FLAGS
|
||||
SRCS
|
||||
load_mon.cpp
|
||||
DEPENDS
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
px4_add_module(
|
||||
MODULE modules__local_position_estimator
|
||||
MAIN local_position_estimator
|
||||
COMPILE_FLAGS -Os
|
||||
COMPILE_FLAGS
|
||||
STACK_MAIN 5700
|
||||
STACK_MAX 13000
|
||||
SRCS
|
||||
@@ -49,4 +49,4 @@ px4_add_module(
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
@@ -36,7 +36,7 @@ px4_add_module(
|
||||
MAIN logger
|
||||
PRIORITY "SCHED_PRIORITY_MAX-30"
|
||||
STACK_MAIN 2200
|
||||
COMPILE_FLAGS -Os
|
||||
COMPILE_FLAGS
|
||||
SRCS
|
||||
logger.cpp
|
||||
log_writer.cpp
|
||||
@@ -44,4 +44,4 @@ px4_add_module(
|
||||
platforms__common
|
||||
modules__uORB
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
@@ -36,7 +36,6 @@ px4_add_module(
|
||||
STACK_MAIN 1200
|
||||
STACK_MAX 1500
|
||||
COMPILE_FLAGS
|
||||
-Os
|
||||
SRCS
|
||||
mavlink.c
|
||||
mavlink_main.cpp
|
||||
@@ -53,4 +52,4 @@ px4_add_module(
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
@@ -36,7 +36,6 @@ px4_add_module(
|
||||
STACK_MAIN 5000
|
||||
COMPILE_FLAGS
|
||||
-DMAVLINK_FTP_UNIT_TEST
|
||||
-Os
|
||||
SRCS
|
||||
mavlink_tests.cpp
|
||||
mavlink_ftp_test.cpp
|
||||
@@ -46,4 +45,4 @@ px4_add_module(
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
@@ -35,10 +35,10 @@ px4_add_module(
|
||||
MAIN mc_att_control
|
||||
STACK_MAIN 1200
|
||||
STACK_MAX 3500
|
||||
COMPILE_FLAGS -Os
|
||||
COMPILE_FLAGS
|
||||
SRCS
|
||||
mc_att_control_main.cpp
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
@@ -33,11 +33,11 @@
|
||||
px4_add_module(
|
||||
MODULE modules__mc_pos_control
|
||||
MAIN mc_pos_control
|
||||
COMPILE_FLAGS -Os
|
||||
COMPILE_FLAGS
|
||||
STACK_MAIN 1200
|
||||
SRCS
|
||||
mc_pos_control_main.cpp
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
@@ -35,11 +35,10 @@ include_directories("../../uORB")
|
||||
px4_add_module(
|
||||
MODULE modules__muorb__adsp
|
||||
COMPILE_FLAGS
|
||||
-Os
|
||||
SRCS
|
||||
px4muorb.cpp
|
||||
uORBFastRpcChannel.cpp
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
@@ -35,7 +35,6 @@ px4_add_module(
|
||||
MAIN navigator
|
||||
STACK_MAIN 1300
|
||||
COMPILE_FLAGS
|
||||
-Os
|
||||
SRCS
|
||||
navigator_main.cpp
|
||||
navigator_mode.cpp
|
||||
@@ -55,4 +54,4 @@ px4_add_module(
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
@@ -42,9 +42,8 @@ px4_generate_parameters_source(OUT param_files
|
||||
px4_add_module(
|
||||
MODULE modules__param
|
||||
COMPILE_FLAGS
|
||||
-Os
|
||||
SRCS ${param_files}
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
@@ -36,7 +36,7 @@ px4_add_module(
|
||||
MAIN position_estimator_inav
|
||||
STACK_MAIN 1200
|
||||
STACK_MAX 4000
|
||||
COMPILE_FLAGS -Os
|
||||
COMPILE_FLAGS
|
||||
SRCS
|
||||
position_estimator_inav_main.cpp
|
||||
position_estimator_inav_params.cpp
|
||||
@@ -44,4 +44,4 @@ px4_add_module(
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
@@ -38,11 +38,10 @@ px4_add_module(
|
||||
STACK_MAX 1600
|
||||
COMPILE_FLAGS
|
||||
${MODULE_CFLAGS}
|
||||
-Os
|
||||
SRCS
|
||||
sdlog2.c
|
||||
logbuffer.c
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
@@ -37,7 +37,6 @@ px4_add_module(
|
||||
PRIORITY "SCHED_PRIORITY_MAX-5"
|
||||
STACK_MAIN 1300
|
||||
COMPILE_FLAGS
|
||||
-Os
|
||||
SRCS
|
||||
sensors.cpp
|
||||
sensors_init.cpp
|
||||
|
||||
@@ -83,7 +83,6 @@ px4_add_module(
|
||||
MODULE modules__systemlib
|
||||
COMPILE_FLAGS
|
||||
-Wno-sign-compare
|
||||
-Os
|
||||
SRCS ${SRCS}
|
||||
DEPENDS
|
||||
platforms__common
|
||||
|
||||
@@ -53,9 +53,8 @@ px4_add_module(
|
||||
MAIN uorb
|
||||
STACK_MAIN 2100
|
||||
COMPILE_FLAGS
|
||||
-Os
|
||||
SRCS ${SRCS}
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
@@ -45,9 +45,8 @@ px4_add_module(
|
||||
MAIN uorb_tests
|
||||
STACK_MAIN 2048
|
||||
COMPILE_FLAGS
|
||||
-Os
|
||||
SRCS ${SRCS}
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
@@ -59,7 +59,6 @@ px4_add_module(
|
||||
STACK_MAIN 3200
|
||||
STACK_MAX 1500
|
||||
COMPILE_FLAGS
|
||||
-Os
|
||||
SRCS
|
||||
# Main
|
||||
uavcan_main.cpp
|
||||
@@ -81,4 +80,4 @@ px4_add_module(
|
||||
uavcan
|
||||
)
|
||||
|
||||
## vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
## vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
@@ -33,10 +33,9 @@
|
||||
px4_add_module(
|
||||
MODULE modules__unit_test
|
||||
COMPILE_FLAGS
|
||||
-Os
|
||||
SRCS
|
||||
unit_test.cpp
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
@@ -34,7 +34,7 @@ px4_add_module(
|
||||
MODULE modules__vtol_att_control
|
||||
MAIN vtol_att_control
|
||||
STACK_MAIN 1300
|
||||
COMPILE_FLAGS -Os
|
||||
COMPILE_FLAGS
|
||||
SRCS
|
||||
vtol_att_control_main.cpp
|
||||
tiltrotor.cpp
|
||||
@@ -44,4 +44,4 @@ px4_add_module(
|
||||
DEPENDS
|
||||
platforms__common
|
||||
)
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
Reference in New Issue
Block a user