From: Moussa Ba <mba@embedded-zone.com>
To: Frank Wu <qiongwu23@gmail.com>
Cc: ecos-discuss <ecos-discuss@ecos.sourceware.org>
Subject: Re: [ECOS] Get problem on "Hello eCos world!"
Date: Sun, 30 Jul 2006 16:07:00 -0000 [thread overview]
Message-ID: <44CCD917.6010001@embedded-zone.com> (raw)
In-Reply-To: <591a86200607292222o164f82d7k927d7a10d771dd51@mail.gmail.com>
You are most likely using a more recent version of gcc, try compiling
without the -finit-priority.
Moussa
Frank Wu wrote:
> 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
prev parent reply other threads:[~2006-07-30 16:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-30 5:22 Frank Wu
2006-07-30 16:07 ` Moussa Ba [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44CCD917.6010001@embedded-zone.com \
--to=mba@embedded-zone.com \
--cc=ecos-discuss@ecos.sourceware.org \
--cc=qiongwu23@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).