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.

Interpreting Runtime Error due to CPU hardfault

MCU: TM4C1294NCPDT

TI-RTOS: v2.01.00.03

CCS: v6.0.1.0040

-

Hello,

    When I am using the integrated debug feature of code composer studio (using TI-RTOS) often the code crashes & in the IDE's console I get the following:

{module#37}: line 1036: error {id:0x10040000, args:[0xb2c4, 0x0]}
{module#37}: line 1113: error {id:0x10320000, args:[0x6eb0, 0x54605b9]}
Exception occurred in ISR thread at PC = 0x0001066e.
Core 0: Exception occurred in ThreadType_Hwi.
Hwi name: {unknown-instance-name}, handle: 0x2000ebec.
Hwi stack base: 0x2000c214.
Hwi stack size: 0x2000.
R0 = 0x000111a1 R8 = 0x00000000
R1 = 0x00000000 R9 = 0xffffffff
R2 = 0x2000eafc R10 = 0xffffffff
R3 = 0x2000eafc R11 = 0xffffffff
R4 = 0xf0e92d46 R12 = 0x00000001
R5 = 0x054605b5 SP(R13) = 0x2000e1a0
R6 = 0x0000000a LR(R14) = 0x0001194b
R7 = 0x00000001 PC(R15) = 0x0001066e
PSR = 0x21000023
ICSR = 0x00423003
MMFSR = 0x00
BFSR = 0x82
UFSR = 0x0000
HFSR = 0x40000000
DFSR = 0x0000000b
MMAR = 0x054605b9
BFAR = 0x054605b9
AFSR = 0x00000000
Terminating execution...

Can anyone help me with how to analyse/interprete the information provided by the debugger. Any kind of document link will be helpful too.

I have a few queries in this matter:

1. What is {module#37}? How do I identify this module no. 37?

2. Line 1036 is which line in which file?

3. error {id:0x10040000, args:[0xb2c4, 0x0]} >> Which ID is this & which arguments? Arguments passed to some function? which function in that case?

4. Exception occurred in ISR thread at PC = 0x0001066e. >> How do I figure out which thread it is from 1066Eh memory location?

-

Thanks

Regards

Soumyajit

  • The cryptic error messages are due to Text.isLoaded being set to 'false' in your config script. Setting it to 'true' will enable explicit module/file names to be printed in the console output. The additional strings to support the more complete output will take up more memory on your device however.

    Using the ROV tool, browse to the Hwi module's Exception view tab to see the call stack leading up to the exception.

    Another approach to getting a call stack is described here.

    The content of the MMAR register indicates that the exception was due to the program trying to fetch from memory location  0x054605b9.

    Alan

  • Hello Alan,

    Thanks for the reply. I have changed Test.isLoaded = true; in the .cfg file but am noticing that there is no change in the SRAM consumption as shown in the .map file. Is any change expected here (shown in highlighted yellow below):

    MEMORY CONFIGURATION

            name            origin    length      used     unused   attr    fill

    ----------------------  --------  ---------  --------  --------  ----  --------

     FLASH                 00000000   00100000  00016990  000e9670  R  X

     SRAM                  20000000   00040000  00010481  0002fb7f  RW X

    -

    Thanks

    Regards

    Soumyajit

  • The change should be reflected in the amount of FLASH used. The Text module strings are placed in FLASH.
    Does the Exception output look more readable now?
  • Not much, it says Hard Fault instead of earlier memory locations. By the way, I have not gone through the link (you provided) thoroughly (just had a look of it). Once I go through it, I'll be able to understand well (hopefully).
    -
    Thanks
    -
    Regards
    Soumyajit