Other Parts Discussed in Thread: SYSBIOS
Tool/software:
Hi,
I have a very simple main code as shown below. When I try to debug this code, I see the stack overrun and heap has no free memory. I am using mmWave SDK or BIOS functions as it is. Can you help me debug this further. All the details are given below
main.c
#define UNUSED(x) x = x
#define NAMELEN 16
#include <xdc/runtime/System.h>
/* mmWave SK Include Files: */
#include <ti/common/sys_common.h>
#include <ti/drivers/soc/soc.h>
#include <ti/drivers/uart/UART.h>
#include <ti/drivers/pinmux/pinmux.h>
#include <ti/drivers/esm/esm.h>
#include <xdc/std.h>
#include <stdio.h>
#include <ti/sysbios/knl/Semaphore.h>
#include <ti/sysbios/BIOS.h>
#include <ti/sysbios/knl/Task.h>
#include <ti/sysbios/knl/Event.h>
#include <ti/sysbios/knl/Semaphore.h>
#include <ti/sysbios/knl/Clock.h>
#include <ti/sysbios/heaps/HeapBuf.h>
#include <ti/sysbios/heaps/HeapMem.h>
#include <ti/sysbios/knl/Event.h>
#include <ti/sysbios/family/arm/v7a/Pmu.h>
#include <ti/sysbios/hal/Timer.h>
/* mmWave SDK Include Files: */
#include <ti/common/sys_common.h>
#include <ti/common/mmwave_sdk_version.h>
#include <ti/drivers/soc/soc.h>
#include <ti/drivers/esm/esm.h>
#include <ti/drivers/crc/crc.h>
uint32_t gCPUClockFrequency = (200 * 1000000);
/* Global Variable which holds the DMA Instance */
DMA_Handle gDMAHandle;
int main(int argc, char **argv)
{
SOC_Handle socHandle;
SOC_Cfg socCfg;
DMA_Params dmaParams;
int k = 0;
/* Initialize the ESM: Dont clear errors as TI RTOS does it */
ESM_init(0U);
/* Initialize the SOC confiugration: */
memset ((void *)&socCfg, 0, sizeof(SOC_Cfg));
/* Populate the SOC configuration: On the EVM we want to ensure that the BSS is
* executing and the system clock is correctly configured. */
socCfg.clockCfg = SOC_SysClock_INIT;
/* Initialize the SOC Module: This is done as soon as the application is started
* to ens ure that the MPU is correctly configured. */
socHandle = SOC_init (&socCfg, &errCode);
BIOS_start();
return 0;
}
HWI
Heap
Cfg file is as below