mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-06 05:01:37 +08:00
Stack checks made optional: ENABLE_STACK_CHECKS
This commit is contained in:
committed by
Lorenz Meier
parent
f49f183f74
commit
1d13edcf92
@@ -80,14 +80,22 @@ ARCHCPUFLAGS_CORTEXM3 = -mcpu=cortex-m3 \
|
|||||||
-march=armv7-m \
|
-march=armv7-m \
|
||||||
-mfloat-abi=soft
|
-mfloat-abi=soft
|
||||||
|
|
||||||
ARCHINSTRUMENTATIONDEFINES_CORTEXM4F = -finstrument-functions \
|
ARCHINSTRUMENTATIONDEFINES_CORTEXM4F = -ffixed-r10
|
||||||
-ffixed-r10
|
|
||||||
|
|
||||||
ARCHINSTRUMENTATIONDEFINES_CORTEXM4 = -finstrument-functions \
|
ARCHINSTRUMENTATIONDEFINES_CORTEXM4 = -ffixed-r10
|
||||||
-ffixed-r10
|
|
||||||
|
|
||||||
ARCHINSTRUMENTATIONDEFINES_CORTEXM3 =
|
ARCHINSTRUMENTATIONDEFINES_CORTEXM3 =
|
||||||
|
|
||||||
|
# Enabling stack checks if requested
|
||||||
|
#
|
||||||
|
ENABLE_STACK_CHECKS ?= 0
|
||||||
|
ifneq ($(ENABLE_STACK_CHECKS),0)
|
||||||
|
$(info Stack checks enabled)
|
||||||
|
ARCHINSTRUMENTATIONDEFINES_CORTEXM4F += -finstrument-functions
|
||||||
|
ARCHINSTRUMENTATIONDEFINES_CORTEXM4 += -finstrument-functions
|
||||||
|
ARCHINSTRUMENTATIONDEFINES_CORTEXM3 +=
|
||||||
|
endif
|
||||||
|
|
||||||
# Pick the right set of flags for the architecture.
|
# Pick the right set of flags for the architecture.
|
||||||
#
|
#
|
||||||
ARCHCPUFLAGS = $(ARCHCPUFLAGS_$(CONFIG_ARCH))
|
ARCHCPUFLAGS = $(ARCHCPUFLAGS_$(CONFIG_ARCH))
|
||||||
|
|||||||
@@ -40,7 +40,8 @@ MODULE_COMMAND = uavcan
|
|||||||
|
|
||||||
MAXOPTIMIZATION = -O3
|
MAXOPTIMIZATION = -O3
|
||||||
|
|
||||||
INSTRUMENTATIONDEFINES = -fno-instrument-functions -ffixed-r10
|
# Instrumentation makes the CPU load about 3 times higher, see https://github.com/PX4/Firmware/issues/1417
|
||||||
|
INSTRUMENTATIONDEFINES += -fno-instrument-functions
|
||||||
|
|
||||||
# Main
|
# Main
|
||||||
SRCS += uavcan_main.cpp \
|
SRCS += uavcan_main.cpp \
|
||||||
|
|||||||
Reference in New Issue
Block a user