This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Compiling ARM designed program for x86
- From: Andrew Lunn <andrew at lunn dot ch>
- To: Champion J?r?me <Jerome dot Champion at he-arc dot ch>
- Cc: ecos-discuss at ecos dot sourceware dot org
- Date: Tue, 7 Aug 2007 15:04:46 +0200
- Subject: Re: [ECOS] Compiling ARM designed program for x86
- References: <F7620004260C5D4DB836EDBF8CC6872D01393111@neptune.intra.eiaj.ch>
On Tue, Aug 07, 2007 at 02:44:25PM +0200, Champion J?r?me wrote:
> Hi,
> I've been using eCos for making some applications for the Atmel AT91M55800A processor. ( With the Atmel AT91EB55 evaluation card ).
> I've followed some tutorial, and it work quite well.
>
> But is there an easy way to compile my programs for my computer ( it's a standard x86 with linux ) and test it locally ? Because it take a lot of time to upload the program to the card each time I make a little modification, and I only use printf, some timer/alarm, semaphore/mailbox. I don't use leds or switch.
>
> I've tried to mimic how I've made with the ARM processor :
> Download eCos for x86
> Make a profile for x386 in configtool, build the library.
> then build my source with this command :
> i386-elf-gcc -g -I /home/champioj/Projet/data/x86/x86_install/include /home/champioj/Projet/Perso/testes/helloworld/helloworld.c -L /home/champioj/Projet/data/x86/x86_install/lib -T target.ld -nostdlib
>
> It make the file "a.out". But now I don't know what to do with it.
> With the ARM, the target was /dev/ttyS0 because I used the serial port. But now what is it ?
> Or it's the wrong way and I can't do that because I need Redboot ?
Since you are on linux it is easy. Use the synthetic target. This runs
eCos as a Linux process. The programs you generate just run on
linux. You can use gdb as normal for a linux process etc....
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss