errors while compiling Hello_World_C with Eclipse under Windows 7

mostafa fo'ad serag2009 at gmail.com
Fri Sep 19 13:52:13 UTC 2014


Hi everyone,

Please be patient with me as I am a newbie. I intalled the RTEMS toolchain
following this link:
 http://www.rtems.org/wiki/index.php/MinGW_Tools_for_Windows
I used the "TLL6527M" instead of the default BSP, and a "blackfin" instead
of "powerpc" in each step. Everything worked just fine.

I installed the Eclipse Plug-In too.

My paths look like that:

Base path: C:\opt\rtems-4.10
BSP path: C:\opt\rtems-4.10\bfin-rtems4.10\TLL6527M
MinGW path: C:\MinGW
MSYS path: C:\MinGW\msys\1.0

then I made a new C project in Eclipse, my project type was : Others> RTEMS
Executable
I added a source file: main.c, copied and pasted the Hello_World_C program:

/*
 *  Simple test program -- simplified version of sample test hello.
 *
 *  $Id$
 */

#include <bsp.h>

#include <stdlib.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 */

/* NOTICE: the clock driver is explicitly disabled */
#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER

#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_MAXIMUM_TASKS 1

#define CONFIGURE_INIT

#include <rtems/confdefs.h>

/* end of file */

Now I have these 4 errors:

make: *** [test2.exe] Error 1
Type 'rtems_task_argument' could not be resolved
Type 'rtems_task' could not be resolved
undefined reference to `main'

and the build console shows this:

18:11:41 **** Build of configuration RTEMS Executable Configuration for
project test2 ****
make all
Building file: ../main.c
Invoking: RTEMS C Compiler
C:/opt/rtems-4.10/bin/bfin-rtems4.10-gcc
-BC:/opt/rtems-4.10/bfin-rtems4.10/TLL6527M/lib/ -specs bsp_specs -qrtems
-mcpu=bf527 -Os -g -Wall -c -fmessage-length=0 -pipe -MMD -MP -MF"main.d"
-MT"main.d" -o "main.o" "../main.c"
Finished building: ../main.c

Building target: test2.exe
Invoking: RTEMS C++ Linker
C:/opt/rtems-4.10/bin/bfin-rtems4.10-g++
-BC:/opt/rtems-4.10/bfin-rtems4.10/TLL6527M/lib/ -specs bsp_specs -qrtems
-mcpu=bf527 -o "test2.exe"  ./main.o
C:/opt/rtems-4.10/bfin-rtems4.10/TLL6527M/lib\librtemscpu.a(dummy.o):(.data+0x2c):
undefined reference to `main'
collect2: ld returned 1 exit status
make: *** [test2.exe] Error 1

18:11:43 Build Finished (took 1s.139ms)


I hope you can guide me, where my problem is ..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20140919/5063b913/attachment.html>


More information about the users mailing list