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 / *299 (-40)
  Re: legOS make newbe question
 
I appreciate your help, and it does sound interseting. However, I'm sure I'm not alone when I say that I'd prefer to leverage my (much more marketable) C skills when writing programs for the RCX. That's why I'm using NQC right now - I already know (...) (25 years ago, 28-Jun-99, to lugnet.robotics.rcx.legos)
 
  RE: legOS make newbe question
 
(...) As a professional programmer, I just don't have the time, interest, or inclination to fiddle with building the GNU tools. I have tried to do this by following other folks best efforts and got something that was 95% functional. and in the end, (...) (25 years ago, 28-Jun-99, to lugnet.robotics.rcx.legos)
 
  RE: legOS make newbe question
 
(...) Geez, I hate to plug my own work, but why not try the new pbFORTH. You can have arrays, as many variables as you want, simple multitasking, etc... No need for a compiler, just a terminal emulator will work. You DO have to try and learn FORTH, (...) (25 years ago, 28-Jun-99, to lugnet.robotics.rcx.legos)
 
  Re: legOS make newbe question
 
The existing HOWTO is nice, and I know he worked hard on it BUT.... What I think we need is a howto with a REALLY narrow scope... which, ironically, would cover more people than any other group. You know what's probably out there right now? A ton of (...) (25 years ago, 28-Jun-99, to lugnet.robotics.rcx.legos)
 
  Re: legOS make newbe question
 
Phil, Matt, other Windows/LegOS users- If anyone would like to write them up, I'd love to add Windows instructions to my LegOS HOWTO. Only problem is that I cannot test them myself, so I need others to provide them and make them usable. Currently, I (...) (25 years ago, 28-Jun-99, to lugnet.robotics.rcx.legos)
 
  Re: legOS make newbe question
 
I'm thinking - we need just such a list! I mean - the only info out there for Win98 users is confusing at best. What is needed is a VERY SIMPLE explanation - basically, several steps. Download THIS zip file Unzip it to THIS directory name Put the (...) (25 years ago, 28-Jun-99, to lugnet.robotics.rcx.legos)
 
  Re: legOS make newbe question
 
You are sooo smart. I am not sure I completely understand everything you have said in the last two posts, but if I just blindly type "make --unix" IT WORKS!!!. I will now go back and see if I can follow everything you have suggested and see if I can (...) (25 years ago, 27-Jun-99, to lugnet.robotics.rcx.legos)
 
  Re: signals / legOS internals
 
(...) So is the idea that you might have a "shell" app that lets you control a button or two and that takes over the lcd at times (say), and lets you start, suspend, and stop other apps that control different, presumably disjoint sets of motors and (...) (25 years ago, 26-Jun-99, to lugnet.robotics.rcx.legos)
 
  Re: signals / legOS internals
 
(...) They could. In fact, there may be cases where that is exactly what you want to do. However, that requires you to write your code to examine the semaphore at every point where you would want to consider processing the event. It is more work. (...) (25 years ago, 26-Jun-99, to lugnet.robotics.rcx.legos)
 
  Re: signals / legOS internals
 
(...) Yes, that is it. A classic example is a full screen app such as vi. When being stopped, vi sets the terminal mode to something generic and saves any screen info that it needs. When resumed, it sets the terminal mode back to what it wants and (...) (25 years ago, 26-Jun-99, to lugnet.robotics.rcx.legos)
 
  Re: signals / legOS internals
 
(...) Now keep in mind that this is coming from someone who won't take Duke's OS class until next spring- is there any reason the current semaphore implementation couldn't be used for a large percentage of these tasks? I.E., thread A checks (or uses (...) (25 years ago, 26-Jun-99, to lugnet.robotics.rcx.legos)
 
  Re: legOS make newbe question
 
(...) Damn, I am too used to tcsh, and yet I still remembered the export. Make that: MAKE_MODE=UNIX; export MAKE_MODE (followed by make) Again, make --unix should also do the trick if that is easier to remember. Oh. My MAKE_MODE environment variable (...) (25 years ago, 26-Jun-99, to lugnet.robotics.rcx.legos)
 
  Re: signals / legOS internals
 
(...) What am I missing? Why do you need callbacks in the process structure? I was thinking if you can reference the thread, you can just call a system function (e.g. suspend(thread)), and that will suspend the thread. You do not need callbacks (...) (25 years ago, 26-Jun-99, to lugnet.robotics.rcx.legos)
 
  Re: legOS make newbe question
 
(...) Some versions of make look for the sh shell, others use the dos shell. Probably, make is using the dos shell and not sh. As far as I know, make does not parse the parens, the shell does. And dos does not understand the parens. My cygwin make (...) (25 years ago, 26-Jun-99, to lugnet.robotics.rcx.legos)
 
  Re: legOS make newbe question
 
Thanks Lou, I am sure that you are right. I also don't know what could cause it or how to fix it. I just hope there is some bright person who reads this NG and can get me on to the next step. Based upon the discussion topics that I have seen, this (...) (25 years ago, 26-Jun-99, to lugnet.robotics.rcx.legos)
 
  Re: signals / legOS internals
 
(...) Cool. I will proceed. (...) Yup. I was out of the loop for awhile, and am once again whompin' on this project. (...) That is true. Signals would give the task the opportunity to stop/start tasks under its control, though, without the task that (...) (25 years ago, 26-Jun-99, to lugnet.robotics.rcx.legos)
 
  Re: legOS make newbe question
 
(...) More to the point, it cannot recognize the '(cd' command. Now, why that is, or how you can fix it, I do not know. It would appear to be a problem with make or with your shell. It should just be farming the entire line off to the shell, which (...) (25 years ago, 26-Jun-99, to lugnet.robotics.rcx.legos)
 
  Re: signals / legOS internals
 
(...) No, you should not abandon your implementation - not if you want to use LegOS. I was only explaining how I implemented similar functionality, for the sake of comparison. Regarding Librcx, I might release another version at some point, to add (...) (25 years ago, 26-Jun-99, to lugnet.robotics.rcx.legos)
 
  Re: legOS make newbe question
 
I reinstalled everything and I have progressed to the point of seeing the first-c++.o file and it stops with the following error: -snip- C:\legOS-0.1.7>make h8300-hms-g++ -DCXX -O2 -fno-builtin -fomit-frame-pointer -Wall -Wno-unused -Wno (...) (25 years ago, 26-Jun-99, to lugnet.robotics.rcx.legos)
 
  Re: signals / legOS internals
 
(...) So, should I abandon my implementation? If something every bit as good is already there, it may be silly for me to continue. I haven't looked at Librcx yet, so I don't completely understand how it works. I think one of the original reasons for (...) (25 years ago, 26-Jun-99, to lugnet.robotics.rcx.legos)
 
  Re: signals / legOS internals
 
Ola, I do not see why you persist. I understand that a signal handler is very low level, that it is difficult to use right, that it only allows some things and not others, unless you're very careful. But you still missed my point, which was this: (...) (25 years ago, 25-Jun-99, to lugnet.robotics.rcx.legos)
 
  Re: signals / legOS internals
 
(...) When a frame or character has been received by the IR port it signals an interrupt to the processor. The processor (OS) handles this by invoking an ISR (Interrupt Service Routine). In OSE ISR's are known as interrupt processes and they execute (...) (25 years ago, 25-Jun-99, to lugnet.robotics.rcx.legos)
 
  Re: signals / legOS internals
 
