Available memory on xDot with libxDot and mbedOS5

Home Forums mDot/xDot Available memory on xDot with libxDot and mbedOS5

Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #30224
    Mikael Grah
    Participant

    Hi,

    I’m using mbedOS and libxdot to build an application. I seem to be running out of RAM, the mbed-CLI gives me a total usage of static RAM of 10776 bytes (for my code + OS/lib).

    I thought that the xDot had 32kb of RAM, or isn’t that the case? My code is using ~600 bytes of static RAM + 200 bytes of malloced RAM, and it’s crashing as soon as I join the network. The join procedure seems to run out of memory or cause a Stack/hheap overflow…? It doesn’t seem to matter if I use a static 200-byte segment of RAM or the malloced version…

    Thank you for any help,
    /Mikael

    #30225
    Mikael Grah
    Participant

    Some more data; I’m using mbed-CLI, compiling with GCC_ARM.

    When I declare a large array (~50 bytes) for use in main, the dotlib crashes earlier with an mbedOS error stating that “new” could not reserve enough memory to complete the operation.

    #30226
    Jason Reiss
    Keymaster

    The ARMCC compiler appears to optimize memory better and reduce image sizes.
    We use the ARMCC compiler for production builds.

    #30284
    chong.cl@conny.one
    Participant

    You can increase the main app stack size with mbed_app.json file

    {
        "config": {
            "main_stack_size":     { "value": 5120 }
        }
    }
    #30382
    Mikael Grah
    Participant

    Thank you!

    I tried it quickly, but that causes my application to crash at startup, with an out-of-memory error.

     ++ MbedOS Error Info ++
    Error Status: 0x8001011F Code: 287 Module: 1
    Error Message: Operator new[] out of memory
    
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.