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 / 3917
3916  |  3918
Subject: 
Re: Errors compiling threads
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Thu, 4 Aug 2005 14:10:47 GMT
Viewed: 
6936 times
  
On Wed, August 3, 2005 9:01 pm, Marcelo Molinari wrote:
seeker.c:18: parse error before `driving_thread'
seeker.c:19: parse error before `bumper_thread'
seeker.c:20: parse error before `light_thread'
seeker.c: In function `basic_driver':
seeker.c:274: `sys_time' undeclared (first use in this function)
make: *** [seeker.o] Error 1


I assume I have a problem with my compiler, but I can't figure out what it is.
Any help will be very welcomed!

I don't think it's a problem with the compiler.  There have been changes to the
BrickOS code over the years.

I know the value sys_time has been replaced with the function Get_sys_up_time().
You should be able to add this line at the beginning of the code:

#define sys_time Get_sys_up_time()  // v10 does not have sys_time

Or, maybe that would do other bad things.  You could just replace sys_time with
Get_sys_up_time() everywhere in the code.

And, I just went looking through the new code.  I think 'pid_t' was replaced with
'tid_t'

Make those changes in your program (seeker), and you should be good to go.

Steve



Message has 1 Reply:
  Re: Errors compiling threads
 
(...) Hi Steve, Thanks, you were right about the compiler being ok. I changed "pid_t" to "tid_t" and got the thread statements working correctly. Finally, by consulting BrickOS documentation I found out the new syntax for the old "sys_time" command (...) (19 years ago, 4-Aug-05, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  Errors compiling threads
 
Hi all, I am new to C programming but I was able to build the C programming/compiler enviroment with cygwin and brickos 2.6.10 following the instructions at (URL) Later I upgraded to brickOS 0.9.0 and the compiler seems to be working fine most of (...) (19 years ago, 4-Aug-05, 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