Re: Question C code compilation

From: kishuri (kishuri_at_hotmail.com)
Date: 08/04/03


Date: 3 Aug 2003 23:05:38 -0700

steve@nospam.Watt.COM (Steve Watt) wrote in message news:<HIpMrA.rw0@Watt.COM>...
> In article <72e486b0.0307271630.7f6203c2@posting.google.com>,
> kishuri <kishuri@hotmail.com> wrote:
> >Hi All,
> >
> >I wrote simple program to print "Hi how are you" 100,000 times and
> >compiled on Redhat Linux.
> >
> >test.c
> >
> > main()
> > {
> > printf("Hi How are you");
> > .
> > .
> > .
> > /*Repeated printf for more one hundread thousand times */
> > }
> >
> >then
> >
> >did #make test
> > cc test.c -o test
> >
> >this command did NOT exit for more than half hour, later I did
> >control-c to exit.
> >
> >Please tell me why I can't compile this long code? [ ... ]
>
> Because you didn't wait long enough.
>
> > what would be the
> >best approach other than splitting the code.
>
> A for loop?
>
> What's the real problem you're trying to solve? Are you trying to
> figure out what the largest program you can compile is?
>
> For that matter, what does this have to do with embedded systems?
I know your embedded world is different. However, every embedded
systems do need a compiler and an operating system. This Question
falls under these two sections of embedded systems. Are not there any
better way to generate code, why does it fail or take longer when
compiling huge function like here main()? How long your embedded OS
take to compile this. If fails, how can you fix it? Think over it
before questioning others.
thanks,
kishuri



Relevant Pages

  • Re: Build your own Forth for Microchip PIC: Design thoughts
    ... Embedded systems hardware I don't plan to buy. ... Advanced work would be a distributed model where the PIC and host work ... All the code on the target would be headerless. ... compile once and copy the code to the PIC, ...
    (comp.lang.forth)
  • Re: Build your own Forth for Microchip PIC: Design thoughts
    ... Embedded systems hardware I don't plan to buy. ... the flash write speed often dominates the transfer time. ... TARGET, INTERPRETER, and the like. ... compile once and copy the code to the PIC, ...
    (comp.lang.forth)
  • Re: What are my options for dictionary hashing?
    ... stuff it's easiest to just recompile every time. ... If you can compile ... On embedded systems, all you need to do is to make sure the compilation is ... If you're stuck with a serial port as your umbilical, you're much better off with a cross-compiler, which only has to download the runtime object code, rather than passing all the source files through that slow pipe to a slow, limited on-board compiler. ...
    (comp.lang.forth)
  • Re: comparing java & c#
    ... really want to compile ahead of time and there are things that are inefficient about Java for that space. ... embedded systems. ... JET seems to manager it. ...
    (comp.lang.java.help)
  • Re: Moving from 8051 to AVR
    ... C was largely based on the "B" language, ... compile to native machine instructions, ... using methods suitable for embedded systems, ... target and for an ARM target. ...
    (comp.arch.embedded)