This is the mail archive of the
ecos-discuss@sourceware.cygnus.com
mailing list for the eCos project.
Re: pid_serial driver
On Sat, Feb 19, 2000 at 11:44:19AM +0100, Jesper Skov wrote:
> >>>>> "Grant" == Grant Edwards <grante@visi.com> writes:
>
> Grant> OK, I've got a preliminary driver, but can't figure out how to
> Grant> get it compiled when I do a "make". I've found lots of good
> Grant> documentation on how to write a driver, but nothing on what to
> Grant> do with the source file when you're done.
>
> Grant> I've put the source file in packages/io/serial/current/src/arm,
> Grant> and added arm/16850_serial.c to the EXTRAS_COMPILE list in
> Grant> packages/io/serial/current/src/PKGconf.mak. Now a "make" tries
> Grant> to add arm/io_serial_16850_serial.o to libextras.a, but that
> Grant> object file is never generated.
>
> That should be it. But the problem may be that you try to build from
> an existing (old) build directory. You'll need to run pkgconf again
> to have it pick up the new entry.
Yup, did that. It still doesn't compile my new source file.
> If you don't have any custom configurations you should be able
> to just run pkgconf --force in the existing build directory.
I am using a custom platform called "mustang", if that makes a
difference. I've created two new source files:
packages/io/serial/current/src/arm/16c850_serial.h
packages/io/serial/current/src/arm/16c850_serial.c
Then in packages/io/serial/current/src/PKGconf.mak, I added
lines:
ifdef CYGPKG_HAL_ARM_MUSTANG
EXTRAS_COMPILE += arm/16850_serial.c
endif
When I do a "make" the new source file doesn't get compiled,
and the make fails when it tries to build libextras.a:
make[1]: Entering directory /home/grante/ecos.new/ecos.custom/packages/ecos-mustang-serial/io/serial/current/src'
arm-elf-ar rcs /home/grante/ecos.new/ecos.custom/packages/ecos-mustang-serial/install/lib/libextras.a arm/io_serial_16850_serial.o
arm-elf-ar: arm/io_serial_16850_serial.o: No such file or directory
make[1]: *** [/home/grante/ecos.new/ecos.custom/packages/ecos-mustang-serial/install/lib/libextras.a(arm/io_serial_16850_serial.o)] Error 1
make[1]: Leaving directory /home/grante/ecos.new/ecos.custom/packages/ecos-mustang-serial/io/serial/current/src'
make: *** [/home/grante/ecos.new/ecos.custom/packages/ecos-mustang-serial/install/lib/libextras.a] Error 2
One thing I've notices is that when I build the standard pidBE
plaform, there is a file:
packages/ecos-pid/io/serial/current/src/makefile.deps
That doesn't get created for my custom platform.
FWIW, Here's the output from the configuration script:
Generating build tree.
Component repository is /home/grante/ecos.new/ecos.custom/packages/ecos-mustang-serial/..
Build tree is /home/grante/ecos.new/ecos.custom/packages/ecos-mustang-serial
Install directory is /home/grante/ecos.new/ecos.custom/packages/ecos-mustang-serial/install
Architecture arm, platform mustang, startup ram.
Processing package hal/common/current
Processing package infra/current
Processing package kernel/current
Processing package compat/uitron/current
Processing package language/c/libc/current
Processing package language/c/libm/current
Processing package error/current
Processing package hal/arm/arch/current
Processing package hal/arm/mustang/current
Processing package io/common/current
Processing package io/serial/current
Processing package devs/wallclock/current
Processing package devs/watchdog/current
Generating install directory /home/grante/ecos.new/ecos.custom/packages/ecos-mustang-serial/install
Generating miscellaneous files.
Generating toplevel makefile.
Generating save file.
The Build tree is ready.
--
Grant Edwards
grante@visi.com