To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 2935
Subject: 
Re: Release candidate brickos-0.2.6.08 avail for testing
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Mon, 4 Nov 2002 13:53:32 GMT
Viewed: 
2716 times
  
In lugnet.robotics.rcx.legos, Stephen M. Moraco writes:
As this is a new mechanism, we are looking for feedback regarding your
successes and your failures in using this new configure tool.  You can
post this feedback as a reply to this message.  We will respond to
any difficulties you may have as quickly as we can.

I had essentially no problems with brickos-2.6.08 - aside from noticing at
least a couple new headers I have to port to Pascal.  configure worked like
a charm.

The only issue I encountered was regarding TOOLPREFIX.  The way that I have
my cygwin system configured, I have the pre-built Hitachi H8 tools installed
in one directory tree (with the bin directory on the path) and the GPC
Hitachi H8 cross-compiler installed in another directory tree (with the bin
directory on the path).  The way configure works now it assumes all the
compilers are in the same directory.  Unfortunately, with GPC that may not
always be the case.

I added the following lines to configure (after the cygwin/linux check):

#  look for gpc
#   search filesystem for full name of hitachi gpc compiler and path
#
HMSFULL=""
if test -z "$HMSFULL"
then
  HMSFULL=`find / \( -name 'h8*gpc' -o -name 'h8*gpc.exe' \) -print`
fi

#
# PToolprefix is full path and compiler name without 'gpc'
#
PTOOLPREFIX=$(echo $HMSFULL | sed "s/gpc.*//")

echo " - PToolprefix = "$PTOOLPREFIX


And changed this slightly:

cat $CURR_MAKEFILE | awk -v sedFlag=$SED_FLAG \
                          -v ext=$EXT \
  -v cc=$CC \
  -v cflags="$CFLAGS" \
  -v toolPrefix="$TOOLPREFIX" \
  -v ptoolPrefix="$PTOOLPREFIX" \
  -v mkdep="$MAKEDEPEND" \
  -v brickosRoot=$BRICKOS_ROOT \
  -v cflgPleq=$CFLG_PE \
  '
  BEGIN {
    inInsert=0
sep="# -------------------------------------------------------"
  }
  ($2 == "END-configuration") {
    inInsert=0
print sep
print "TOOLPREFIX=" toolPrefix
print "PTOOLPREFIX=" ptoolPrefix
print "SED_SFLAG=" sedFlag
print "EXT=" ext
print "CC=" cc
print "CFLAGS" cflgPleq "=" cflags
print "MAKEDEPEND=" mkdep
print "BRICKOS_ROOT=" brickosRoot
print sep
  }
  (inInsert) {
  next
  }
  ($2 == "BEGIN-configuration") {
    inInsert=1
  }
  {
  print $0
  }
  END {
  }' >$NEW_MAKEFILE

Then the original Makefile.common has these lines

GPC=$(PTOOLPREFIX)gpc
PFLAGS=--extended-syntax --unit-path=$(BRICKOS_ROOT)/lib/p

# how to compile pas source
%.o: %.pas
$(GPC) $(CFLAGS) $(PFLAGS) -c $< -o $@

# how to generate an assembly listing of pascal source
%.s: %.pas
$(GPC) $(CFLAGS) $(PFLAGS) -c $< -S

NOTE: The rules for .pas files appear to need to come before the rules for
.c files (although I am not entirely sure why).

And Makefile.user has these lines near the top:

#LIBS=-lc -lmint -lfloat -lc++
CLIBS=-lc -lmint -lfloat -lc++
PLIBS=-loogpc -lgpc
LIBS=$(PLIBS) $(CLIBS)

John Hansen


Subject: 
Re: Release candidate brickos-0.2.6.08 avail for testing
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Mon, 4 Nov 2002 17:21:43 GMT
Viewed: 
2721 times
  
In lugnet.robotics.rcx.legos, John Hansen writes:
In lugnet.robotics.rcx.legos, Stephen M. Moraco writes:
As this is a new mechanism, we are looking for feedback regarding your
successes and your failures in using this new configure tool.  You can
post this feedback as a reply to this message.  We will respond to
any difficulties you may have as quickly as we can.

I had essentially no problems with brickos-2.6.08 - aside from noticing at
least a couple new headers I have to port to Pascal.  configure worked like
a charm.

I spoke too soon.  There is a problem with cygwin and Makefile.Common in the
new release.  The host utilities are not built with -D_WIN32 which (of
course) causes them to not work at all.  In Makefile.Common there is a place
where CFLAGS is set to a value regardless of its previous value.  This
should probably be changed so it works with both Linux & Cygwin.

ifdef BUILDING_HOST_UTILS
# ----------------------------------------------------------------------------
#   defines for build of native compiled utilities
# ----------------------------------------------------------------------------

CFLAGS=-O2 -Wall

else  # ifndef BUILDING_HOST_UTILS


For Cygwin I can simply change that line to

CFLAGS+=-O2 -Wall

But for Linux that will duplicate the already existing value of CFLAGS.

John Hansen


Subject: 
Re: Release candidate brickos-0.2.6.08 avail for testing
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Tue, 5 Nov 2002 13:26:36 GMT
Viewed: 
3054 times
  
After making this change everything worked perfectly, as far as I can tell.

I had a lot of trouble trying to build the gcc cross compiler.  With this build
and the pre-build cross compiler from hitachi's website everything was very
easy.

Thanks!

Gary

In lugnet.robotics.rcx.legos, John Hansen writes:
I spoke too soon.  There is a problem with cygwin and Makefile.Common in the
new release.  The host utilities are not built with -D_WIN32 which (of
course) causes them to not work at all.  In Makefile.Common there is a place
where CFLAGS is set to a value regardless of its previous value.  This
should probably be changed so it works with both Linux & Cygwin.

ifdef BUILDING_HOST_UTILS
# ----------------------------------------------------------------------------
#   defines for build of native compiled utilities
# ----------------------------------------------------------------------------

CFLAGS=-O2 -Wall

else  # ifndef BUILDING_HOST_UTILS


For Cygwin I can simply change that line to

CFLAGS+=-O2 -Wall

But for Linux that will duplicate the already existing value of CFLAGS.

John Hansen


©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR