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: Device Driver package link error


Steven Clugston wrote:
Are you sure that this function is exported (i.e. *not* declared 'static')? Note that even static functions make it to the .o file (for use by GDB, etc), they just can't be linked against.

Yes they're static so that'll be the problem - Thanks.


All of the other driver code I've looked at also uses statics, so how
can I separate the code into different source files?

In the .h file, declare them as 'extern' or 'externC' if you have a mix of C and C++. In the .c file where they are defined, just leave out the 'static'

The reason I wanted to have different source files is that by the time
code is added for several TPU functions, then the one file would become
very large.
It feels a bit like I am fighting the underlying eCos /devs structure
and maybe I need a /dev/tpu onto which separate /dev/enc and /dev/pwm
etc drivers are built onto, it just that it is seems difficult to
envisage how these separate drivers could be serialised in the same way
as /dev/ser and /dev/tty without a 'friend' driver abstraction that was
mentioned somewhere in the ecos2.0 docs for possible future
implentation.


Short of that, maybe you can share your code? (put it somewhere interested folk can access it). Sometimes a simple once-over can find these things where lots and lots of questions and answers just don't suffice.

Something like: ... a picture is worth a thousand words

I will happily share the code, but I wanted to get it into a working state before generating a patch file or a .epk file. The next step would be to generalise it further to work with other mpc5xx boards such as mpc565 based boards like the phyCORE-MPC565 etc.

-- ------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------

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