public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* Re: [ECOS] Hi, makefile attachment here(Reference to previous mail).
@ 2003-10-15  6:28 Dhawal Mer
  0 siblings, 0 replies; only message in thread
From: Dhawal Mer @ 2003-10-15  6:28 UTC (permalink / raw)
  To: Eric.Doenges, Dhawal Mer; +Cc: andrew, ecos-discuss

[-- Attachment #1: Type: text/plain, Size: 6093 bytes --]

Hi,
Pleaes apologies me, i forget to add the attachment in previous mail ,please find here...
The application named as the 'makefile'.


Regards,
Dhawal.
-====================================================

>>> "Dhawal Mer" <merdn@LNTEBG.com> 10/15/03 11:50AM >>>
Hi,
Thanx for immediate reply.
Eric as per your info , i have successfully build (libtarget.a) the platform using net package/RAM startup.
But when i try to link the basic.c example application given in chapter12 of 'Embedded software Development with eCos' doc to libtarget.a , i have got the error as given below.The make file for above i have send as attachment (Application named as rb8139).
-----------------------------------------------------------------------------------------------------------------
Administrator@DHAWAL172 /ecos-c/workdir/application
$ make
i386-elf-gcc -nostartfiles -L/cygdrive/c/workdir/rb8139/rb8139_install/lib -Wl,-
-gc-sections -Wl,--Map -Wl,basic1.map -o basic1 basic1.o -Ttarget.ld -nostdlib
/cygdrive/c/workdir/rb8139/rb8139_install/lib/extras.o: In function `__static_in
itialization_and_destruction_0':
/ecos-c/ecos/packages/io/fileio/current/src/misc.cxx:104: undefined reference to
 `CYGARC_PCI_DMA_ADDRESS'
/ecos-c/ecos/packages/io/fileio/current/src/misc.cxx:123: undefined reference to
 `CYGARC_PCI_DMA_ADDRESS'
/ecos-c/ecos/packages/io/fileio/current/src/misc.cxx:141: undefined reference to
 `CYGARC_PCI_DMA_ADDRESS'
/ecos-c/ecos/packages/io/fileio/current/src/misc.cxx:141: undefined reference to
 `CYGARC_PCI_DMA_ADDRESS'
/ecos-c/ecos/packages/io/fileio/current/src/misc.cxx:141: undefined reference to
 `CYGARC_PCI_DMA_ADDRESS'
collect2: ld returned 1 exit status
make: *** [basic1] Error 1
---------------------------------------------------------------------------------------------
Please mail me where i am going wrong.
I have also tried out configuration 'i386 pc with 8139' with 'redboot',still redboot Networking options remains disabled.Than how i should ableto enabled the network debugging ?
Kindly also maill me the detail, how i can boot my system using 'libtarget.a' generated by your suggested configuration.

Regards,
Dhawal.
=========================================================


>>> Eric Doenges <Eric.Doenges@DynaPel.com> 10/14/03 05:32PM >>>
Dhawal Mer wrote:
> Hi,
> Thanx for your URL info. 
> As per your mentioned URL, i have downloaded the rltk8139.tgz .
> I tried to added the rltk driver as one of the package in eCos.db as shown below.
> —-------------------------------------------------------------------------------------------
> eCos.db
> —------------------------------------------------------------------------------------------
> package CYGPKG_DEVS_ETH_RLTK_8139 {
> 	alias 		{ "RLTK 8139 ethernet driver"
> 			   devs_eth_rltk_8139 8139_eth_driver }
> 	hardware
> 	directory	devs/eth/rltk/8139
> 	script		rltk_8139_eth_drivers.cdl
>         description     "Ethernet driver for RLTK 8139 NIC."
> }
> - - - — - — - - — - — — — — - —- —- — —---- — —---- —- — — —- — - — — 
> package CYGPKG_DEVS_ETH_I386_PC_RLTK8139 {
> 	alias 		{ "Standard PC with EtherPro 10/100 ethernet device"
> 			   devs_eth_i386_pc_8139 pc_etherpro }
> 	hardware
> 	directory	devs/eth/i386/pc/rltk8139
> 	script		i386_pc_rltk8139_eth_drivers.cdl
>         description     "Ethernet driver for standard PC with Intel 8139 NIC. This is
> 			 essentially support for a EtherPro 10/100 PCI card."
> }
> 
> —-------------------------------------------------------------------------------------------
> After adding above statements, The RTL8139 driver get added to the package list as 'PC RealTek 8139 ethernet driver'.I have also added RTL8139 macro in the default list of i386 & removed the 82559 macro. 
> But when I try to configure i386 as target with RTL8139 as a NIC( Redboot as a Package ),the Option 'PC RealTek 8139 ethernet driver' in the Configuration windows remains disabled (It was showing all sub-options in disable mode too..).
> Please mail me  where i am wrong & if possible send me, brief procedure for adding above rltk8139 driver into the eCos Configtool 2.1/eCos Configtool 1.3.
> Please also note that i have onboard ethernet , do i need to change anything in above driver for the same.

You will also need a 'target' in ecos.db somewhat like this:

target pc_8139 {
   alias    { "i386 PC target with RealTek 8139 ethernet" }
   packages { CYGPKG_HAL_I386
              CYGPKG_HAL_I386_GENERIC
              CYGPKG_HAL_I386_PC
              CYGPKG_HAL_I386_PCMB
              CYGPKG_IO_PCI
              CYGPKG_IO_SERIAL_GENERIC_16X5X
              CYGPKG_IO_SERIAL_I386_PC
              CYGPKG_DEVS_ETH_RLTK_8139
              CYGPKG_DEVS_ETH_I386_PC_RLTK8139
              CYGPKG_DEVICES_WALLCLOCK_DALLAS_DS12887
              CYGPKG_DEVICES_WALLCLOCK_I386_PC
            }
   description "The pc target provides the
             packages needed to run eCos binaries on a standard i386
             PC motherboard (with RealTek 8139 NIC)."
}

Then, in the configtool choose the menu item 'Build->Templates', and
select the pc_8139 target and the 'net' package in the dialog. It
shouldn't matter if the 8139 is onboard or not to the driver.
Please note that I don't have an i386 PC target to test so I can't
really help you much further if there are PC-specific problems.
-- 
--------------------------------------------------------------------
|     Eric Doenges              |     DynaPel Laboratories GmbH    |
|     Tel: +49 89 962428 23     |     Fraunhoferstrasse 9/2        |
|     Fax: +49 89 962428 90     |     D - 85737 Ismaning, Germany  |
--------------------------------------------------------------------


--
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 


[-- Attachment #2: makefile --]
[-- Type: application/octet-stream, Size: 2380 bytes --]

###########################################################################
#
#	Filename:			makefile
#
#	Description:		Basic example application makefile from
#						Chapter 12: An Example Application Using eCos.
#						This makefile is based on the example makefile
#						from the eCos source code repository.
#
#						Embedded Software Development With eCos
#						by Anthony Massa
#
#						Copyright (c) 2002, 2003 by Anthony Massa.
#						This software is placed into the public domain
#						and may be used for any purpose.  No warranty
#						is either expressed or implied by its
#						publication or distribution.
#
###########################################################################

## eCos library installation directory
PKG_INSTALL_DIR = /cygdrive/c/workdir/rb8139/rb8139_install


## This sets the compiler to i386 PC.
XCC = i386-elf-gcc

##
## Build flag descriptions.
##
## Compiler flags
##
##   -g						: Produce debugging information.
##   -Wall					: Enable all preprocessor warnings.
##   -I						: Add directory to head of list to be searched for header files.
##   -ffunction-sections	: Place each function into its own section.
##   -fdata-sections		: Discard unused virtual functions.
##
## Linker flags
##
##   -nostartfiles			: Do not use the standard system startup files when linking.
##							  The standard system libraries are used normally, unless
##							  -nostdlib or -nodefaultlibs is used.
##   -L						: Add DIRECTORY to library search path.
##   -Wl					: Pass comma-separated <options> on to the linker.
##   --gc-sections			: Remove unused sections (on some targets).
##   -Map					: Write a map file.
##   -T						: Read linker script.
##   -nostdlib				: Do not use the standard system startup files or
##							  libraries when linking. No startup files and only
##							  the libraries you specify will be passed to the linker.
##

## Build flags.
CFLAGS	= -g -Wall -I$(PKG_INSTALL_DIR)/include -ffunction-sections -fdata-sections
LDFLAGS	= -nostartfiles -L$(PKG_INSTALL_DIR)/lib -Wl,--gc-sections -Wl,--Map -Wl,basic1.map
LIBS	= -Ttarget.ld -nostdlib
LD		= $(XCC)


## Build rules.
all: basic1

basic1.o: basic1.c
	$(XCC) -c -o $*.o $(CFLAGS) $<

basic1: basic1.o
	$(LD) $(LDFLAGS) -o $@ $@.o $(LIBS)

clean:
	-rm -f basic1.exe basic1.o basic1.map


[-- Attachment #3: Type: text/plain, Size: 146 bytes --]

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-10-15  6:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-15  6:28 [ECOS] Hi, makefile attachment here(Reference to previous mail) Dhawal Mer

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).