Files
OpenCellular/extra/stack_analyzer
Che-yu Wu 00e0222729 extra/stack_analyzer: Fix cbz/cbnz and addr2line parsing.
Fix the cbz/cbnz operands parsing.
Parse the discriminator output of addr2line.

BUG=none
BRANCH=none
TEST=extra/stack_analyzer/stack_analyzer_unittest.py

Change-Id: Iade1c14db0dc63fa65ef0f5df778b4f4f1e4f802
Signed-off-by: Che-yu Wu <cheyuw@google.com>
Reviewed-on: https://chromium-review.googlesource.com/625498
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
2017-08-22 05:08:48 -07:00
..

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} ANNOTATION=${ANNOTATION} analyzestack

The ${SECTION} can be RO or RW. The ${ANNOTATION} is a optional annotation file, see the example_annotation.yaml.