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 / 3579
3578  |  3580
Subject: 
Re: Memory, Motors and Odd Things
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Thu, 11 Dec 2003 00:34:13 GMT
Viewed: 
4080 times
  
In lugnet.robotics.rcx.legos, Steve Hassenplug wrote:
   I ran into something odd, and I’m wondering if someone can explain it.

I have a pretty large BrickOS program, (the .lx is about 9k) and it uses around 2k for variables. (I think)

I’ve noticed when the program is running, it’s not doing anything with the motors, but they seem to buzz. I hooked up some diodes and lights, and found the outputs are going both + and -.

I assume my variables are writing into the motor control area of BrickOS. Is that possible?

Is there something I can do to stop it?

Any other thoughts?

Hi Steve,

Are you using BrickOS 0.2.6.10?

In earlier versions, it was possible for malloc() to return pointers to RAM in the range [F010,FB7F], which was shared with the motor port controller. Writing to this memory adversely affected the motors. The problem was somewhat sporadic because malloc() would only return addresses in the problem range when memory was low or fragmented. If you want to read more, check out this thread.

What firmware downloader did you use to download BrickOS (i.e. the brickOS.srec file, not the .lx file)?

Using firmdl3 is fine, but NQC and all but the latest version of BricxCC have a problem downloading BrickOS to the RCX correctly. The symptom was “growling motors”, even when no program was running. Read more here.

If you’re using BrickOS 0.2.6.10 and firmdl3, then it’s possible you have a stray pointer that is writing beyond the memory allocated to you.

If you have recursive code, your program could be overflowing your stack memory and corrupting memory (unlikely, but I thought I’d mention it since I have a hunch what your program is for... :-).

Or, there could be Yet Another BrickOS Motor Port Bug in the offing... ;-/

Mark



Message has 1 Reply:
  Re: Memory, Motors and Odd Things
 
(...) no. Ok, that's my first problem. (...) hmm. yep. malloc()... (...) no, using the firmdl3. (...) Yes, it's recursive. And, I'm sure your hunch is right. (...) It sounds like it's the malloc() bug. I'm using 0.2.6.09 (?) I'm not going to switch (...) (21 years ago, 11-Dec-03, to lugnet.robotics.rcx.legos, FTX)

Message is in Reply To:
  Memory, Motors and Odd Things
 
I ran into something odd, and I'm wondering if someone can explain it. I have a pretty large BrickOS program, (the .lx is about 9k) and it uses around 2k for variables. (I think) I've noticed when the program is running, it's not doing anything with (...) (21 years ago, 10-Dec-03, to lugnet.robotics.rcx.legos)

3 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