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 / 3395
3394  |  3396
Subject: 
Re: BrickOS installation with WinME and Cygnus problems
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Tue, 5 Aug 2003 12:51:24 GMT
Viewed: 
3113 times
  
In lugnet.robotics.rcx.legos, Max Bowsher wrote:
Tom Pugsley wrote:
am _really_ stuck.  I am following the web pages "brickOS 0.2.6.10
Instructions for
installing on
Win9x/NT/2000/XP" by Paolo Masetti, and "brickOS step-by-step with
cygwin" by (I'm not online and can't check it.)

I would not try to follow both of these instructions.  Pick one and do just
exactly what that set of instructions says to do.  My favorite, naturally, is
the second set (since getting the right set of GCC source code and compiling it
without errors can be a little tricky for novices).

It sounds like you have installed the pre-built Hitachi tools (based on your
path setting).  You don't need the C:\CYGWIN\H8300-000821\H-I686-CYGWIN32\BIN
directory in your path but it should not cause any problems.

Try this:

1. Open a DOS box.
2. cd /cygwin
3. cygwin
4. cd /brickos-0.2.6.10
5. ./configure

What, exactly, does this command say?

Mine says

$ ./configure

Welcome to the brickOS Makefile configurator.
Attempting to find the Hitachi gcc compiler. (This may take some time.)

- Toolprefix = /h8300-000821/H-i686-cygwin32/bin/h8300-hms-
- Found Cygwin/DJGPP system

configure: no configuration changes needed, nothing done.


Double check the edits that configure made to Makefile.common by typing

less Makefile.common

use the spacebar to view this file a page at a time.  Look for the section that
looks like this:

#  BEGIN-configuration insert (do not remove this line)
# -------------------------------------------------------
TOOLPREFIX=/h8300-000821/H-i686-cygwin32/bin/h8300-hms-
SED_SFLAG=
EXT=.exe
CC=gcc
CFLAGS+=-D_WIN32
MAKEDEPEND=$(CC) -M
BRICKOS_ROOT=/brickos-0.2.6.10
# -------------------------------------------------------
#  END-configuration insert  (do not remove this line)

If you have installed the pre-built Hitachi tools and you did not ever try to
build GCC on your own (possibly leaving behind a partially built broken version
of the GCC tools somewhere below your Cygwin directory) then your configuration
insert section ought to look very much like mine does above.  Make absolutely
sure you don't have any partially built GCC tools lying around beneath your
Cygwin directory (if you ever tried to build them from the source code
yourself).

You definitely MUST have EXT=.exe and you MUST have CFLAGS+=-D_WIN32.  Your
TOOLPREFIX could be different (but it shouldn't be if you followed my
instructions to the letter).

Look further on in Makefile.common for this section:

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

CFLAGS+=-O2 -Wall

else  # ifndef BUILDING_HOST_UTILS

This absolutely must be CFLAGS+=-O2 -Wall rather than CFLAGS=-O2 -Wall.

If it is missing the + in front of the = then your host utilities will not be
built to run under Windows and they will not work correctly.  It should be
correct since that is one of the things fixed in build 10.

