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]

Re: Which default CFLAGS should a HAL define?


On Tue, 29 Jun 2010, Manuel Borchers wrote:

Hi all,

when trying to build a network stack (OpenBSD) into my kernel, I
struggled over a missing define.

When building I got:
-- SNIP --
In file included
from /home/manuel/Arbeit/netX-ACCOS/netx_accos/trunk/src/ecos/work/netx500_ram_standalone_eth/install/include/cyg/io/eth/eth_drv.h:62,

from /home/manuel/Arbeit/netX-ACCOS/netx_accos/trunk/src/ecos/ecos-cvs/packages/devs/eth/arm/netx/current/src/netx_eth.c:64:

[cut]


[The german error message means, that the file or dir couldn't be found)
After looking into the header file param.h I found out that these
includes were guarded by #ifndef __ECOS, which wasn't in my list of
global CFLAGS, but only in the build options for the BSD stack. I added
-D__ECOS in my ecc file and the build works now.

So, my question is, should this define (and which other defines, I'm
potentially missing?) be in the list of default CFLAGS defined by my
platform HAL?

Hi Manuel,


As I could see the source is netx_eth.c. Do you have in its CDL a
component likes the below

    cdl_component CYGPKG_DEVS_ETH_ARM_NETX_OPTIONS {
        display "NetX ethernet driver build options"
        flavor  none
	no_define

        cdl_option CYGPKG_DEVS_ETH_ARM_NETX_CFLAGS_ADD {
            display "Additional compiler flags"
            flavor  data
            no_define
            default_value { "-D_KERNEL -D__ECOS" }
            description   "
                This option modifies the set of compiler flags for
                building the ARM9 NetX ethernet driver package.
                These flags are used in addition to the set of
                global flags."
        }
    }


Most of the Ethernet drivers have such an addition. That enters a per package CFLAGS expansion.


Sergei


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