<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 8, 2016 at 12:18 PM, Matthew Clark <span dir="ltr"><<a href="mailto:linux.matthew@gmail.com" target="_blank">linux.matthew@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I'm trying to build the rtems schedule simulator on my raspberrypi2 and am running into a compilation error. I'm following the instructions provided in schedsim/UsingTheSchedulerSimulator.txt. The configure step </div><div><br></div><div><font face="monospace, monospace">./rtems-schedsim.master.git/configure --prefix=/tmp/schedsim --enable-maintainer-mode </font></div><div><font face="monospace, monospace">--enable-rtemsdir=/home/rtems/rtems-4.11.git --enable-rtemsbsp="raspberrypi2" </font></div><div><font face="monospace, monospace">--enable-networking --enable-cxx --enable-tests --target=arm-rtems4.11</font></div><div><br></div><div>goes fine, but it blows up at compile:</div><div><br></div><div><font face="monospace, monospace">gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I..</font></div><div><font face="monospace, monospace">-I../../../rtems-schedsim.master.git/schedsim/rtems </font></div><div><span style="font-family:monospace,monospace">-D__RTEMS_VIOLATE_KERNEL_VISIBILITY__ -D_GNU_SOURCE </span><br></div><div><font face="monospace, monospace">-I../score/include </font></div><div><font face="monospace, monospace">-I../../../rtems-schedsim.master.git/schedsim/rtems/sched_cpu </font></div><div><font face="monospace, monospace">-I/home/rtems/rtems-4.11.git/cpukit/include </font></div><div><font face="monospace, monospace">-I/home/rtems/rtems-4.11.git/cpukit/score/include </font></div><div><font face="monospace, monospace">-I/home/rtems/rtems-4.11.git/cpukit/rtems/include </font></div><div><font face="monospace, monospace">-I/home/rtems/rtems-4.11.git/cpukit/sapi/include </font></div><div><font face="monospace, monospace">-I/home/rtems/rtems-4.11.git/cpukit/libcsupport/include </font></div><div><font face="monospace, monospace">-I/home/rtems/rtems-4.11.git/cpukit/libmisc/stringto </font></div><div><font face="monospace, monospace">-I/home/rtems/rtems-4.11.git/cpukit/posix/include </font></div><div><font face="monospace, monospace">-I/home/rtems/rtems-4.11.git/cpukit/posix/include </font></div><div><font face="monospace, monospace">-g -O2 -MT librtems_a-rtems_init.o -MD -MP -MF .deps/librtems_a-rtems_init.Tpo </font></div><div><font face="monospace, monospace">-c -o librtems_a-rtems_init.o `test -f 'rtems_init.c' || </font></div><div><font face="monospace, monospace">echo '../../../rtems-schedsim.master.git/schedsim/rtems/'`rtems_init.c</font></div><div><font face="monospace, monospace">In file included from /home/rtems/rtems-4.11.git/cpukit/score/include/rtems/score/thread.h:87:0,</font></div><div><font face="monospace, monospace"> from /home/rtems/rtems-4.11.git/cpukit/score/include/rtems/score/heap.h:22,</font></div><div><font face="monospace, monospace"> from /home/rtems/rtems-4.11.git/cpukit/rtems/include/rtems/rtems/types.h:26,</font></div><div><font face="monospace, monospace"> from /home/rtems/rtems-4.11.git/cpukit/rtems/include/rtems/rtems/config.h:24,</font></div><div><font face="monospace, monospace"> from /home/rtems/rtems-4.11.git/cpukit/sapi/include/rtems/config.h:57,</font></div><div><font face="monospace, monospace"> from ../../../rtems-schedsim.master.git/schedsim/rtems/rtems_init.c:25:</font></div><div><font face="monospace, monospace">/home/rtems/rtems-4.11.git/cpukit/score/include/rtems/score/timestamp.h: In function ‘_Timestamp_Set’:</font></div><div><font face="monospace, monospace">/home/rtems/rtems-4.11.git/cpukit/score/include/rtems/score/timestamp.h:79:3: </font></div><div><font face="monospace, monospace">warning: implicit declaration of function ‘timespec2bintime’ </font></div><div><font face="monospace, monospace">[-Wimplicit-function-declaration]</font></div><div><font face="monospace, monospace"> timespec2bintime( &_ts, _time );</font></div><div><br></div><div>I chased the problem down to the fact that since gcc is being called, it's including /usr/include/sys/time.h, which doesn't define <span style="font-family:monospace,monospace">timespec2bintime. </span><font face="arial, helvetica, sans-serif">It's defined in ${RTEMS}/arm-rtems4.11/include/sys/time.h, but gcc won't see that.</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">If I force to use the RTEMS compiler, with something like:<br><br>make CC=arm-rtems4.11-gcc</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">then I'll get an error about another header. </font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><div><font face="monospace, monospace">../../../rtems-schedsim.master.git/schedsim/rtems/sched_cpu/sys/features.h:4:28: </font></div><div><font face="monospace, monospace">fatal error: bits/posix_opt.h: No such file or directory</font></div><div><font face="monospace, monospace"> #include <bits/posix_opt.h></font></div><div><font face="monospace, monospace"><br></font></div><div><font face="arial, helvetica, sans-serif">which doesn't exist under the rtems folder.</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">So how do I build this? I need to get a better understanding of the RTEMS scheduler and thought this would be a good way to do it. Thanks.</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div></div></div></blockquote><div><br></div><div>It is supposed to be built using the native gcc and produce executables that</div><div>can run natively on at least Linux.</div><div><br></div><div>But the scheduler simulator hasn't been kept in sync with the source code and</div><div>I wouldn't expect it to completely build unless that is addressed. There are</div><div>two areas to address:</div><div><br></div><div>+ list of RTEMS source tree files in the Makefile is out of date.</div><div>+ Some support methods may have changed.</div><div><br></div><div>But overall, the scheduler simulator was for experimenting with new scheduler</div><div>algorithms. If you want to know what RTEMS' schedulers do, it is best to</div><div>just ask questions and play.</div><div><br></div><div>--joel</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><font face="arial, helvetica, sans-serif"></font></div><div><font face="arial, helvetica, sans-serif">Matt</font></div><div style="font-family:arial,helvetica,sans-serif"><br></div><br></div></div>
<br>_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@rtems.org">users@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/users</a><br></blockquote></div><br></div></div>