This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Get problem on "Hello eCos world!"


Hi,

I want generate a bin file which can boot up AT91SAM7256 and send
"Hello eCos world!" back to hyper terminal. I am new to eCos. Please
tell me if I did it right.
1) I use AT91SAM7SEK template default package to generate libtarget.a
ROM is selected to Startup type in Atmel AT91SAM7 HAL. Take out some
packages I do not need.
2) I changed hello.c (code see bellow) in c:\ecos\examples\ and use
the make file over there
3) using objcopy convert .elf file to .bin file
4) using SAM-BA load .bin file to board

I got compile problem at step 2). Please see code and error message bellow.
I am using gcc version 4.1.0

Thanks in advance,

-frank

hello.c
=====
/* this is a simple hello world program */
#include <stdio.h>
#include <cyg/kernel/kapi.h>      // Kernel API.
#include <cyg/infra/diag.h>      // For diagnostic printing.
int main(void)
{
while(1)
 {
 diag_printf( "Hello, eCos world!\n");
// Delay for 1 second.
 cyg_thread_delay( 100 );
 }
}

Error message:
===========
c:\cygwin\workdir\at91\ecos examples>make
INSTALL_DIR=c:/cygwin/workdir/at91/ecos_install
arm-elf-gcc -c -o hello.o -Ic:/cygwin/workdir/at91/ecos_install/include -mcpu=ar
m7tdmi -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-v
irtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvt
able-gc -finit-priority hello.c
cc1: warning: command line option "-Woverloaded-virtual" is valid for C++/ObjC++
but not for C
cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not fo
r C
cc1: warning: command line option "-fvtable-gc" is valid for C++/ObjC++ but not
for C
cc1: error: unrecognized command line option "-finit-priority"
make: *** [hello.o] Error 1

c:\cygwin\workdir\at91\ecos examples>

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]