- Get yourself a copy of Qt Creator and SDK from Nokia.
- Download the SPIM source code. Probably the easiest thing is to install subversion and check the code out:
svn co https://spimsimulator.svn.sourceforge.net/svnroot/spimsimulator spimsimulator
This creates a directory namedspimsimulator. You can also download the tarball at that site and unpack it. - In QtCreator open the project by opening the file
spimsimulator/QtSpim/QtSpim.pro - Build a release version of the project in Qt Creator (self explanatory)
- The executable is sitting in
QtSpim-build-desktop/QtSpim. QtSpimuses two shared libraries from the Qt SDK. These arelibQtGui.so.4andlibQtCore.so.4. Be careful, both of these are probably just links to the real shared objects sitting in the same directory.-
In my case I needed to distribute the executable and the two shared libraries to a lab so I copied them to
a global place (in my case
/usr/localon each machine). I also wrote a simple script to setLD_LIBRARY_PATHto pick up the correct Qt libraries and execute the QtSpim executable. The other option is have users manually setLD_LIBRARY_PATHin their.bashrc.
Thursday, December 29, 2011
Building QtSpim
I use QtSpim, a MIPS simulator for the Computer Organization and Architecture class I teach. Jim Larus at Microsoft Research originally devloped SPIM at the University of Wisconsin and graciously maintains it, and has recently ported it to use Qt. The 64-bit debian package uses a newer version of Qt than I have installed in my labs (Ubuntu 10.04, which is the most recent LTS as of this writing). Rebuilding QtSpim in QtCreator and distributing the Qt shared libraries along with the executable fixes things.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment