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/RM46L852: Internal Error "A stack overflow error has occurred"

Part Number: RM46L852

Tool/software: Code Composer Studio

Hi,

I am running Code Composer Studio v 10.0.0.00010 and developing for a RM46L852 processor on a SDK.

This problem started when I imported the Cortex-R4 CMISS DSP Library-v1.0.0.

I installed the library, imported the project (not the files) into CCS set the configuration to ti_math_Cortex Little Endian floating point. In the CCS General properties, I set the Variant to RM46L852, and the endianness to "little".

Since then I (sometimes*) get the following message:

Window Title: Internal Error

Window Contents: "A stack overflow error has occurred. You are recommended to exit the workbench. Subsequent errors may happen and may terminate the workbench without warning. See the .log file for more details.

Do you want to exit the workbench? Yes / No buttons

Sometimes I don't get the error, and was able to get the library to compile and use the library in my project. I am successfully calling DSP functions.

But now, when I compile my project, I get the same error message about the "Internal Error - A stack overflow has occurred...."

if I say No (do not exit the workbench), the project compiles correctly and I'm able to run it.

What could be causing this new workbench error / crash, and how do I fix it?

Note, I downgraded to workbench v9.0xxx to see if the crash went away: it did not. So it kind of points to the library.

  • Hello,

    Can you provide your Eclipse Error Log? It is the .log file inside your <workspace folder/.metadata folder.

    Charlie Allan said:
    I installed the library, imported the project (not the files) into CCS set the configuration to ti_math_Cortex Little Endian floating point. In the CCS General properties, I set the Variant to RM46L852, and the endianness to "little".

    The error (sometimes) occurs after you set the endianness?

    Charlie Allan said:
    This problem started when I imported the Cortex-R4 CMISS DSP Library-v1.0.0.

    Which exact project are you importing? Can you provide the path to it in the directory inside Cortex-R4 CMSIS DSP Library folder?

    Thanks

    ki

  • Error Log attached (renamed to .log.txt so I could upload.1830..log.txt

    The error doesn't occur when I change endianness. I changed it to match the processor.

    The project I'm importing is CMSIS, and using the build configuration for ti_math_Cortex_R4_lspf.

    Path for the project: C:\ti\Hercules\Cortex-R4 CMSIS DSP Library\1.0.0.

    As I mentioned, I imported the library into my C project. I get the error every time I compile now, but if I say no to "do you want to exit eclipse", the compiler continues to compile the project without errors, links and runs.

  • Thanks. I was not able to reproduce the issue on CCS 10.1 an 10.0. I'll need to get the log file analyzed by engineering. I'll pass on any updates as soon as I get them.

    Thanks

    ki

  • Charlie Allan said:
    As I mentioned, I imported the library into my C project. I get the error every time I compile now, but if I say no to "do you want to exit eclipse", the compiler continues to compile the project without errors, links and runs.

    Just to confirm, the CMSIS library builds fine for LE RM46L852 (ti_math_Cortex_R4_lspf). It is the build for your main project (which links in the library) that has the issue. Correct?

  • When I try to compile the library, I sometimes get the stack overflow message and it doesn't continue and compile. It stops. If I don't get the message, it compiles correctly.

    When I compile my project, I always get the stack overflow message, but if I say "don't exit", my project compiles and runs correctly.

  • What is your host OS? Based on your logs it looks like 64-bit Windows. Windows 10?

    What are you system specs? How much RAM do you have?

  • Yes, host OS is Windows 10 64-bit.

    Dell with Intel i7, Memory in computer: 8GB

  • Thanks. Specs look good.

    I've tried building the library a few times. It takes awhile but always succeeds without error. What is the frequency of the error? If you build it 10 times, how many times would you expect to see the issue?

  • On the library build, it's strange: if I "build" the library, CCS crashes, 10 times in a row (says that there is a stack overflow. I day don't exit, and then it does nothing), but if I "rebuild" it, the library builds fine.

    On my project, it says that there is a stack overflow, but if I say don't exit, it builds the project and runs. Weird...

  • I also removed any program that was taking memory. I have 3.8GB/8GB available for CCS, and I still get the stack overflow error.

  • Can you try increasing the maximum JVM heap size for CCS?

    https://software-dl.ti.com/ccs/esd/documents/users_guide/ccs_troubleshooting.html#heap-and-jvm-settings

    CCS 10.x defaults to a fairly large value but it i doesn't hurt to increase it a bit. Maybe try 3GB

  • I tried setting both -xmx and -xms to 4GB (after upgrading my pc to 16GB), and I still get the error that there is a stack overflow in eclipse.

    Again, if I rt-click/Build Project (or Ctrl-B), I get the error. If I rt-click/Rebuild Project, the project builds correctly without a stack overflow error.

  • Charlie Allan said:
    I tried setting both -xmx and -xms to 4GB (after upgrading my pc to 16GB), and I still get the error that there is a stack overflow in eclipse.

    you'd want to leave the -xms value alone. It is the -xmx value that is the max heap setting.

    Have you tried any other projects recently? Could you try creating a new simple project or importing some new example and see if the issue occurs there also?

  • you'd want to leave the -xms value alone. It is the -xmx value that is the max heap setting.

    >>I put the -xms back to 128m and set the -xmx value to 4096m. Still the same error.

    Have you tried any other projects recently? Could you try creating a new simple project or importing some new example and see if the issue occurs there also?

    >>I created a new CCS project. It compiles without error.

    >>Again, if I rebuild the project, there is no  error. It is only when I build the project.

  • Has there been any more feedback on this case? What should I do to fix this problem? It is project specific and therefore must have something to do with how my project is set up, I would guess. What in the setup could cause this. Recall that this all started happening when I started using the Hercules DSP library.

    Thank you for your continued support.

  • Charlie,

    Sorry for the delay. I really don't know what the issue can be. I can build the Hercules DSP lib without issue. The stack overflow error is a common one with Eclipse with many potential root causes. Without a solid test case to provide to engineering, I cannot escalate it to them for further investigation. I'm still looking on the Eclipse forums for more clues but so far nothing concrete...

    ki 

  • Did you ask engineering why I might get the stack overflow when I "build" the project, but not when I "rebuild" the project?

  • Unfortunately I don't have an answer. Engineering is unable to fully analyze the issue without a reproducible test case. I am unable to reproduce the issue when using the same library project. There are some references to the error on various Eclipse forums but nothing conclusive yet