hello_world_c

angelo angelo at hunterlink.net.au
Tue Aug 1 22:15:34 UTC 2000


So how do I now execute the generated program.  I have attempted to create a
boot floppy with lilo. Using test.bt as the image, the computer re-boots after
loading. If I use test.bin, the program loads but does nothing. If I attempt
to use test.exe as the image, lilo says that the image is too big.

Joel Sherrill wrote:

> angelo wrote:
> >
> > I have come upon some problems with the hello_world dated
> > By making hello_world from the hello_world_c directory I get the
> > following error massage.
> >
> > In file included from test.c:35:
> > /opt/rtems/pc586/lib/include/confdefs.h:1005: #error "CONFIGURATION
> > ERROR: No tasks or threads configured!!
> > #endif
> >
> > /*
> >  *  Make sure at least one of the initialization task/thread
> >  *  tables was defined.
> >  */
> >
> > #if !defined(CONFIGURE_RTEMS_INIT_TASKS_TABLE) &&
> > !defined(CONFIGURE_POSIX_INIT_THREAD_TABLE) &&
> > !defined(CONFIGURE_ITRON_INIT_TASK_TABLE)
> > #error "CONFIGURATION ERROR: No initialization tasks or threads
> > configured!!
> > make: *** [o-optimize/test.o] Error 1
> >
> > Upon looking at test.c (in hello_world_c) we can see that
> > CONFIGURE_RTEMS_INIT_TASKS_TABLE is actually defined, so I investigated
> > the file /opt/rtems/pc586/lib/include/confdefs.h and we see the
> > following:
> >
> > #if (CONFIGURE_MAXIMUM_TASKS == 0) && \
> >     (CONFIGURE_MAXIMUM_POSIX_THREADS == 0) && \
> >     (CONFIGURE_MAXIMUM_ADA_TASKS == 0) &&  \
> >     (CONFIGURE_MAXIMUM_ITRON_TASKS == 0)
> > #error "CONFIGURATION ERROR: No tasks or threads configured!!
> > #endif
> >
> > /*
> >  *  Make sure at least one of the initialization task/thread
> >  *  tables was defined.
> >  */
> >
> > #if !defined(CONFIGURE_RTEMS_INIT_TASKS_TABLE) && \
> >     !defined(CONFIGURE_POSIX_INIT_THREAD_TABLE) && \
> >     !defined(CONFIGURE_ITRON_INIT_TASK_TABLE)
> > #error "CONFIGURATION ERROR: No initialization tasks or threads
> > configured!!
> > #endif
> >
> > The error has been caused by the following conditional statement:
> > #if (CONFIGURE_MAXIMUM_TASKS == 0) && \
> >     (CONFIGURE_MAXIMUM_POSIX_THREADS == 0) && \
> >     (CONFIGURE_MAXIMUM_ADA_TASKS == 0) &&  \
> >     (CONFIGURE_MAXIMUM_ITRON_TASKS == 0)
> >
> > however, the #error statement below this one and the conditional
> > statement after it do not end in a ".   Is this correct? I believe they
> > should both be terminated with a ".
> >
> > Back to the original problem however, This does not solve the problem as
> > to why the hello_world_c did not make.  This overcome by adding
> > #define CONFIGURE_MAXIMUM_TASKS 1
> >  to test.c (in hello_world_c) and this allowed the program to build and
> > generate an executable as o-optimize/test.exe.
> >
> > The two issues I am addressing in this long winded message are:
> >
> > 1. Should the two #error statements in
> > /opt/rtems/pc586/lib/include/confdefs.h be terminated with a " ?, and
>
> Yes.
>
> > 2. Should I have to include the CONFIGURE_MAXIMUM_TASKS 1 in test.c?
>
> Yes.
>
> > PS.
> > Just for a side issue, is it good programming practice to have #include
> > statements at the bottom of source modules (test.c)?
>
> In this case, it is.  this include is instantiating the configuration.
>
> > --
> > Angelo Fraietta
> >
> > PO Box 859
> > Hamilton NSW 2303
> >
> > Home Page
> >
> > http://users.hunterlink.net.au/~maaaf/
> >
> > There are those who seek knowledge for the sake of knowledge - that is
> > CURIOSITY
> > There are those who seek knowledge to be known by others - that is
> > VANITY
> > There are those who seek knowledge in order to serve - that is LOVE
> >     Bernard of Clairvaux (1090 - 1153)
>
> --
> Joel Sherrill, Ph.D.             Director of Research & Development
> joel at OARcorp.com                 On-Line Applications Research
> Ask me about RTEMS: a free RTOS  Huntsville AL 35805
>    Support Available             (256) 722-9985

--
Angelo Fraietta

PO Box 859
Hamilton NSW 2303

Home Page

http://users.hunterlink.net.au/~maaaf/

There are those who seek knowledge for the sake of knowledge - that is
CURIOSITY
There are those who seek knowledge to be known by others - that is VANITY
There are those who seek knowledge in order to serve - that is LOVE
    Bernard of Clairvaux (1090 - 1153)





More information about the users mailing list