diff --git a/cmake/common/px4_base.cmake b/cmake/common/px4_base.cmake index 019dcc16cf1..22cc19c0fe0 100644 --- a/cmake/common/px4_base.cmake +++ b/cmake/common/px4_base.cmake @@ -506,7 +506,7 @@ function(px4_add_common_flags) # but generates too many false positives ) - if (NOT ${OS} STREQUAL "qurt") + if (${OS} STREQUAL "nuttx") list(APPEND warnings -Wframe-larger-than=1024) endif() diff --git a/src/modules/attitude_estimator_ekf/CMakeLists.txt b/src/modules/attitude_estimator_ekf/CMakeLists.txt index 30fb6f0091d..8c689046610 100644 --- a/src/modules/attitude_estimator_ekf/CMakeLists.txt +++ b/src/modules/attitude_estimator_ekf/CMakeLists.txt @@ -35,9 +35,7 @@ px4_add_module( MAIN attitude_estimator_ekf STACK 1200 COMPILE_FLAGS - -Wframe-larger-than=3100 -Wno-float-equal - SRCS attitude_estimator_ekf_main.cpp codegen/AttitudeEKF.c diff --git a/src/modules/attitude_estimator_q/CMakeLists.txt b/src/modules/attitude_estimator_q/CMakeLists.txt index b4726b5c89d..c74993ad674 100644 --- a/src/modules/attitude_estimator_q/CMakeLists.txt +++ b/src/modules/attitude_estimator_q/CMakeLists.txt @@ -31,15 +31,13 @@ # ############################################################################# set(MODULE_CFLAGS) -if (NOT ${OS} STREQUAL "qurt") - list(APPEND MODULE_CFLAGS - -Wframe-larger-than=1400) +if (${OS} STREQUAL "nuttx") + list(APPEND MODULE_CFLAGS -Wframe-larger-than=1400) endif() px4_add_module( MODULE modules__attitude_estimator_q MAIN attitude_estimator_q - COMPILE_FLAGS - ${MODULE_CFLAGS} + COMPILE_FLAGS ${MODULE_CFLAGS} STACK 1200 SRCS attitude_estimator_q_main.cpp diff --git a/src/modules/commander/CMakeLists.txt b/src/modules/commander/CMakeLists.txt index 698177edb67..d5c4aa0f122 100644 --- a/src/modules/commander/CMakeLists.txt +++ b/src/modules/commander/CMakeLists.txt @@ -31,10 +31,8 @@ # ############################################################################ set(MODULE_CFLAGS -Os) - -if(NOT ${OS} STREQUAL "qurt") - list(APPEND MODULE_CFLAGS - -Wframe-larger-than=2600) +if(${OS} STREQUAL "nuttx") + list(APPEND MODULE_CFLAGS -Wframe-larger-than=2300) endif() px4_add_module( MODULE modules__commander diff --git a/src/modules/land_detector/CMakeLists.txt b/src/modules/land_detector/CMakeLists.txt index 3e89ff1a6ba..f18b3ed187c 100644 --- a/src/modules/land_detector/CMakeLists.txt +++ b/src/modules/land_detector/CMakeLists.txt @@ -36,7 +36,6 @@ px4_add_module( STACK 1200 COMPILE_FLAGS -Os - SRCS land_detector_main.cpp land_detector_params.c diff --git a/src/modules/mavlink/CMakeLists.txt b/src/modules/mavlink/CMakeLists.txt index f7f2127c4bf..c8a0e7d870c 100644 --- a/src/modules/mavlink/CMakeLists.txt +++ b/src/modules/mavlink/CMakeLists.txt @@ -30,16 +30,20 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ +if (${OS} STREQUAL "nuttx") + list(APPEND MODULE_CFLAGS -Wframe-larger-than=1500) +endif() px4_add_module( MODULE modules__mavlink MAIN mavlink STACK 1200 COMPILE_FLAGS + ${MODULE_CFLAGS} -Wno-attributes -Wno-packed -DMAVLINK_COMM_NUM_BUFFERS=3 -Wno-packed - -Wframe-larger-than=2000 + -Wno-tautological-constant-out-of-range-compare -Os SRCS mavlink.c diff --git a/src/modules/mc_att_control/CMakeLists.txt b/src/modules/mc_att_control/CMakeLists.txt index 3f4aeed93f1..3c087727667 100644 --- a/src/modules/mc_att_control/CMakeLists.txt +++ b/src/modules/mc_att_control/CMakeLists.txt @@ -30,10 +30,14 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ +if (${OS} STREQUAL "nuttx") + list(APPEND MODULE_CFLAGS -Wframe-larger-than=3500) +endif() px4_add_module( MODULE modules__mc_att_control MAIN mc_att_control STACK 1200 + COMPILE_FLAGS ${MODULE_CFLAGS} SRCS mc_att_control_main.cpp mc_att_control_params.c diff --git a/src/modules/mc_att_control_multiplatform/CMakeLists.txt b/src/modules/mc_att_control_multiplatform/CMakeLists.txt index 0edd51ce57f..22f9d16ee86 100644 --- a/src/modules/mc_att_control_multiplatform/CMakeLists.txt +++ b/src/modules/mc_att_control_multiplatform/CMakeLists.txt @@ -33,8 +33,6 @@ px4_add_module( MODULE modules__mc_att_control_multiplatform MAIN mc_att_control_m - COMPILE_FLAGS - -Wframe-larger-than=1300 SRCS mc_att_control_main.cpp mc_att_control_start_nuttx.cpp diff --git a/src/modules/mc_att_control_multiplatform/mc_att_control.cpp b/src/modules/mc_att_control_multiplatform/mc_att_control.cpp index 63515f497d4..98435a08f07 100644 --- a/src/modules/mc_att_control_multiplatform/mc_att_control.cpp +++ b/src/modules/mc_att_control_multiplatform/mc_att_control.cpp @@ -64,11 +64,9 @@ static const int ERROR = -1; MulticopterAttitudeControlMultiplatform::MulticopterAttitudeControlMultiplatform() : MulticopterAttitudeControlBase(), - _task_should_exit(false), _actuators_0_circuit_breaker_enabled(false), /* publications */ - _att_sp_pub(nullptr), _v_rates_sp_pub(nullptr), _actuators_0_pub(nullptr), _n(_appState), diff --git a/src/modules/mc_att_control_multiplatform/mc_att_control.h b/src/modules/mc_att_control_multiplatform/mc_att_control.h index de059fc9f39..12d4beadfc9 100644 --- a/src/modules/mc_att_control_multiplatform/mc_att_control.h +++ b/src/modules/mc_att_control_multiplatform/mc_att_control.h @@ -85,10 +85,8 @@ public: void spin() { _n.spin(); } private: - bool _task_should_exit; /**< if true, sensor task should exit */ bool _actuators_0_circuit_breaker_enabled; /**< circuit breaker to suppress output */ - px4::Publisher *_att_sp_pub; /**< attitude setpoint publication */ px4::Publisher *_v_rates_sp_pub; /**< rate setpoint publication */ px4::Publisher *_actuators_0_pub; /**< attitude actuator controls publication */ diff --git a/src/modules/mc_pos_control_multiplatform/CMakeLists.txt b/src/modules/mc_pos_control_multiplatform/CMakeLists.txt index 76750b90de5..f36acf4e334 100644 --- a/src/modules/mc_pos_control_multiplatform/CMakeLists.txt +++ b/src/modules/mc_pos_control_multiplatform/CMakeLists.txt @@ -33,9 +33,6 @@ px4_add_module( MODULE modules__mc_pos_control_multiplatform MAIN mc_pos_control_m - COMPILE_FLAGS - -Wframe-larger-than=1900 - SRCS mc_pos_control_main.cpp mc_pos_control_start_nuttx.cpp diff --git a/src/modules/position_estimator_inav/CMakeLists.txt b/src/modules/position_estimator_inav/CMakeLists.txt index 7c5393de9ca..90ab4ad74c6 100644 --- a/src/modules/position_estimator_inav/CMakeLists.txt +++ b/src/modules/position_estimator_inav/CMakeLists.txt @@ -30,16 +30,14 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ -set(MODULE_CFLAGS) -if(NOT ${OS} STREQUAL "qurt") - list(APPEND MODULE_CFLAGS -Wframe-larger-than=3900) +if(${OS} STREQUAL "nuttx") + list(APPEND MODULE_CFLAGS -Wframe-larger-than=3800) endif() px4_add_module( MODULE modules__position_estimator_inav MAIN position_estimator_inav STACK 1200 COMPILE_FLAGS ${MODULE_CFLAGS} - SRCS position_estimator_inav_main.c position_estimator_inav_params.c diff --git a/src/modules/sdlog2/CMakeLists.txt b/src/modules/sdlog2/CMakeLists.txt index ddc1b301745..b438f30fd5e 100644 --- a/src/modules/sdlog2/CMakeLists.txt +++ b/src/modules/sdlog2/CMakeLists.txt @@ -30,13 +30,16 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ +if (${OS} STREQUAL "nuttx") + list(APPEND MODULE_CFLAGS -Wframe-larger-than=1500) +endif() px4_add_module( MODULE modules__sdlog2 MAIN sdlog2 PRIORITY "SCHED_PRIORITY_MAX-30" STACK 1200 COMPILE_FLAGS - -Wframe-larger-than=1500 + ${MODULE_CFLAGS} -Os SRCS sdlog2.c diff --git a/src/modules/simulator/CMakeLists.txt b/src/modules/simulator/CMakeLists.txt index 97daf37d106..de452c5de44 100644 --- a/src/modules/simulator/CMakeLists.txt +++ b/src/modules/simulator/CMakeLists.txt @@ -43,8 +43,6 @@ px4_add_module( -Wno-attributes -Wno-packed -Wno-packed - -Wframe-larger-than=1500 - SRCS ${SIMULATOR_SRCS} DEPENDS diff --git a/src/systemcmds/mixer/CMakeLists.txt b/src/systemcmds/mixer/CMakeLists.txt index 99ce2b1bad7..703d8210fb1 100644 --- a/src/systemcmds/mixer/CMakeLists.txt +++ b/src/systemcmds/mixer/CMakeLists.txt @@ -34,7 +34,7 @@ set(MIXER_CFLAGS -Os) if(${OS} STREQUAL "qurt") list(APPEND MIXER_CFLAGS -Wframe-larger-than=2176) else() - list(APPEND MIXER_CFLAGS -Wframe-larger-than=2064) + list(APPEND MIXER_CFLAGS -Wframe-larger-than=2100) endif() px4_add_module(