This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/CC2640R2F: Find out Crashed and hang line in code

Part Number: CC2640R2F
Other Parts Discussed in Thread: SYSBIOS

Tool/software: Code Composer Studio

Problem: -  in my project sometime random hang and crashes occur, after hang crash device restarted automatically using watchdog timer.

my question is it possible to get hang or crashed line in project before hang crash occur in the project. Can we store line before watchdog reset. 

Thank You 

  • If you are not using a watchdog when debugging it should be possible to pause the program and then use the ROV to see where in the code the program has crashed.
  • crashes happens sometimes. Sometimes it get crashed at some point. But where it crashed at what line it crashed, i am unable to find out. Debugging using debugger may takes lots of time to detect the problem because may be device crashes two three times a day and sometimes it does not. That is why i was asking, is there a way to find out the crashed line before watchdog timer resets the device.
    Thank You
  • You can try to add while(1) traps on all error handling etc to cause the code execution to stop at the point where it crash.

    Debugging crashes that occur sporadically takes time to debug since it could be loads of reason for the code to crash and could also be caused by poor error handling elsewhere in the code.
  • today i was debugging my project to see any error present in the firmware. I used ROV and i found many errors. I am not getting what does these error exactly mean and how to resolve this. I saw that there is no heap stack and heap memory error in the project.
    Kindly help me to solve the following error.



    ti.sysbios.family.arm.cc26xx.Timer Device (0x20002188) N/A Caught exception in view init code: "C:/ti/xdctools_3_50_05_12_core/packages/xdc/rov/StructureDecoder.xs", line 547: java.lang.Exception: Target memory read failed at address: 0x40092000, length: 28
    ti.sysbios.knl.Semaphore Basic (0x11000e30) pendElems Error: Problem scanning pend Queue: JavaException: java.lang.Exception: Target memory read failed at address: 0x49204441, length: 8 This read is at an INVALID address according to the application's section map. The application is likely either uninitialized or corrupt.

    ti.sysbios.family.arm.cc26xx.Timer Device (0x20002188) N/A Caught exception in view init code: "C:/ti/xdctools_3_50_05_12_core/packages/xdc/rov/StructureDecoder.xs", line 547: java.lang.Exception: Target memory read failed at address: 0x40092000, length: 28
    ti.sysbios.knl.Event Basic (0x20002a04) pendElems Problem scanning pending Task 0x1000bb91: JavaException: java.lang.Exception: Target memory read failed at address: 0x1000bb91, length: 76 This read is at an INVALID address according to the application's section map. The application is likely either uninitial



    ti.sysbios.family.arm.cc26xx.Timer Device (0x20002188) N/A Caught exception in view init code: "C:/ti/xdctools_3_50_05_12_core/packages/xdc/rov/StructureDecoder.xs", line 547: java.lang.Exception: Target memory read failed at address: 0x40092000, length: 28
    ti.sysbios.knl.Task Basic (0x1) priority Corrupted data: Task priority is greater than Task.numPriorities
    ti.sysbios.knl.Task Basic (0x200022ec) priority Corrupted data: Task priority is greater than Task.numPriorities
    ti.sysbios.knl.Task Detailed (0x0) stackPeak Error: Problem fetching Task stack: JavaException: java.lang.Exception: Target memory read failed at address: 0x31303030, length: 80 This read is at a VALID address according to the application's section map, but the DebugServer memory read failed.
    ti.sysbios.knl.Task Detailed (0x1) priority Corrupted data: Task priority is greater than Task.numPriorities
    ti.sysbios.knl.Task Detailed (0x1) stackPeak Error: Problem fetching Task stack: JavaException: java.lang.Exception: Target memory read failed at address: 0x74313030, length: 805306368 This read is at an INVALID address according to the application's section map. The application is likely either uninitialized or corrupt.
    ti.sysbios.knl.Task Detailed (0x200022ec) priority Corrupted data: Task priority is greater than Task.numPriorities
    ti.sysbios.knl.Task Detailed (0x200022ec) stackPeak Error: Problem fetching Task stack: JavaException: java.lang.Exception: Target memory read failed at address: 0x0, length: 536879876 This read is at an INVALID address according to the application's section map. The application is likely either uninitialized or corrupt.

    ti.sysbios.family.arm.cc26xx.Timer Device (0x20002188) N/A Caught exception in view init code: "C:/ti/xdctools_3_50_05_12_core/packages/xdc/rov/StructureDecoder.xs", line 547: java.lang.Exception: Target memory read failed at address: 0x40092000, length: 28
    ti.sysbios.knl.Task Detailed (0x200005dc) blockedOn Problem scanning pending Clock 0x3f6a2577: JavaException: java.lang.Exception: Target memory read failed at address: 0x3f6a2577, length: 32 This read is at a VALID address according to the application's section map, but the DebugServer memory read failed


    ti.sysbios.family.arm.cc26xx.Timer Device (0x20002188) N/A Caught exception in view init code: "C:/ti/xdctools_3_50_05_12_core/packages/xdc/rov/StructureDecoder.xs", line 547: java.lang.Exception: Target memory read failed at address: 0x40092000, length: 28
    ti.sysbios.knl.Task Basic (0x20000c60) priority Corrupted data: Task priority is greater than Task.numPriorities
    ti.sysbios.knl.Task Detailed (0x20000c60) priority Corrupted data: Task priority is greater than Task.numPriorities
    ti.sysbios.knl.Task Detailed (0x20000c60) stackPeak Error: Problem fetching Task stack: Error: fetchArray called with length 0.



    GateHwi
    Error: There are ti.sysbios.gates.GateHwi static instances in the app configuration, but ROV could not find them in the app executable (required symbol 'ti_sysbios_gates_GateHwi_Object__table__V' is missing). The instances might have been removed by the linker because they weren't referenced.
  • Hello sir,

    After debugging for two days finally i found the crashed line in my project.  My project crashes at while loop [ while(pMsg != NULL)] line.

                    sbpEvt_t *pMsg = (sbpEvt_t *) Util_dequeueMsg(appMsgQueue);
    
                    while (pMsg != NULL)
                    {
                        if (pMsg)
                        {
                            // Process message.
                            SimpleBLEPeripheral_processAppMsg(pMsg);
    
                            if (pMsg->pData != NULL)
                            {
                                // Free the Queue payload if there is one
                                ICall_free(pMsg->pData);
                            }
    
                            // Free the space from the message.
                            ICall_free(pMsg);
                        }
    

     ........................

    ...................

    i was watching these variable value  in expression while debugging and i got following msg before crash/hang

    pMsg  unknown identifier not found: pMsg
    events  unknown identifier not found: events

    *(appMsgQueue)  unknown cannot load from non-primitive location

     

    Sir please help me why i am getting these error, could not identify. 

  • Sir, i am waiting for the response. What would be the solution for this problem. I have gone through almost all the threads, but did not find the solution. I updated my project compiler version, xdctool version also, increased stack and heap size also, but no any solution worked for me.
  • Have you been able to find a solution?
  • No, i did not find any solution
  • Can you post your code snippet? This should not be the main reason crashing your program since it's in our out of box example.
    Therefore, it would be beneficial if you can post your code snippet.