Type q to get out of less once you've checked these two spots in
Makefile.common.  If these are not correct you can edit them using Wordpad
(Notepad doesn't handle the Unix-style line ends).

Problem #1 (really #314):
When I do "make strip" in /BrickOS/util, I get an error:

strip:  fontdesign.exe: no such file or directory
(From what I gather, this may not really be a significant problem?)

Problem #1 is not really a problem.  You don't need to do a make strip.
fontdesign.exe is never built by the makefiles so it never exists in the util
directory.  If you want to build fontdesign.exe and strip it you can type

make fontdesign

from the /brickos-0.2.6.10/util directory.  That should build fontdesign.exe and
then you should be able to type

make strip

and have it succeed.  But either way, fontdesign.exe is not needed for brickOS
at all.  Mainly you need to check in the util directory for five executables:
firmdl3.exe, dll.exe, makelx.exe, fixdeps.exe, and genlds.exe.

My advice is to not ever try to execute make strip - you don't need to and it
might not work.  If you want to, you can type strip *.exe from the util
directory and your executables will all get smaller.

Problem #2:
When I type

./firmdl3  ../boot/brickOS.srec

it can't find the brickOS.srec.  It's not in the /boot directory.  I
can't find
it anywhere.  What command produces brickOS.srec?

If you want to try building just brickOS.srec you can change directory to the
boot directory (cd /brickos-0.2.6.10/boot) then type:

make realclean
make

A successful output will look something like

$ make
Makefile:186: .depend: No such file or directory
/h8300-000821/H-i686-cygwin32/bin/h8300-hms-gcc -M -I/brickos-.2.6.10/include
-I/brickos-0.2.6.10/include/lnp -I. /brickos-0.2.6.10/kernel/*.c > .depend
/h8300-000821/H-i686-cygwin32/bin/h8300-hms-gcc -O2 -fno-builtin
-fomit-frame-pointer -Wall -I/brickos-0.2.6.10/include
-I/brickos-0.2.6.10/include/lnp -I.  -c /brickos-0.2.6.10/kernel/kmain.c -o
kmain.o
[...]
/h8300-000821/H-i686-cygwin32/bin/h8300-hms-ld -T /brickos-0.2.6.10/h8300.rcx
-relax -L/brickos-0.2.6.10/lib kmain.o mm.o systime.o tm.o semaphore.o conio.o
lcd.o lnp-logical.o lnp.o remote.o program.o vis.o battery.o timeout.o dkey.o
dmotor.o dsensor.o dsound.o swmux.o critsec.o setjmp.o -lc -lmint -o
brickOS.coff
chmod a-x brickOS.coff
/h8300-000821/H-i686-cygwin32/bin/h8300-hms-nm brickOS.coff | sort -u >
brickOS.map
/h8300-000821/H-i686-cygwin32/bin/h8300-hms-objcopy -I coff-h8300 -O srec
brickOS.coff brickOS.srec
chmod a-x brickOS.srec
/brickos-0.2.6.10/util/genlds brickOS < brickOS.map > brickOS.lds
rm brickOS.map

If you get errors at the

/h8300-000821/H-i686-cygwin32/bin/h8300-hms-ld

line it is almost certainly because the libraries did not build successfully
(which they can't have if you got errors while compiling random.c).

Aha! Problem #3:
When I run Make in the BrickOS directory, I get an error message about
Random.c having some undeclared routines.

random.c is compiled into libc.a when make runs in the lib subdirectory.  Try
changing directory to lib (cd /brickos-0.2.6.10/lib) then type

make realclean
make

and pay close attention to the output.  Does the line referring to random.c look
like this:

/h8300-000821/H-i686-cygwin32/bin/h8300-hms-gcc -O2 -fno-builtin
-fomit-frame-pointer -Wall -I/brickos-0.2.6.10/include
-I/brickos-0.2.6.10/include/lnp -I.  -c random.c -o random.o

Looking at the source code for random.c makes me wonder how you could get errors
about undeclared routines since it doesn't include any header files.  It is
completely self-contained.  Can you post the exact error messages?

I am not enough of a C programmer yet to feel that I can fix Random.c.

If everything is working correctly you shouldn't have to "fix" anything.  Also,
since Unix filenames are case sensitive it is very important to be precise
regarding the case of filenames to which you refer.  I'm pretty sure, in this
case, that you mean "random.c" since there is no "Random.c" anywhere.

* Show *exactly* the commands you typed and the error output produced.

Max is right.  That's definitely the best way to get help.

John Hansen



Message has 2 Replies:
  Re: BrickOS installation with WinME and Cygnus problems
 
Thanks, Max, John, and Ed for your help. I will try some of the suggestions this afternoon after work. I will also post some more helpful output if someone will remind me how to port Cygwin output to a text file (and DOS output?) I read the command (...) (21 years ago, 6-Aug-03, to lugnet.robotics.rcx.legos)
  Re: BrickOS installation with WinME and Cygnus problems
 
Ed, John, and Max, (et.al.?), Here's the output from one of my sessions. I started to follow some of John's instructions (got through the make strip alright, even though it's unnecessary), but I didn't want to go too deep until you people see the (...) (21 years ago, 8-Aug-03, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  Re: BrickOS installation with WinME and Cygnus problems
 
(...) PATH=C:\WINDOWS;C:\W...IN\H8300-0 00821\H-I686-CYGWIN32\BIN; (...) OK, the best way to get help is: * Start with the *first* problem which occurs. Problem #3 is very likely the cause of #1 and #2. * Show *exactly* the commands you typed and (...) (21 years ago, 5-Aug-03, to lugnet.robotics.rcx.legos)

18 Messages in This Thread:




Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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