(...) I should add that since many things are vectored in this version of Librcx, overriding functionality is easy for the advanced user to do. For example: extern void (*__event_vector)(void); void my_setup_func() { // ... __event_vector = (...) (25 years ago, 24-Jun-99, to lugnet.robotics.rcx.legos)
 
  Re: signals / legOS internals
 
(...) I think you're missing the point. Now correct me if I'm wrong, Lou -- I believe the intent of the signal mechanism is to allow a way to specify a function to run when a system event occurs: e.g. a message arrives across the IR port. It is (...) (25 years ago, 24-Jun-99, to lugnet.robotics.rcx.legos)
 
  Re: signals / legOS internals
 
I misspoke when I said before that we have semaphores. What I meant was mutexes. We have had mutexes for quite awhile. Certainly long before I started on this signal thing. I started this long enough ago that I don't remember what particular problem (...) (25 years ago, 23-Jun-99, to lugnet.robotics.rcx.legos)
 
  RE: signals / legOS internals
 
(...) Ummmmm, I don't want to speak for Markus, but most embedded kernels (and I use a lot of them) use the term signal and semaphore interchangably. I'm willing to bet a couple of bricks that the intent is to implement semaphores to facilitate (...) (25 years ago, 23-Jun-99, to lugnet.robotics.rcx.legos)
 
  Re: signals / legOS internals
 
(...) Because they are useful at times, and Markus directed me to implement them. I think the upcoming network code is going to use them, too (at least, that's what I heard). Just 'cause they're there doesn't mean you have to use them. (...) How do (...) (25 years ago, 23-Jun-99, to lugnet.robotics.rcx.legos)
 
  Re: signals / legOS internals
 
(...) This second methed doesn't really solve anything since you still have to communicate with the compute thread from the receive thread. (...) But what can you actually do in the signal handler? Modify the state of the state of the executing (...) (25 years ago, 23-Jun-99, to lugnet.robotics.rcx.legos)
 
  Re: signals / legOS internals
 
(...) This is the same thing as most modern RTOS use, called various things. The terminology I use for this is FLIH/SLIH (first level interrupt handler and second level interrupt handler). Coupled with lock priority inheritance, it makes for a very (...) (25 years ago, 23-Jun-99, to lugnet.robotics.rcx.legos)
 
  Re: signals / legOS internals
 
(...) In OSE interrupt processes (first class processes, that is why we don't call them ISR's) use OS mechanisms (usually messages) to communicate with normal processes. The OS handles all update of shared data structures (such as message queues). A (...) (25 years ago, 23-Jun-99, to lugnet.robotics.rcx.legos)
 
  Re: signals / legOS internals
 
(...) An ISR can certainly modify data that is used by the executing code. For example, if it doesn't save registers that are used the interrupted code will certainly be affected. In fact, the ISR is of little use if it doesn't modify data that can (...) (25 years ago, 23-Jun-99, to lugnet.robotics.rcx.legos)
 
  Re: signals / legOS internals
 
(...) But hardware interrupts schedule a different context (the interrupt process or ISR) from the one already executing. A Unix-style signal asynchronously signal interrupts the executing process and jumps to a different location in the code that (...) (25 years ago, 23-Jun-99, to lugnet.robotics.rcx.legos)
 
  Re: signals / legOS internals
 
(...) An asynchronous signal models a hardware interrupt. There are times when that is the appropriate interface. There are times when other interfaces are less error prone and are easier to write correctly. Frequently using only synchronous (...) (25 years ago, 23-Jun-99, to lugnet.robotics.rcx.legos)
 
  Re: signals / legOS internals
 
(...) Why signals?!? Unix-style asynchronous signals is the last feature I would ever want to implement or use. Brain-dead and very dangerous "feature". As you write; "The problem is that a signal can happen at any time". You shouldn't pass this (...) (25 years ago, 23-Jun-99, to lugnet.robotics.rcx.legos)
 
  Re: signals / legOS internals
 
(...) Actually, gcc moves the stack pointer before using any variables, so it is always safe to use stack below the current stack pointer. If you are using a different C compiler or doing assembly tricks, then you are on your own. (...) Traditional (...) (25 years ago, 23-Jun-99, to lugnet.robotics.rcx.legos)
 
  RE: signals / legOS internals
 
(...) Not to put too fine a point on it, and I hope Kekoa agrees, but the "fluff" is the reason why replacement firmware works in the first place. Without the ROM vectors being dispatched through RAM pointers that are initialized by the ROM and then (...) (25 years ago, 23-Jun-99, to lugnet.robotics.rcx.legos)
 
  Re: signals / legOS internals
 
(...) Since it sounds like it might matter to you, I should point out that the interrupt situation on the RCX is a bit more complicated than the H8 manual makes it out to be. Interrupt vectors are in ROM, but the ROM does a dispatch to interrupt (...) (25 years ago, 23-Jun-99, to lugnet.robotics.rcx.legos)
 
  Re: signals / legOS internals
 
(...) Yes, that is correct. As for passing parameters to a function, they are simply pushed onto the stack before the function call. Therefore, the H8 stack usually looks something like e.g. this: function param sp+10 function param sp+8 return (...) (25 years ago, 23-Jun-99, to lugnet.robotics.rcx.legos)
 
  Re: signals / legOS internals
 
(...) I may have answered my own question here. Since the SP is adjusted before anything is actually done with the local variables, the rule about it always pointing to the last valid datum is not violated even if local variables are placed after (...) (25 years ago, 23-Jun-99, to lugnet.robotics.rcx.legos)
 
  Re: signals / legOS internals
 
(...) I may have down and up reversed, since different machines grow the stack upward or downward, and I've worked with a few. I do have push and pop clear in my mind, though. So, yeah, down. So, by the "always" rule, nothing will ever be below the (...) (25 years ago, 23-Jun-99, to lugnet.robotics.rcx.legos)


Next Page:  5 more | 10 more | 20 more | 40 more

Redisplay Messages:  All | Compact

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