mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-31 11:01:19 +00:00
Add a static analysis tool for firmware stack usage.
Add an new Makefile rule to analyze the stack usages of firmwares.
Details about the tool can be found in extra/stack_analyzer/README.md.
BUG=chromium:648840
BRANCH=none
TEST=extra/stack_analyzer/stack_analyzer_unittest.py
make BOARD=elm && make BOARD=elm build/elm/RW/ec.RW.taskinfo && \
extra/stack_analyzer/stack_analyzer.py \
--objdump=arm-none-eabi-objdump \
--addr2line=arm-none-eabi-addr2line \
./build/elm/RW/ec.RW.elf ./build/elm/RW/ec.RW.taskinfo
make BOARD=${BOARD} SECTION=${SECTION} analyzestack
Change-Id: Ifb1b5f5ad6be8f8b125b14d6ee03e25cb385895b
Signed-off-by: Che-yu Wu <cheyuw@google.com>
Reviewed-on: https://chromium-review.googlesource.com/576411
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
487 B
487 B
Stack Size Analysis Tool for EC Firmware
This tool does static analysis on EC firmwares to get the maximum stack usage of each function and task. The maximum stack usage of a function includes the stack used by itself and the functions it calls.
Usage
Make sure the firmware of your target board has been built.
In src/platform/ec, run
make BOARD=${BOARD} SECTION=${SECTION} analyzestack
The ${SECTION} can be RO or RW.