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 / 3583
3582  |  3584
Subject: 
Re: Global Objects was Strange RCX startup issues
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Thu, 11 Dec 2003 17:14:45 GMT
Viewed: 
4113 times
  
Mark Riley wrote:

In lugnet.robotics.rcx.legos, Joseph Woolley wrote:

[snipped]

To add automatic handling of the global objects (for the kernel built
with TM and PROGRAM) would require that dll send the address of __ctors,
__ctors_end, __dtors and __dtors_end to the Program Manager.


Yes, I took a peek at the dll code and it looks like only one packet type would
have to be extended to add this additional information.

When not using the program manager (i.e. linking the user program directly to
BrickOS), then some simple loops like in my example should do the trick.

I simply added ctor_size and dtor_size to the *image*, *lx* and
*program* structures.  This allows the program manager to calc the start
and end of these segments.


This seems possible, but not likely in the very near future.  Maybe I
can dig into it before January.

That would be great, Joe, if you could find the time.  I know I've shyed away
from using C++ with BrickOS because of this problem.  (Too lazy to fix it, I
guess! :-)

It wasn't as hard as I had thought.  I have the fix working, but need to
clean it up a bit (and do some more testing)


Question:  Should this be an OPTION in config.h or a permanent update?
Currently, I #ifdef'd all the code, but it seems like a reasonable piece
of code and doesn't add much to the size of the kernel.


// Joe



Message has 1 Reply:
  Re: Global Objects was Strange RCX startup issues
 
(...) I opt for option. Not much may be to much in some cases. And I don't want to program in c++ anyway. Regards, Michael (21 years ago, 11-Dec-03, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  Re: Global Objects was Strange RCX startup issues
 
(...) Yes. (...) Yes, I took a peek at the dll code and it looks like only one packet type would have to be extended to add this additional information. When not using the program manager (i.e. linking the user program directly to BrickOS), then (...) (21 years ago, 10-Dec-03, to lugnet.robotics.rcx.legos)

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