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.

rts2800_ml.lib eats .ebss

Hello!

In my project rts2800_ml.lib uses an awful lot of memory:

00000088     rts2800_ml.lib : lowlev.obj (.ebss)

00000120     rts2800_ml.lib : ankmsg.obj (.cio)

00000160     rts2800_ml.lib : defs.obj (.ebss)

00000108     rts2800_ml.lib : trgdrv.obj (.ebss)

In Examples with rts2800_ml.lib linked takes up very little memory (Example_Flash28035_API).

I do not use library (printf like) functions.

Related Warnings began to appear:

1) creating ".sysmem" section with default size of 0x400; use the -heap option to change the default size

2) creating output section ".cio" without a SECTIONS specification

What should i do to solve this problem?

  • Anton,

    You must be calling some function in the RTS library that is pulling in the .obj modules you cite, and therefore consuming memory.  You may not realize that you are calling this function, or what this function is.

    Off the top of my head, one way to try to expose the guilty function is to remove the RTS library from your project, and try to build.  You probably have the library specified as a project option.  You can delete it from the project options.  Alternately, if you actually added/linked the library to your project, delete it from the project.  When you build, you will definitely get a linker warning about symbol _c_int00 not being found (this is the boot.obj C-environment setup code in the RTS library).  This is expected, and has nothing to do with your issue.  Beyond that, you can see what other symbols are not found.  This will tell you what functions in the library your code is calling.

    The related warning of .sysmem and .cio means your code is using these sections but you haven't specified the heap size, and haven't specified where to link .cio section.  Things like malloc() will use heap.  The .cio section is used by printf() type functions, which I know you said you aren't calling.  But I guarantee you that something you are doing in your code is causing these modules to get pulled in.  You just need to figure out what.

    Regards,

    David

  • David,

    Thanks for your help. You were absolutely right. I caught calling assert() function in the third-party library which i used. The question is closed.

    Sincerely,

    Anton.