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 / 2819
2818  |  2820
Subject: 
Small problem compiling w/gcc-3.2 and binutils-2.12.0 with patch.
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Tue, 3 Sep 2002 19:47:13 GMT
Viewed: 
2233 times
  
While compiling the brickos kernel under gcc-3.2 and binutils-2.12.0 I was
getting errors about nb_tasks and nb_system_tasks not being te same as
their declarations so I made them volatile just like in the header and the
kernel now compiles. The demos except trailerbot and c++.cpp compile and
function ok. I'll work on those demos later. Here is the tiny patch which
should work against CVS and the test tarball brickos-0.2.6.07.nmChg;

--- kernel/tm.c.old     Tue Sep  3 15:34:46 2002
+++ kernel/tm.c Mon Sep  2 17:24:05 2002
@@ -60,8 +60,8 @@
tdata_t td_single;                              //!< single task data
tdata_t *ctid;                                  //!< ptr to current task data

-unsigned int nb_tasks;                          //!< number of tasks
-unsigned int nb_system_tasks;                   //!< number of system (kernel) tasks
+volatile unsigned int nb_tasks;                          //!< number of tasks
+volatile unsigned int nb_system_tasks;                   //!< number of system (kernel) tasks

sem_t task_sem;                                 //!< task data structure protection



I don't know if this breaks anything or if this is even the right thing to
do.

J*



Message has 1 Reply:
  Re: Small problem compiling w/gcc-3.2 and binutils-2.12.0 with patch.
 
John, Good Job, John! It seems that older version of gcc don't catch the problem. I applied the changes and it compiles fine for me; I updated CVS. // Joe "John Jorgensen" <jjorgens@2gn.com> wrote in message news:Pine.LNX.4.21.0...2gn.com... (...) (...) (22 years ago, 4-Sep-02, to lugnet.robotics.rcx.legos)

2 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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