Feature/add memap cstack usage ports (#661)
* Added memap, avstack, and checkstackusage tools to STM32F4xx Makefile and CMake builds to calculate CSTACK depth and RAM usage * Added memap, cstack, and ram-usage recipes to stm32f10x port Makefile. Added Cmake build. * Removed local dlmstp.c module from stm32f10x port, and used the common datalink dlmstp.c module with MS/TP extended frames and zero-config support. * Added .nm and .su to .gitignore to skip the analysis file residue.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
OBJ:=$(patsubst %.c, %.o, $(wildcard *.c))
|
||||
CFLAGS:=-fstack-usage
|
||||
TARGET:=main
|
||||
CC?=gcc
|
||||
|
||||
all: ${TARGET}
|
||||
@echo "=============================================="
|
||||
@../checkStackUsage.py $< . 2>&1 | \
|
||||
grep -E '(func|foo|bar|main) '
|
||||
@echo "=============================================="
|
||||
@echo "1. The output shown above must contain 4 lines"
|
||||
@echo "2. 'foo' and 'bar' must both be calling 'func'"
|
||||
@echo " *but with different stack sizes in each*."
|
||||
@echo "3. 'main' must be using the largest 'func'"
|
||||
@echo " (i.e. be going through 'bar')"
|
||||
@echo "4. The reported sizes must properly accumulate"
|
||||
@echo "=============================================="
|
||||
|
||||
${TARGET}: ${OBJ}
|
||||
${CC} -o $@ ${CFLAGS} $^
|
||||
|
||||
clean:
|
||||
rm -f ${OBJ} ${TARGET} *.su
|
||||
Reference in New Issue
Block a user