Hi Nha Dang,
I tried by my side and it works as expected.

Please see the modifications that I did. Look at the MC STACK_MEASURE comments
1. I added the StackMeasure.c/.h files into the common folders.
2. Makefile.
###############################################################################
# commands options
# enable optional commands as required per applicaion.
#
#NETWORK_RECOVERY ?= 0
#[MC STACK_MEASURE]
STACK_MEASURE = 1
#
###############################################################################
.
.
.
#[MC STACK_MEASURE]
ifeq ($(STACK_MEASURE), 1)
CFLAGS += -DSTACK_MEASURE
endif
.
.
.
#[MC STACK_MEASURE]
ifeq ($(STACK_MEASURE), 1)
APPSRC += StackMeasure.c
endif
3. Add the next code in the app_serial_commands.c
#ifdef STACK_MEASURE
#include "StackMeasure.h"
#endif
.
.
.
.
.
PRIVATE void vProcessCommand(void)
{
.
.
.
#ifdef STACK_MEASURE
else if (0 == stricmp((char*)token, "measure"))
{
tsStackInfo sStackInfo;
vGetStackMeasure( &sStackInfo );
DBG_vPrintf ( TRUE, "\r\n TotalSize: %d, uPeakMeasure: %d, Current: %d ",
sStackInfo.u32TotalSize,
sStackInfo.u32PeakMeasure,
sStackInfo.u32CurrentMeasure );
}
#endif
.
.
}
4. app_start.c
#ifdef STACK_MEASURE
#include "StackMeasure.h"
#endif
.
.
.
PUBLIC void vAppMain(void)
{
.
.
.
#if (JENNIC_CHIP_FAMILY == JN516x)
vAHI_SetStackOverflow(TRUE, (uint32)&_stack_low_water_mark);
#endif
#ifdef STACK_MEASURE
vInitStackMeasure ( );
#endif
.
.
.
}
Regards,
Mario