This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: code size


Suet Fei Li wrote:
> 
> Hi guys, I wrote an application using ecos as the OS. The total code size is
> 33K (it is for ARM). The application takes 8K. I would like to know how I
> can reduce the total code size, like what sort of configurable options I
> should use. I am directly calling the ecos kernels in my application, and
> the scheduler is a multi-queue one.
> 
> Any input will be greatly appreciated.

Difficult to tell without looking at the detail. But you may want to do an
arm-elf-objdump --syms to see where the space is going.

Make sure you remove unnecessary packages from your configuration. In
particular, disable device drivers if you don't use them. Make sure you are
using selective linking by compiling everything (including your
application) with -ffunction-sections -fdata-sections, and linking with
-Wl,--gc-sections.

For what it's worth, you should be able to reduce the size a lot from 33K.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]