Well, to start with the last point: I have implemented the (dumb) serial
driver in the platform port, as do most arm9 ports. This one works fine
for the debug/console channel.
What I'm having problems with is a driver package for the UARTs. It's
sitting in devs/serial/arm/netx. It's defined as a package. Parent is
CYGPKG_IO_SERIAL_DEVICES. You'll find the cdl attached.
I followed this guide when porting the old v2 driver to v3:
http://ecos.sourceware.org/docs-3.0/ref/io-how-to-write-a-driver.html
(How to Write a Serial Hardware Interface Driver).
The devtab entry looks liek this:
-- snip --
#if defined(CYGPKG_IO_SERIAL_ARM_NETX_UART0)
static netx_serial_info netx_serial_info0 = {Addr_uart0, CYGNUM_HAL_INTERRUPT_UART0};
static unsigned char netx_serial_out_buf0[BUFFER_SIZE];
static unsigned char netx_serial_in_buf0[BUFFER_SIZE];
static SERIAL_CHANNEL_USING_INTERRUPTS(netx_serial_channel0,
netx_serial_funs,
netx_serial_info0,
CYG_SERIAL_BAUD_RATE(CYGNUM_IO_SERIAL_ARM_NETX_UART0_BAUD),
CYG_SERIAL_STOP_DEFAULT,
CYG_SERIAL_PARITY_DEFAULT,
CYG_SERIAL_WORD_LENGTH_DEFAULT,
CYG_SERIAL_FLAGS_DEFAULT,
&netx_serial_out_buf0[0], sizeof(netx_serial_out_buf0),
&netx_serial_in_buf0[0], sizeof(netx_serial_in_buf0));
DEVTAB_ENTRY(netx_serial_io0,
"/dev/ser0",
0, // Does not depend on a lower level interface
&cyg_io_serial_devio,
netx_serial_init,
netx_serial_lookup, // Serial driver may need initializing
&netx_serial_channel0);
#endif
-- snip --
CYGPKG_IO_SERIAL_ARM_NETX_UART0 is per default on (see cdl), the serial
stuff is pulled in from my ecm:
[...]
package -hardware CYGPKG_IO_SERIAL_ARM_NETX v3_0 ;
package -template CYGPKG_IO v3_0 ;
package -template CYGPKG_IO_SERIAL v3_0 ;
[...]
cdl_component CYGPKG_IO_SERIAL_DEVICES {
user_value 1
};
The resulting ecos.ecc shows that the packages are there and that
CYGPKG_IO_SERIAL_ARM_NETX_UART0 is selected. The libextras.a includes
the netx_serial.o file. But the application elf shows no sign of the
netx_serial_* functions.
Do you need anything more? Or any hints on the functions / call flow
that initialize the serial subsystem would be great, too.
I enabled CYGDBG_IO_INIT, which shows no sign of serial initialization
besides the tty driver and the haldiag init using the
platform-implemented serial driver:
-- snip --
Init device
'/dev/ttydiag'
Init tty channel:
0x8003f54c
Init device
'/dev/haldiag'
HAL/diag SERIAL init
-- snip --
Cheers,
Manuel
--
manuel@matronix.de
http://www.matronix.de