Skip to content

Idle Stack Overflow Issue #7222

Closed
Closed
@AGlass0fMilk

Description

@AGlass0fMilk

Description

Target: NRF52_DK
Toolchain: GCC ARM (arm-none-eabi-g++ (GNU Tools for ARM Embedded Processors 6-2017-q2-update) 6.3.1 20170620 (release) [ARM/embedded-6-branch revision 249437])
SHA of Mbed OS: 866850a Merge pull request #7171 from ARMmbed/release-candidate

I am having a strange issue while developing on the NRF52_DK platform. I am starting to play around with a graphics library, LittleVGL, and porting it to mbed. I have set up a test main.cpp to get started, but my code encounters an error and prints out the following:

++ MbedOS Error Info ++
Error Status: 0x80020125 Code: 293 Module: 2
Error Message: CMSIS-RTOS error: Stack overflow
Location: 0x43d7d
Error Value: 0x1
Current Thread: Id: 0x200059b0 Entry: 0x45915 StackSize: 0x100 StackMem: 0x20005a40 SP: 
0x2000fed8
-- MbedOS Error Info --

It seems to be the idle thread stack is overflowing (main thread stack size is 0x1000 by default, so it can't be the main thread)

The strange part is, my code doesn't execute anything from the libraries at this point. Perhaps it's static initialization or something.

The code causing this issue is:

#include "mbed_wait_api.h"
int main(void)
{
  int i = 0;
  wait_ms(100);
  i++;
  wait_ms(50);
  i++;
  while(1)
    {
      wait_ms(500);
    }
}

That's it. I don't make any calls to the library at all, I haven't even #included it.

I have encountered this issue before, but I have been able to increase the idle thread stack size by modifying mbed_rtx.h... but a recent update removed the macro I previously used to do this...

So now I'm not sure how to fix this issue. What could be going wrong?

Issue request type

[ ] Question
[ ] Enhancement
[ X ] Bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions