I got rtems to work with the lm3s6965.<br><br>1 major problem I was having seems like it has been addressed by the most recent patch to rtems centos. I was getting error regarding libmpc.so.2, so I had to use alternative methods to installing mpc rather than using the method on the wiki page.<br>
The other problem, was tha I coudn't get the patches to work with the latest version of qemu (1.1). I had to use 1.0 instead.<br>For posterity, here is a pretty detailed list of instructions for setting up rtems for lm3s6965<br>



        
        
        
        <style type="text/css">
        <!--
                @page { margin: 0.79in }
                P { margin-bottom: 0.08in }
                A:link { so-language: zxx }
        -->
        </style>


<p style="margin-bottom:0in"><b>Creating Virtual Machine:</b></p>
<p style="margin-bottom:0in">   Download  and install virtualbox:
<a href="https://www.virtualbox.org/wiki/Downloads">https://www.virtualbox.org/wiki/Downloads</a></p>
<p style="margin-bottom:0in">   Go to Applications and open virtualbox</p>
<p style="margin-bottom:0in">   Download the .ova file (CentOS) here:
<a href="http://sourceforge.net/projects/rtems-vms/files/Centos-6.2-RTEMS-4.11-20120223/">http://sourceforge.net/projects/rtems-vms/files/Centos-6.2-RTEMS-4.11-20120223/</a></p>
<p style="margin-bottom:0in">   Go to file>import appliance and
choose the .ova file that you just downloaded</p>
<p style="margin-bottom:0in"><b>Guest Additions (OPTIONAL)</b></p>
<p style="margin-bottom:0in">   These steps will allow you to copy
stuff from your host machine and paste it to the guest virtual
machine. It enables other features as well, but I just wanted copy
paste abilities.</p>
<p style="margin-bottom:0in">   Double click on the centos icon in the
virtualbox manager to start the vm</p>
<p style="margin-bottom:0in">   When logging in login as root by
clicking other and entering:</p>
<p style="margin-bottom:0in">           username: root</p>
<p style="margin-bottom:0in">           password: Virtual0</p>
<p style="margin-bottom:0in">   </p>
<p style="margin-bottom:0in">   Go to device tab and click install
guest additions</p>
<p style="margin-bottom:0in">           click ok/run on the windows that
should appear.</p>
<p style="margin-bottom:0in">   If no windows appear, then open a
terminal, go to the additions disk in /media, and run:</p>
<p style="margin-bottom:0in">           sh VboxLinuxAdditions.sh</p>
<p style="margin-bottom:0in">   Restart the computer and login as root
again.</p>
<p style="margin-bottom:0in">   You should now be able to copy stuff
from the host and paste into the guest</p>
<p style="margin-bottom:0in"><br>
</p>
<p style="margin-bottom:0in"><b>Installing Rtems</b></p>
<p style="margin-bottom:0in">   While you're logged in as root (see
above section if you're not sure how to log in as root) open a
terminal.</p>
<p style="margin-bottom:0in">   Run the following commands:</p>
<p style="margin-bottom:0in">           rpm -Uvh
<a href="http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm" target="_blank">http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm</a></p>
<p style="margin-bottom:0in">           yum install mpc</p>
<p style="margin-bottom:0in;text-align:left">           <span style="font-family:arial,helvetica,sans-serif">wget
<a href="http://www.rtems.org/ftp/pub/rtems/SOURCES/4.11/gmp-4.3.2.tar.bz2">http://www.rtems.org/ftp/pub/rtems/SOURCES/4.11/gmp-4.3.2.tar.bz2</a></span></p>
<div style="text-align:left"><pre style="font-family:arial,helvetica,sans-serif">tar -xjf gmp-4.3.2.tar.bz2<br>mkdir b-gmp
cd b-gmp
../gmp-4.3.2/configure && make && make install
yum -y upgrade</pre></div><p style="margin-bottom:0in">
        log out of root and login as rtems</p>
<p style="margin-bottom:0in">           username: rtems</p>
<p style="margin-bottom:0in">           password: rtems123</p>
<p style="margin-bottom:0in">   open a terminal and run the
following:      </p>
<p style="margin-bottom:0in">           . ~/rtems-4.11-work/setenv</p>
<pre>             cd $r
                git pull
                ./bootstrap</pre><p style="margin-bottom:0in">
        Before you start working with rtems set your path using the command:</p>
<p style="margin-bottom:0in">           . ~/rtems-4.11-work/setenv</p>
<p style="margin-bottom:0in">   You know have the basic RTEMS up and
running.</p>
<p style="margin-bottom:0in"><br>
</p>
<p style="margin-bottom:0in"><br>
</p>
<p style="margin-bottom:0in"><br>
</p>
<p style="margin-bottom:0in"><br>
</p>
<p style="margin-bottom:0in"><br>
</p>
<p style="margin-bottom:0in"><b>Installing ARM toolchain:<br>       </b><span style="font-weight:normal">login
as root and run the following commands in a terminal:</span></p>
<p style="margin-bottom:0in"><span style="font-weight:normal">          rpm
-ivh
<a href="ftp://ftp.rtems.org/pub/rtems/linux/4.11/centos/6/i386/rtems-4.11-arm-rtemseabi4.11-binutils-2.22-4.el6.i386.rpm">ftp://ftp.rtems.org/pub/rtems/linux/4.11/centos/6/i386/rtems-4.11-arm-rtemseabi4.11-binutils-2.22-4.el6.i386.rpm</a></span></p>

<p style="margin-bottom:0in"><span style="font-weight:normal">          rpm
-ivh
<a href="ftp://ftp.rtems.org/pub/rtems/linux/4.11/centos/6/i386/rtems-4.11-arm-rtemseabi4.11-binutils-2.22-4.el6.i386.rpm">ftp://ftp.rtems.org/pub/rtems/linux/4.11/centos/6/i386/</a><a href="ftp://ftp.rtems.org/pub/rtems/linux/4.11/centos/6/i386/rtems-4.11-arm-rtemseabi4.11-newlib-1.20.0-10.el6.noarch.rpm">rtems-4.11-arm-rtemseabi4.11-newlib-1.20.0-10.el6.noarch.rpm</a></span></p>

<p style="margin-bottom:0in"><span style="font-weight:normal">          rpm
-ivh
<a href="ftp://ftp.rtems.org/pub/rtems/linux/4.11/centos/6/i386/rtems-4.11-arm-rtemseabi4.11-binutils-2.22-4.el6.i386.rpm">ftp://ftp.rtems.org/pub/rtems/linux/4.11/centos/6/i386/</a><a href="ftp://ftp.rtems.org/pub/rtems/linux/4.11/centos/6/i386/rtems-4.11-arm-rtemseabi4.11-gdb-7.4.1-1.el6.i386.rpm">rtems-4.11-arm-rtemseabi4.11-gdb-7.4.1-1.el6.i386.rpm</a></span></p>

<p style="margin-bottom:0in"><span style="font-weight:normal">          rpm
-ivh
<a href="ftp://ftp.rtems.org/pub/rtems/linux/4.11/centos/6/i386/rtems-4.11-arm-rtemseabi4.11-binutils-2.22-4.el6.i386.rpm">ftp://ftp.rtems.org/pub/rtems/linux/4.11/centos/6/i386/</a><a href="ftp://ftp.rtems.org/pub/rtems/linux/4.11/centos/6/i386/rtems-4.11-arm-rtemseabi4.11-gcc-libstdc++-4.7.1-3.el6.noarch.rpm">rtems-4.11-arm-rtemseabi4.11-gcc-libstdc++-4.7.1-3.el6.noarch.rpm</a></span></p>

<p style="margin-bottom:0in"><span style="font-weight:normal">          rpm
-ivh
<a href="ftp://ftp.rtems.org/pub/rtems/linux/4.11/centos/6/i386/rtems-4.11-arm-rtemseabi4.11-binutils-2.22-4.el6.i386.rpm">ftp://ftp.rtems.org/pub/rtems/linux/4.11/centos/6/i386/</a><a href="ftp://ftp.rtems.org/pub/rtems/linux/4.11/centos/6/i386/rtems-4.11-arm-rtemseabi4.11-gcc-libgcc-4.7.1-3.el6.noarch.rpm">rtems-4.11-arm-rtemseabi4.11-gcc-libgcc-4.7.1-3.el6.noarch.rpm</a></span></p>

<p style="margin-bottom:0in">           <span style="font-weight:normal">rpm
-ivh
<a href="ftp://ftp.rtems.org/pub/rtems/linux/4.11/centos/6/i386/rtems-4.11-arm-rtemseabi4.11-binutils-2.22-4.el6.i386.rpm">ftp://ftp.rtems.org/pub/rtems/linux/4.11/centos/6/i386/</a></span><a href="ftp://ftp.rtems.org/pub/rtems/linux/4.11/centos/6/i386/rtems-4.11-arm-rtemseabi4.11-gcc-4.7.1-3.el6.i386.rpm">rtems-4.11-arm-rtemseabi4.11-gcc-4.7.1-3.el6.i386.rpm</a></p>

<p style="margin-bottom:0in">           <span style="font-weight:normal">rpm
-ivh
<a href="ftp://ftp.rtems.org/pub/rtems/linux/4.11/centos/6/i386/rtems-4.11-arm-rtemseabi4.11-gcc-c++-4.7.1-3.el6.i386.rpm">ftp://ftp.rtems.org/pub/rtems/linux/4.11/centos/6/i386/</a></span><a href="ftp://ftp.rtems.org/pub/rtems/linux/4.11/centos/6/i386/rtems-4.11-arm-rtemseabi4.11-gcc-c++-4.7.1-3.el6.i386.rpm">rtems-4.11-arm-rtemseabi4.11-gcc-c++-4.7.1-3.el6.i386.rpm</a></p>

<p style="margin-bottom:0in"><br>
</p>
<p style="margin-bottom:0in"><b>Configure RTEMS for ARM/lm3s6965</b></p>
<p style="margin-bottom:0in"><b>  </b><span style="font-weight:normal">Open
a terminal and run:</span></p>
<p style="margin-bottom:0in"><b>          </b><span style="font-weight:normal">cd
/home/rtems/rtems-4.11-work</span></p>
<p style="margin-bottom:0in"><b>          </b>export
PATH=/opt/rtems-4.11/bin:$PATH</p>
<p style="margin-bottom:0in">           mkdir b-arm</p>
<p style="margin-bottom:0in">           cd b-arm</p>
<p style="margin-bottom:0in">           ../rtems/configure
--target=arm-rtemseabi4.11 --enable-rtemsbsp=lm3s6965
--enable-tests=samples --disable-posix</p>
<p style="margin-bottom:0in">           gmake all</p>
<p style="margin-bottom:0in"><br>
</p>
<p style="margin-bottom:0in"><b>Installing Qemu:</b></p>
<p style="margin-bottom:0in;font-weight:normal">        Go to this site:
<a href="http://wiki.qemu.org/Download">http://wiki.qemu.org/Download</a></p>
<p style="margin-bottom:0in;font-weight:normal">        and download
qemu-1.0.1.tar.gz (Don't download 1.1. It won't work )</p>
<p style="margin-bottom:0in;font-weight:normal">        By default the
qemu-1.0.1 will be installed in the tmp directory, so open a terminal
and do the following:</p>
<p style="margin-bottom:0in;font-weight:normal">                cd /tmp</p>
<p style="margin-bottom:0in;font-weight:normal">                tar -xzf
qemu-1.0.1.tar.gz</p>
<p style="margin-bottom:0in;font-weight:normal">                cd qemu-1.0.1</p>
<p style="margin-bottom:0in;font-weight:normal">        Now, install the
patches for the lm3s6965 with the following commands:</p>
<p style="margin-bottom:0in;font-weight:normal">                cat
/home/rtems/rtems-4.11-work/rtems/c/src/lib/libbsp/arm/lm3s69xx/0001-target-arm-Fixed-ARMv7-M-SHPR-access.patch
| patch -p1</p>
<p style="margin-bottom:0in;font-weight:normal">                cat
/home/rtems/rtems-4.11-work/rtems/c/src/lib/libbsp/arm/lm3s69xx/0002-target-arm-Disable-priority_mask-feature.patch
| patch -p1</p>
<p style="margin-bottom:0in;font-weight:normal">                cat
/home/rtems/rtems-4.11-work/rtems/c/src/lib/libbsp/arm/lm3s69xx/0003-target-arm-Evil-hack-for-BASEPRI-and-BASEPRI_MAX.patch
| patch -p1</p>
<p style="margin-bottom:0in;font-weight:normal">                cat
/home/rtems/rtems-4.11-work/rtems/c/src/lib/libbsp/arm/lm3s69xx/0004-target-arm-Evil-hack-to-increase-the-RAM-size.patch
| patch -p1</p>
<p style="margin-bottom:0in;font-weight:normal">        Now make qemu
with the following command.</p>
<p style="margin-bottom:0in;font-weight:normal">                ./configure &&
make && make install</p>
<p style="margin-bottom:0in;font-weight:normal">        Congratulations,
you should now be able to use the arm emulator and lm3s6965 board.</p>
<p style="margin-bottom:0in;font-weight:normal">        To test the
lm3s6965 run the following commands in a
terminal:<br>             /home/rtems/rtems-4.11-work/b-arm/arm-rtemseabi4.11/c/lm3s6965/testsuites/samples/hello</p>
<p style="margin-bottom:0in;font-weight:normal">                lm3s6965 -i
hello.exe</p>
<p style="margin-bottom:0in;font-weight:normal">NOTE: Don't worry
if you receive a hardware error. This is just a problem with rtems
working with qemu. You just want to see:</p>
<p style="margin-bottom:0in;font-weight:normal">*** HELLO WORLD
TEST ***</p>
<p style="margin-bottom:0in;font-weight:normal">Hello World</p>
<p style="margin-bottom:0in;font-weight:normal">*** END OF HELLO
WORLD TEST ***</p>

<br><br><br><br><br><div class="gmail_quote">On Tue, Jul 24, 2012 at 10:33 AM, Aric Hunter <span dir="ltr"><<a href="mailto:aricahunter@gmail.com" target="_blank">aricahunter@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This is part of the conversation that I had with the rtems user group.<br><br><div class="gmail_quote"><div class="im">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Gedare Bloom</b> <span dir="ltr"><<a href="mailto:gedare@rtems.org" target="_blank">gedare@rtems.org</a>></span><br>

Date: Fri, Jul 20, 2012 at 10:06 AM<br>Subject: Re: Virtualbox RTEMS Setup<br></div><div><div class="h5">To: Aric Hunter <<a href="mailto:aricahunter@gmail.com" target="_blank">aricahunter@gmail.com</a>><br>Cc: Steven Grunza <<a href="mailto:sgrunza@ctdi.com" target="_blank">sgrunza@ctdi.com</a>>, <a href="mailto:rtems-users@rtems.org" target="_blank">rtems-users@rtems.org</a><br>

<br><br>A little more background. RTEMS is cross-compiled, meaning that you<br>
compile RTEMS for a particular target hardware (e.g. x86 or arm) using<br>
your host tools. So you need a toolchain for the target that you want<br>
to execute RTEMS on, and you compile RTEMS for that target and<br>
whichever board support package (BSP) will run. You "install" RTEMS on<br>
the host so that the pre-built RTEMS and BSP are available and then<br>
you will be able to compile applications/examples against the<br>
installed RTEMS. Then you can download and execute your cross-compiled<br>
application on the board (or simulator) supported by that BSP.<br>
<br>
So to execute an RTEMS application on a given piece of hardware you need:<br>
* toolchain for the target architecture (e.g. ARM)<br>
* RTEMS configured, compiled, and installed for the architecture and BSP<br>
* application compiled against the installed RTEMS<br>
* a way to download and execute the application on your target<br>
<br>
I think that covers the generalities. More specifics are available in<br>
the manuals and on the wiki, or you can ask questions here as you run<br>
into issues...<br>
</div></div><div><div><div><div class="h5"><br>
On Fri, Jul 20, 2012 at 12:56 PM, Gedare Bloom <<a href="mailto:gedare@rtems.org" target="_blank">gedare@rtems.org</a>> wrote:<br>
> maybe this will help: <a href="http://www.rtems.com/wiki/index.php/GSoC_Getting_Started" target="_blank">http://www.rtems.com/wiki/index.php/GSoC_Getting_Started</a><br>
><br>
> that kind of gives an idea about how to build and "install" RTEMS;<br>
> you'll want to substitute arm for sparc, and the ARM's BSP for sis..<br>
><br>
> Or read the manuals about building rtems:<br>
> <a href="http://rtems.org/onlinedocs/doc-current/share/rtems/html/started/started.html" target="_blank">http://rtems.org/onlinedocs/doc-current/share/rtems/html/started/started.html</a><br>
><br>
>><br>
>><br></div></div><div><div class="h5">
>> On Fri, Jul 20, 2012 at 6:31 AM, Steven Grunza <<a href="mailto:sgrunza@ctdi.com" target="_blank">sgrunza@ctdi.com</a>> wrote:<br>
>>><br>
>>> See replies in-line<br>
>>><br>
>>> > -----Original Message-----<br>
>>> > From: Aric Hunter [mailto:<a href="mailto:aricahunter@gmail.com" target="_blank">aricahunter@gmail.com</a>]<br>
>>> > Sent: Thursday, July 19, 2012 6:28 PM<br>
>>> > To: Steven Grunza<br>
>>> > Cc: <a href="mailto:rtems-users@rtems.org" target="_blank">rtems-users@rtems.org</a><br>
>>> > Subject: Re: Virtualbox RTEMS Setup<br>
>>> ><br>
>>> > does the configure file run those patches (I've never used a patch<br>
>>> > file)?<br>
>>><br>
>>> No.  It's a manual operation.  Typically I use a command sequence such<br>
>>> as the following:<br>
>>><br>
>>> {Acquire the correct version source files}<br>
>>><br>
>>> git clone git://<a href="http://git.qemu.org/qemu.git" target="_blank">git.qemu.org/qemu.git</a> qemu.git<br>
>>><br>
>>> cd qemu.git<br>
>>><br>
>>> cat 0001-target-arm-Fixed-ARMv7-M-SHPR-access.patch | patch -p1<br>
>>><br>
>>><br>
>>> The problem is getting the correct version source files.  The qemu<br>
>>> project was at version 1.0.50 when the patches were created.  I was able<br>
>>> to use version 1.0.90.  QEMU now appears to be at version 1.1.50 and the<br>
>>> patches do not apply properly.  Perhaps they are no longer needed?<br>
>>><br>
>>><br>
>>><br>
>>> > and what example did you use? I don't see any test files<br>
>>> > (hello.exe) in the b-lm3s6965 branch.<br>
>>> ><br>
>>> ><br>
>>><br>
>>> I used the example applications for RTEMS.  These are sample<br>
>>> applications that (as far as I know) work with any version of RTEMS.  I<br>
>>> got them by doing the following:<br>
>>><br>
>>><br>
>>><br>
>>> git clone git://<a href="http://git.rtems.org/examples-v2.git" target="_blank">git.rtems.org/examples-v2.git</a> examples-v2.git<br>
>>><br>
>>> cd examples-v2.git/hello/hello_world_c<br>
>>><br>
>>> export RTEMS_MAKEFILE_PATH=/opt/rtems-4.11/arm-rtemseabi4.11/lm3s6965<br>
>>><br>
>>> make<br>
>>><br>
>>> cd o-optimize<br>
>>><br>
>>> grunzasr@stm32dbg% which qemu-system-arm<br>
>>> /usr/local/bin/qemu-system-arm<br>
>>><br>
>>> grunzasr@stm32dbg% /usr/local/bin/qemu\-system\-arm --version<br>
>>> QEMU emulator version 1.0.90, Copyright (c) 2003-2008 Fabrice Bellard<br>
>>><br>
>>> {Note: This is the patched version of qemu}<br>
>>><br>
>>><br>
>>> grunzasr@stm32dbg% qemu-system-arm -nographic -M lm3s6965evb -kernel<br>
>>> hello.ralf<br>
>>><br>
>>><br>
>>> *** HELLO WORLD TEST ***<br>
>>> Hello World<br>
>>> *** END OF HELLO WORLD TEST ***<br>
>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> rtems-users mailing list<br>
>> <a href="mailto:rtems-users@rtems.org" target="_blank">rtems-users@rtems.org</a><br>
>> <a href="http://www.rtems.org/mailman/listinfo/rtems-users" target="_blank">http://www.rtems.org/mailman/listinfo/rtems-users</a><br>
>><br>
</div></div></div></div></div><br>
</blockquote></div><br>