Hello All,
I am running a code on ARM Cortex A8 using TI code composer.
Upon placing a breakpoint at the following for loop in the edma3resmgr.c file from EDMA package:
for (resMgrIdx = 0u; resMgrIdx < EDMA3_MAX_RM_INSTANCES; resMgrIdx++) { temp_ptr_rm_inst = ((EDMA3_RM_Instance *)(ptrRMIArray) + (phyCtrllerInstId*EDMA3_MAX_RM_INSTANCES) + resMgrIdx); if (NULL != temp_ptr_rm_inst) { if (NULL == temp_ptr_rm_inst->pResMgrObjHandle) { /* Handle to the EDMA3 HW Object */ temp_ptr_rm_inst->pResMgrObjHandle = rmObj; /* Handle of the Res Mgr Instance */ rmInstance = temp_ptr_rm_inst; /* Also make this data structure NULL, just for safety. */ edma3MemZero((void *)((EDMA3_RM_InstanceInitConfig *)(ptrInitCfgArray) + (phyCtrllerInstId*EDMA3_MAX_RM_INSTANCES) + resMgrIdx), sizeof(EDMA3_RM_InstanceInitConfig)); break; } } } /* Check whether a RM instance has been created or not */ if (NULL == rmInstance) { result = EDMA3_RM_E_MAX_RM_INST_OPENED; edma3OsProtectExit (phyCtrllerInstId, EDMA3_OS_PROTECT_INTERRUPT, intState);
When loading the image using Code Composer, the breakpoint hits and when stepping over, the loop works fine and the rmInstance is initialized well.
However, when I use my bootloader to load and execute the image, the breakpoint hits, but when stepping over, the for loop is skipped, and the execution jumps to if (NULL == rmInstance). Hence the loop is skipped, rmInstance is still NULL, which causes the system to go for exception and halt.
Assembly stepping (in both happy and unhappy scenario) showed me an instruction:
80000c1c: 9A00002F BLS $C$DW$L$EDMA3_RM_open$29$E
With happy scenario, it is OK, with unhappy scnario, this instruction causes the jump to the mentioned line
Any idea about that ?
The code is run on A8 core of the VisionMid chip with code composer 5.2.0.00069 with EDMA package version edma3_lld_02_11_04_01
Thank You everybody