forked from Archive/PX4-Autopilot
Fix check_stack target (#8050)
This commit is contained in:
parent
93c1ad3103
commit
5d01eac5de
11
Makefile
11
Makefile
|
@ -357,19 +357,14 @@ cppcheck: posix_sitl_default
|
|||
@cppcheck-htmlreport --source-encoding=ascii --file=cppcheck-result.xml --report-dir=cppcheck --source-dir=$(SRC_DIR)/src/
|
||||
|
||||
check_stack: px4fmu-v3_default
|
||||
@echo "Checking worst case stack usage with avstack.pl ..."
|
||||
@echo " "
|
||||
@cd build_px4fmu-v3_default/ && mkdir -p stack_usage && $(SRC_DIR)/Tools/stack_usage/avstack.pl `find . -name *.obj` > stack_usage/avstack_output.txt 2> stack_usage/avstack_errors.txt
|
||||
@head -n 10 build_px4fmu-v3_default/stack_usage/avstack_output.txt | c++filt
|
||||
@echo " "
|
||||
@echo "Checking worst case stack usage with checkstack.pl ..."
|
||||
@echo " "
|
||||
@echo "Top 10:"
|
||||
@cd build_px4fmu-v3_default/ && mkdir -p stack_usage && arm-none-eabi-objdump -d src/firmware/nuttx/firmware_nuttx | $(SRC_DIR)/Tools/stack_usage/checkstack.pl arm 0 > stack_usage/checkstack_output.txt 2> stack_usage/checkstack_errors.txt
|
||||
@head -n 10 build_px4fmu-v3_default/stack_usage/checkstack_output.txt | c++filt
|
||||
@cd build/px4fmu-v3_default/ && mkdir -p stack_usage && arm-none-eabi-objdump -d nuttx_px4fmu-v3_default.elf | $(SRC_DIR)/Tools/stack_usage/checkstack.pl arm 0 > stack_usage/checkstack_output.txt 2> stack_usage/checkstack_errors.txt
|
||||
@head -n 10 build/px4fmu-v3_default/stack_usage/checkstack_output.txt | c++filt
|
||||
@echo " "
|
||||
@echo "Symbols with 'main', 'thread' or 'task':"
|
||||
@cat build_px4fmu-v3_default/stack_usage/checkstack_output.txt | c++filt | grep -E 'thread|main|task'
|
||||
@cat build/px4fmu-v3_default/stack_usage/checkstack_output.txt | c++filt | grep -E 'thread|main|task'
|
||||
|
||||
# Cleanup
|
||||
# --------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue