Getting Started ( hello_wrorld_c trouble )

Joel Sherrill joel.sherrill at OARcorp.com
Thu Sep 28 18:36:11 UTC 2000


Known problem in hello world.  Fixed in the attached file.

Chang Lyong Kim wrote:
> 
> Dear,
> 
> I am trying to install RTEMS for C/C++ on RedHat6.2 Linux PC.
> I found these things and installed very quickly.
> 
> m68k-rtems-binutils-2.9.5.0.24-1.i386.rpm
> m68k-rtems-gcc-gcc2.95.2newlib1.8.2-7.i386.rpm
> m68k-rtems-gdb-4.18-4.i386.rpm
> rtems-base-binutils-2.9.5.0.24-1.i386.rpm
> rtems-base-gcc-gcc2.95.2newlib1.8.2-7.i386.rpm
> rtems-base-gdb-4.18-4.i386.rpm
> 
> Then, I followed RTEMS installation procedure from "Getting Started..."
> 
> configure --target=m68k-rtems --prefix=/usr/local/cross
> make RTEMS_BSP="gen68360"
> make install  RTEMS_BSP="gen68360"
> 
> No problem here.
> Then, when I tried to compile test.c under hello_world_c.tgz,
> I got the following error.
> 
> =================================================================
> /opt/rtems/bin/m68k-rtems-gcc --pipe -B/usr/local/cross//gen68360/lib/
> -specs bsp_specs -qrtems -g -Wall -ansi -fasm  -O4 -fomit-frame-pointer
> -mcpu32     -c   -o o-optimize/test.o test.c
> In file included from test.c:28:
> /usr/local/cross/gen68360/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
> =====================================================================
> 
> When I removed
> 
> #define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
> #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
> #define CONFIGURE_INIT
> #include <confdefs.h>
> 
> from test.c,
> 
> it produced,
> ===================================================================
> /opt/rtems/bin/m68k-rtems-gcc --pipe -B/usr/local/cross//gen68360/lib/
> -specs bsp_specs -qrtems -g -Wall -ansi -fasm  -O4 -fomit-frame-pointer
> -mcpu32     -c   -o o-optimize/test.o test.c
> /opt/rtems/bin/m68k-rtems-gcc --pipe -B/usr/local/cross//gen68360/lib/
> -specs bsp_specs -qrtems -g -Wall -ansi -fasm  -O4 -fomit-frame-pointer
> -mcpu32      -L /usr/local/cross//gen68360/lib    -o o-optimize/test.exe
> o-optimize/test.o   /usr/local/cross//gen68360/lib/no-dpmem.rel
> /usr/local/cross//gen68360/lib/no-event.rel
> /usr/local/cross//gen68360/lib/no-msg.rel
> /usr/local/cross//gen68360/lib/no-mp.rel
> /usr/local/cross//gen68360/lib/no-part.rel
> /usr/local/cross//gen68360/lib/no-signal.rel
> /usr/local/cross//gen68360/lib/no-timer.rel
> /usr/local/cross//gen68360/lib/no-rtmon.rel
> /usr/local/cross//gen68360/lib/librtemsall.a(bootcard.o): In function
> `boot_card':
> /home/clkim/rtems/tools/rtems_build/m68k-rtems/c/gen68360/lib/libbsp/m68k/gen68360/startup/../../../../../../../../../rtems-4.5.0-beta3a/c/src/lib/libbsp/m68k/gen68360/startup/../../../shared/bootcard.c:93: undefined
> reference to `Configuration'
> /home/clkim/rtems/tools/rtems_build/m68k-rtems/c/gen68360/lib/libbsp/m68k/gen68360/startup/../../../../../../../../../rtems-4.5.0-beta3a/c/src/lib/libbsp/m68k/gen68360/startup/../../../shared/bootcard.c:93: undefined
> reference to `Configuration'
> /home/clkim/rtems/tools/rtems_build/m68k-rtems/c/gen68360/lib/libbsp/m68k/gen68360/startup/../../../../../../../../../rtems-4.5.0-beta3a/c/src/lib/libbsp/m68k/gen68360/startup/../../../shared/bootcard.c:93: undefined
> reference to `Configura
> ..........BlaBla...
> =====================================================================
> 
> Any comment is welcome!!!
> 
> Thank you very much,
> 
> Chang

-- 
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
-------------- next part --------------
/*
 *  Simple test program -- simplified version of sample test hello.
 */

#define TEST_INIT

#include <bsp.h>

#include <stdio.h>

rtems_task Init(
  rtems_task_argument ignored
)
{
  printf( "\n\n*** HELLO WORLD TEST ***\n" );
  printf( "Hello World\n" );
  printf( "*** END OF HELLO WORLD TEST ***\n" );
  exit( 0 );
}

/* configuration information */

#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER

#define CONFIGURE_RTEMS_INIT_TASKS_TABLE

#define CONFIGURE_MAXIMUM_TASKS 1

#define CONFIGURE_INIT

#include <confdefs.h>

/* end of file */


More information about the users mailing list