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 / 2160
2159  |  2161
Subject: 
Re: legOS ... really a stack question
Newsgroups: 
lugnet.robotics
Date: 
Sat, 2 Jan 1999 21:24:55 GMT
Original-From: 
Ben Laurie <ben@algroup.co.!IHateSpam!uk>
Viewed: 
1470 times
  
Rick Kimball wrote:

I'm still having reliability problems with legOS when
using the task management routines. However, I think
the problem has more to do with the stack than the
tm routines. I think the problem is related to the
direct-motor routines and the entries in h8300.rcx file.

I noticed that when I have more than a couple of
tasks and one of them uses the direct-motor fuctions
the program flakes out.  Looking at the direct-motor.c
I noticed that it uses the following asm instruction:

   mov.b r6l, @0xf0000:16

I'm not an assembler language programmer, so correct me
if I'm wrong.  I'm assuming that this moves one byte from
the low word of register 6 into address location 0xf000.

Then I noticed that in the h8300.rcx file the stack
starts at 0xfefc.  I'm assuming this is the top of
the stack and that it should grow downward towards the
heap which ends at 0xcc00.  Let's just ignore the stack
and the heap colliding for now.

If both of my assumptions above are correct won't the
direct-motor routines stomp the stack.

I changed the topram entry in my h8300.rcx to be 0xef00 instead
of 0xfefc.  This made the program run without any problems.
Was I just lucky or are my assumptions correct?

Hmmm ... good point. 0xf000 is memory mapped I/O for the motors, IIRC.
Not sure whats above there, but I wouldn't be surprised to hear it isn't
a good place to store things. I'd guess that setting the stack to 0xeffe
should be equally good.

I'll have to see if that also cures my mysterious problems...

Cheers,

Ben.

--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
     - Indira Ghandi
--
Did you check the web site first?: http://www.crynwr.com/lego-robotics



Message has 1 Reply:
  Re: legOS ... really a stack question
 
(...) All off-chip accesses to f000 or higher are memory mapped to the motors. Because accesses to addresses above fb7f are all on-chip or invalid, the motors are effectively memory mapped to f000-fb7f. (...) What are your symptoms again? One (...) (26 years ago, 2-Jan-99, to lugnet.robotics)

Message is in Reply To:
  legOS ... really a stack question
 
I'm still having reliability problems with legOS when using the task management routines. However, I think the problem has more to do with the stack than the tm routines. I think the problem is related to the direct-motor routines and the entries in (...) (26 years ago, 2-Jan-99, to lugnet.robotics)

10 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
    
Active threads in Robotics

 
Verified and Trusted Team of Hackers
10 hours ago
Custom Search

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