Takes long duration for compilation - Embedded

This is a discussion on Takes long duration for compilation - Embedded ; Hi, I have pretty big makefile for a embedded project with large number of big modules . I find that it is taking hours to get compiled in linux environment. How to get this done in few minutes as it ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: Takes long duration for compilation

  1. Takes long duration for compilation

    Hi,

    I have pretty big makefile for a embedded project with large number of
    big modules . I find that it is taking hours to get compiled in linux
    environment. How to get this done in few minutes as it is difficult
    while debugging ?

    I find that the Codewarrior Compiler compiles the same embedded
    application in less than a minute.

    Apart from changes in compiler dependent stuffs (assembly and other
    conventions) in Codewarrior, the same code is used in linux
    environment also.

    Kindly share your views regarding this .

    Tonnes of Thx in advans,
    Karthik Balaguru


  2. Re: Takes long duration for compilation

    Karthik,

    > I have pretty big makefile for a embedded project with large number of
    > big modules . I find that it is taking hours to get compiled in linux
    > environment. How to get this done in few minutes as it is difficult
    > while debugging ?


    How big are we talking here? I consider the linux kernel Makefile
    pretty big at 50k.


    > I find that the Codewarrior Compiler compiles the same embedded
    > application in less than a minute.
    >
    > Apart from changes in compiler dependent stuffs (assembly and other
    > conventions) in Codewarrior, the same code is used in linux
    > environment also.


    Have you tried compiling a single file manually, to see if it's
    the compiler or your makefile taking longer time?


    regards,


    --
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
    | Damion de Soto --------------------------------------------------
    | Software Engineer email: Damion_deSoto@au.securecomputing.com
    | Secure Computing Corporation web: http://www.securecomputing.com
    | fax: +61 7 3891 3630 ph: +61 7 3435 2809
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
    ---- Free Embedded Linux Distro at http://www.snapgear.org ----

  3. Re: Takes long duration for compilation

    Damion de Soto wrote:
    > Karthik,
    >
    > > I have pretty big makefile for a embedded project with large number of
    > > big modules . I find that it is taking hours to get compiled in linux
    > > environment. How to get this done in few minutes as it is difficult
    > > while debugging ?

    >
    > How big are we talking here? I consider the linux kernel Makefile
    > pretty big at 50k.
    >
    >
    > > I find that the Codewarrior Compiler compiles the same embedded
    > > application in less than a minute.
    > >
    > > Apart from changes in compiler dependent stuffs (assembly and other
    > > conventions) in Codewarrior, the same code is used in linux
    > > environment also.

    >
    > Have you tried compiling a single file manually, to see if it's
    > the compiler or your makefile taking longer time?
    >
    >
    > regards,
    >
    >
    > --
    > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
    > | Damion de Soto --------------------------------------------------
    > | Software Engineer email: Damion_deSoto@au.securecomputing.com
    > | Secure Computing Corporation web: http://www.securecomputing.com
    > | fax: +61 7 3891 3630 ph: +61 7 3435 2809
    > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
    > ---- Free Embedded Linux Distro at http://www.snapgear.org ----



    hmmm, Obviously, the makefile is the culprit . Gcc is perfectly fast.
    (No issues w.r.t it)
    I am also aware of it.

    Based on your feedback, I think the question should be reframed .
    So, i should have askd the question like this - "Why linux environment
    compilation & linking
    takes long duration ? "

    (Regarding Size - It is smaller than linux )

    The project is having large number of directories & subdirectories.
    Earlier i faced system resources problem . So, the sources (C and C++
    are put separately)
    are put in respective directories, headers in another directory with
    libraries in other respective
    separate dirctories etc.

    But, since it has to refer lot of libraries /headers. i think, it is
    taking time.
    But, how is it possible that the Codewarrior compiler compiles in few
    minutes for the
    same set of source-code. It also internally uses makefile concepts
    only.

    And why mine is consuming such a long time ??
    Where could be the problem ???

    Thx in advans,
    Karthik Balaguru


  4. Re: Takes long duration for compilation

    karthikbg wrote:

    > And why mine is consuming such a long time ??
    > Where could be the problem ???


    No offence, but it's a pretty silly question. Tell us how long it is
    taking to compile, and what kind of machine you are running with (CPU,
    memory etc).

    On my two-way SMP machine the Linux 2.4.20 kernel compiles in about a
    minute using a parallel compile.

  5. Re: Takes long duration for compilation


    Geronimo W. Christ Esq wrote:
    > karthikbg wrote:
    >
    > > And why mine is consuming such a long time ??
    > > Where could be the problem ???

    >
    > No offence, but it's a pretty silly question. Tell us how long it is
    > taking to compile, and what kind of machine you are running with (CPU,
    > memory etc).
    >
    > On my two-way SMP machine the Linux 2.4.20 kernel compiles in about a
    > minute using a parallel compile.


    Pentium 4, RAM - 1 GB.


  6. Re: Takes long duration for compilation

    karthikbg wrote:
    > Geronimo W. Christ Esq wrote:
    >> karthikbg wrote:
    >>
    >>> And why mine is consuming such a long time ??
    >>> Where could be the problem ???

    >> No offence, but it's a pretty silly question. Tell us how long it is
    >> taking to compile, and what kind of machine you are running with (CPU,
    >> memory etc).
    >>
    >> On my two-way SMP machine the Linux 2.4.20 kernel compiles in about a
    >> minute using a parallel compile.

    >
    > Pentium 4, RAM - 1 GB.
    >


    Time your compile, then time "make -j 7; make" and let us know the results.


    Dave

+ Reply to Thread