[ECOS] Major problem in Downloading ecos in target pc
Robert Cragie
rcc@jennic.com
Fri Sep 20 09:02:00 GMT 2002
This request seems to crop up periodically, so here's a sort of mini how-to:
* Firstly, you build (or obtain) Redboot for a PC target which boots from a
floppy.
* Then you put Redboot onto a blank floppy, which will boot when you put it
in the PC and power the PC up.
* Then you code your application and link it with the eCos library built for
a PC target.
* Finally, you download your application to the PC target (running Redboot)
and debug it using GDB, connected via a serial port or over Ethernet.
Don't confuse the two separate binaries (Redboot and your application);
although Redboot naturally contains eCos as part of it, you still need to
build the supporting eCos library for your application separately.
You can build the 'redboot.bin' file for a floppy startup from scratch as
follows, or you can download a pre-built binary from here:
http://sources.redhat.com/ecos/boards/redbootbins/x86pc/redboot.bin
If you choose to download the pre-built binary, go to 'Create the floppy'
below.
Hints
-----
1) You need to be using configtool 1.3.1.4 or later. You can check by doing:
$ ecosconfig --version
2) If you use a PC with a supported network card (e.g. Intel EtherExpress
10/100), then you'll find debugging quicker and easier.
3) You may have problems booting Redboot on PC's with only one serial port
on (quite common on all-in-one motherboards).
4) In the following text, '$ ' simply represents the command line prompt -
don't type it in.
Build Redboot
=============
Make a clean directory, e.g. 'pc-redboot', change to it, and do the
following:
$ ecosconfig new pc redboot
$ ecosconfig import
<ecos>/packages/hal/i386/pc/current/misc/redboot_FLOPPY.ecm
$ ecosconfig tree
where <ecos> is the root directory of your eCos repository.
Note: If you want to alter the default IP Address at this point, you can
change it by editing the value for CYGDAT_REDBOOT_DEFAULT_IP_ADDR in
'ecos.ecc'.
To build the target, do:
$ make
Create the floppy
=================
To create the floppy, put a blank floppy in the drive and do (on Linux):
$ dd conv=sync if=install/bin/redboot.bin of=/dev/fd0H1440
or for cygwin:
$ dd conv=sync if=install/bin/redboot.bin of=/dev/fd0
(note in the mailing list that some people have had problems with cygwin).
Build your application
======================
Make a clean directory at the same level as 'pc-redboot' above, e.g. 'pc',
change to it, and do the following:
$ ecosconfig new pc
$ ecosconfig tree
$ make
This will create the eCos library for the default RAM-based build for the PC
target. Now you can build your application and link to the eCos library (see
http://sources.redhat.com/ecos/docs-latest/tutorials/i386pc/ecos-tutorial.13
.html#23350). Once you have done this, you can download the executable using
gdb to the PC and debug it.
Please note - almost all this information is available from the Redhat eCos
and Redboot documents.
Robert Cragie, Design Engineer
_______________________________________________________________
Jennic Ltd, Furnival Street, Sheffield, S1 4QT, UK
http://www.jennic.com Tel: +44 (0) 114 281 2655
> -----Original Message-----
> From: ecos-discuss-owner@sources.redhat.com
> [mailto:ecos-discuss-owner@sources.redhat.com]On Behalf Of Paidakis
> Giorgos
> Sent: 20 September 2002 15:42
> To: ecos-discuss@sources.redhat.com
> Subject: [ECOS] Major problem in Downloading ecos in target pc
>
>
> Hi, iam a begginer in ecos building and downloading it to a target
> board. Im working on a project where i must download Ecos OS to a pc. I
> have done so far the configuration for ecos useing ecosconfig on linux, i
> created a tree and i have used the make command. At the eCOS tree have
> created some object files and none executable. I dont know how to make a
> link and load eCOS in the pc. Must I use redboot? I searched at ecos
> documentation but it doesnt says where i can find the redboot source. i
> found only 2 files: redboot.bin and redboot.elf.i also read the rebdoot
> manual but it not clear if i have to install redboot both where i build
> the ecos and the target board. So i know dont know what to do so please i
> would apreciate it very much if someone could give me details of how to do
> the job i described above.
>
> Paidakis George
>
>
>
> --
> Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
> and search the list archive: http://sources.redhat.com/ml/ecos-discuss
>
>
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
More information about the Ecos-discuss
mailing list