Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

No serial ports when cross compiling to Linux on ARM

12 views
Skip to first unread message

Derek

unread,
Nov 2, 2009, 9:24:53 AM11/2/09
to
Hi

I've managed to cross compile Tcl to an Linux/Arm based embedded
system,Dig connectME 9210.
This seems to work fine for the current task but the next task
includes the serial port.

When ever I try to configure the to port I get the "bad option "-mode"
should be ...." error message.


I have tried Etcl over a NFS mount and this is able to fconfigure the
port OK, however the Etcl binary is way too big for my purposes.

I've looked through the configure script and found the following which
suggests to me that serial ports are not supported when cross
compiling.

echo "$as_me:$LINENO: checking termios vs. termio vs. sgtty" >&5
echo $ECHO_N "checking termios vs. termio vs. sgtty... $ECHO_C" >&6
if test "${tcl_cv_api_serial+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$cross_compiling" = yes; then
tcl_cv_api_serial=no
else
<test for port handling here>

If I'm mistaken and it is just an invocation issue, does any body know
what the magic invocation is?

Is is possible to cross compile standard Tcl with full serial port
support?

Thanks in advance

Derek

Any help would be appreciated

Donal K. Fellows

unread,
Nov 2, 2009, 11:00:21 AM11/2/09
to
On 2 Nov, 14:24, Derek <derek.phi...@csr.com> wrote:
> I've looked through the configure script and found the following which
> suggests to me that serial ports are not supported when cross
> compiling.

You're correct that we don't, but that's because the code to determine
which API to build with is horrible (it needs to run compiled code
snippets IIRC). You can work around this by setting the environment
variable tcl_cv_api_serial to "termios", which configure will
interpret to mean "oh, we have this cached already" so overriding the
checking code. A bit of a hack, but fairly easy to do.

Donal.

Derek

unread,
Nov 2, 2009, 12:07:35 PM11/2/09
to
On Nov 2, 4:00 pm, "Donal K. Fellows"

Almost!!

It did find it

"checking sys/modem.h usability... no
checking sys/modem.h presence... no
checking for sys/modem.h... no
checking termios vs. termio vs. sgtty... (cached) termios
checking for fd_set in sys/types... yes
checking whether struct tm is in sys/time.h or time.h... time.h
.
.
"

However more errors crop up

"fixstrtod.o: In function `fixstrtod':
fixstrtod.c:(.text+0x0): multiple definition of `fixstrtod'
strtod.o:strtod.c:(.text+0x0): first defined here
collect2: ld returned 1 exit status
make: *** [libtcl8.5.so] Error 1"
"

Derek


Derek

unread,
Nov 2, 2009, 12:54:48 PM11/2/09
to

I removed this duplication and it built and seems to work.
I'll do some testing an try and reproduce before adding any more

Derek

0 new messages