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.

"terminating execution" without hard fault - memory allocation issue

MCU: TM4C1294NCPDT

TI-RTOS: v2.01.00.03

NDK: v2.23.01.01

CCS: v6.0.1.0040

-

Hi,

    I have implemented (in my code) that if a Hard Fault occurs, the MCU displays (on the LCD screen) the last running Task Name that was running just before the Hard Fault occurred. Now, I have noticed that under certain cases, the TI-RTOS will stop execution & no Fault is generated & I am unable show the status of the system on the LCD. I noticed that the console printout at that time is the following:

1.  

{module#47}: line 307: out of memory: handle=0x2002c264, size=2048
xdc.runtime.Error.raise: terminating execution

2.  

{module#47}: line 307: out of memory: handle=0x2002c268, size=2048
xdc.runtime.Error.raise: terminating execution

3.  

{module#47}: line 307: out of memory: handle=0x2002c268, size=2056
00023.562 mmBulkAlloc(): could not allocate memory.
00023.562 out of memory: handle=0x0, size=536937324
00023.562 SBNew: Buffer OOM

    Sometimes, even console printout will come as follows & code execution will still be running:

{module#47}: line 307: out of memory: handle=0x2002c268, size=2056
00016.111 mmBulkAlloc(): could not allocate memory.
00016.111 out of memory: handle=0x0, size=536937324
00016.112 SBNew: Buffer OOM
{module#47}: line 307: out of memory: handle=0x2002c268, size=2056
00016.112 mmBulkAlloc(): could not allocate memory.
00016.113 out of memory: handle=0x0, size=536937324
00016.113 SBNew: Buffer OOM
{module#47}: line 307: out of memory: handle=0x2002c268, size=2056
00016.114 mmBulkAlloc(): could not allocate memory.
00016.114 out of memory: handle=0x0, size=536937324
00016.114 SBNew: Buffer OOM
{module#47}: line 307: out of memory: handle=0x2002c268, size=2056
00016.115 mmBulkAlloc(): could not allocate memory.
00016.116 out of memory: handle=0x0, size=536937324
00016.116 SBNew: Buffer OOM
{module#47}: line 307: out of memory: handle=0x2002c268, size=2056
00016.117 mmBulkAlloc(): could not allocate memory.
00016.117 out of memory: handle=0x0, size=536937324
00016.117 SBNew: Buffer OOM
{module#47}: line 307: out of memory: handle=0x2002c268, size=2056
00016.118 mmBulkAlloc(): could not allocate memory.
00016.118 out of memory: handle=0x0, size=536937324
00016.119 SBNew: Buffer OOM
{module#47}: line 307: out of memory: handle=0x2002c268, size=2056
00016.119 mmBulkAlloc(): could not allocate memory.
00016.120 out of memory: handle=0x0, size=536937324
00016.120 SBNew: Buffer OOM
{module#47}: line 307: out of memory: handle=0x2002c268, size=2056
00016.121 mmBulkAlloc(): could not allocate memory.
00016.121 out of memory: handle=0x0, size=536937324
00016.121 SBNew: Buffer OOM
{module#47}: line 307: out of memory: handle=0x2002c268, size=2056
00016.122 mmBulkAlloc(): could not allocate memory.
00016.122 out of memory: handle=0x0, size=536937324
00016.123 SBNew: Buffer OOM

    Can anyone comment what might be going wrong?

    Also, how to continue execution of code after this kind of faults & display some status information on the LCD screen?

Thanks

Regards

Soumyajit

  • Hi,
    I see a lot of memory related warnings in your console print. Are you running out of heap? That will be a good thing to fix first.

    Moses
  • Hi Moses,

       Thanks for your reply. The following line is there in the .cfg file:

    BIOS.heapSize = 22528;

        Will changing the line to the following help?

    BIOS.heapSize = 32768;

        Since, the issue is not occurring always, its hard to say whether it is solved or NOT!! I have already changed the .cfg settings as mentioned above. And, also keeping the system under observation. In the meanwhile, please let me know if any other thing you want to suggest as a remedy.

    -

    Thanks

    -

    Regards

    Soumyajit

  • Bumping the heap might fix it if that was really the problem. To be sure of your solution, I'd suggest you restore the heap back to 22528 and try to get a failing case again. When you get the hard fault, open ROV and look at the Detailed view of the HeapMem module to see if you're out of Heap. If you are out then it really makes sense to bump it.

    Moses
  • Hi Moses,
    Sorry for the late reply. The issue was with the heap memory. NDK was consuming lot of heap memory & we could simulate the situation by continuously pressing the refresh button of the web browser resulting in lot of TCP requests coming simultaneously.
    Anyway, thanks for your help.
    -
    Regards
    Soumyajit