Subject:
|
Re: legOS ... really a stack question
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Sat, 2 Jan 1999 22:44:15 GMT
|
Viewed:
|
1404 times
|
| |
| |
Rick Kimball <kimballr@nh.ultranet.com> wrote:
> 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?
Looking at my memory map, it appears that there is space for the stack in
on-chip memory between fdc0 and ff7e (or thereabouts). That's just about
450 bytes. If you need more stack space than that, you'll need to move the
stack to off-chip memory. Using ef3c for the first stack element seems to
be a safe place, but ef00 is okay if you want to be really conservative.
Note that off-chip memory is slower than on-chip memory.
By the way, the fefc entry in h8300.rcx appears to be ignored. It's there
to define the _stack symbol, which is unused. You mentioned libgcc2.c, but
that does not appear to reference the stack symbol or set the stack
pointer. What gives?
I do not link to any GNU libraries, I do not use C++, I do not use
h8300.rcx. I have written everything from scratch. But I have looked at
h8300.rcx.
I'm curious what your setup is. Mine is certainly different from yours.
-Kekoa
|
|
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
|
|
|
Active threads in Robotics
|
|
|
|