To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 2052
2051  |  2053
Subject: 
Re: legOS - Does it work for you?
Newsgroups: 
lugnet.robotics
Date: 
Fri, 1 Jan 1999 06:08:18 GMT
Viewed: 
1335 times
  
Rick Kimball wrote:

I'm really excited about the legOS.  I got egcs that
came with RedHat 5.1 setup as a cross compiler. I
grabbed the source to legOS and started playing...
In fact, that is all I have done for the last couple
of days.

I've had good success running the demo programs.
That is, as long as I don't toggle the run button
more than 5 or 6 times.  After that the RCX would
just flake out.  I spent some time debugging it and
it looks to me like the task management stuff
is corrupting memory.  I added my own mm_grim_reaper
routine to the main loop that basically does an
mm_init.

I also recompiled legOS with all the task management
turned off.  I then hacked the light-sensor program
so that it would still work without the execi functions.
This works great and doesn't corrupt any memory.
However, the real power of legOS is the preemptive
multi-tasking.

Am I the only one having this problem?  Many of the
library stuff that comes with egcs would not compile
so I just did a "make -k" so that it would finish.
This produced all the desired executables needed
by the legOS makefile.

-rick

-- add this to mm.c --

// my grim reaper hack to re init the memory heap...
void mm_grim_reaper() {
   mm_update_first_free(&mm_start);
}

// insert the above function somewhere in your kmain.c
// after the rc=main

I am also running Redhat 5.1, and installed the binutils and gcc sources
via the 5.1 cd. When I tried to
follow the instructions for cross compiling I got:

[root@razoo gcc-2.7.2.3]# ./configure
--prefix=../binutils-2.9.1.0.4/binutils --targ
This appears to be a i586-unknown-linux system.
... stuff deleted...
Merged h8300/t-h8300.
Created `cp/Makefile'.
Links are now set up to build a cross-compiler for h8300-hitachi-hms
  from i586-unknown-linux.

(so it looks like it is set up for the Hitachi)

[root@razoo gcc-2.7.2.3]# make LANGUAGES=c
_cmpsi2
/tmp/cca03168.s: Assembler messages:
/tmp/cca03168.s:2: Error: no such 386 instruction: `libgcc1'
/tmp/cca03168.s:3: Error: no such 386 instruction: `contributed'
/tmp/cca03168.s:4: Error: invalid character '@' in opcode
/tmp/cca03168.s:93: Error: invalid character '.' in opcode
/tmp/cca03168.s:94: Error: no such 386 instruction: `bne'
/tmp/cca03168.s:95: Error: invalid character '.' in opcode
/tmp/cca03168.s:96: Error: no such 386 instruction: `bne'
/tmp/cca03168.s:97: Error: invalid character '.' in opcode
/tmp/cca03168.s:98: Error: no such 386 instruction: `rts'
/tmp/cca03168.s:100: Error: invalid character '.' in opcode
/tmp/cca03168.s:101: Error: no such 386 instruction: `bgt'
/tmp/cca03168.s:102: Error: no such 386 instruction: `bne'
/tmp/cca03168.s:103: Error: invalid character '.' in opcode
/tmp/cca03168.s:104: Error: no such 386 instruction: `bls'
/tmp/cca03168.s:106: Error: invalid character '.' in opcode
/tmp/cca03168.s:107: Error: no such 386 instruction: `rts'
/tmp/cca03168.s:109: Error: invalid character '.' in opcode
/tmp/cca03168.s:111: Error: no such 386 instruction: `rts'

So I tried your trick with the make -k and got further, but could not
"make install"
and so I moved the files to the proper location by hand.  Now I try to
compile
the demos now I get stuff like:
/tmp/cca08929.s:39: Error: invalid character '.' in opcode
/tmp/cca08929.s:40: Error: no such 386 instruction: `bne'
/tmp/cca08929.s:41: Error: invalid character '.' in opcode
/tmp/cca08929.s:42: Error: no such 386 instruction: `bne'
/tmp/cca08929.s:43: Error: invalid character '.' in opcode
/tmp/cca08929.s:44: Error: invalid character '.' in opcode
/tmp/cca08929.s:45: Error: invalid character '.' in opcode
/tmp/cca08929.s:46: Error: invalid character '.' in opcode
/tmp/cca08929.s:48: Error: invalid character '.' in opcode
/tmp/cca08929.s:49: Error: invalid character '.' in opcode
/tmp/cca08929.s:52: Error: invalid character '.' in opcode
/tmp/cca08929.s:53: Error: invalid character '.' in opcode
/tmp/cca08929.s:55: Error: no such 386 instruction: `rts'

It looks like the assembler i may still in be i386 mode or something.
I have no experience with cross compiling, is there a step that
I might be missing?   Any assistance appreciated  Thanks -- Bobby



Message has 1 Reply:
  Re: legOS - Does it work for you?
 
(...) Here is what I did... 1. Build and install binutils (GNU ) 1a. ./configure --prefix=/usr/local --target=h8300-hitachi-hms 1b. make 1c. make install 2. Extract egcs from RedHat 5.1 source cd (Disk 2) 2a. rpm -ihv egcs-1.0.2-8.src.rpm 2b. gzip (...) (26 years ago, 1-Jan-99, to lugnet.robotics)

Message is in Reply To:
  legOS - Does it work for you?
 
I'm really excited about the legOS. I got egcs that came with RedHat 5.1 setup as a cross compiler. I grabbed the source to legOS and started playing... In fact, that is all I have done for the last couple of days. I've had good success running the (...) (26 years ago, 30-Dec-98, to lugnet.robotics)

12 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