|
Cebollita Setup & DownloadsLast modified: January 17, 2006 |
|
|
CSE Home
|
About Us
|
Search
|
Contact Info
|
The following is definitely not an idiot-proof installation. It assumes the user is willing to do a bit of fiddling to get everything working right.
- The system requires JDK1.4 or better. If it's not installed, you'll need to download and install it. It might work with older versions, but we make no guarantees.
- Create a directory (call it "cebollita"). This directory will hold the installation.
- Download the latest Cebollita distribution from the following location: Download. Distributions are named
cebollita-full.[major number]-[minor number].[date].jar.
Put it into the above directory.
NOTE: If the minor version number is odd, then you will be downloading the latest, experimental version of the software. If you want a stable version, go for something with the same major version but the highest even-numbered minor number.
- Unpack the jar file you just downloaded. Something like:
jar xf cebollita-full.xxxxx.jarshould do the trick. (Note: If you're comfortable with jar's, or don't want access to the Cebollita source or the makefiles used to build the example programs, you can get away without unpacking the jar file. You'll have to modify yourCLASSPATHsetting from what is shown for this to work, though.)
- You need to add the root directory of the unpacked files ("cebollita") to your CLASSPATH environment variable, as well as the
jlex.jarandcup.jarfiles you'll find in that directory. Some information on how to do that is at the end of this page.
- If you're using Cygwin, you need to set environment variable CYGWIN to
tty. This must be done before Cygwin's launch sequence starts, meaning you must do it by setting the environment variable through Windows. The "(Raw)Windows" discussion at the bottom of this page tells you about setting environment variables in Windows. Follow those, but make the environment variable name CYGWIN and its value the stringtty.
- I find it convenient to set up some aliases to invoke the primary Cebollita tools. (That way, I don't have to remember what packages they're in.) You can do that by adding the aliases to the profile file for your shell, e.g., in file
~/.bash_profile. Here are the ones I use:alias cebcc="java comp.parser" alias cebasm="java asm.parser" alias ceblink="java asm.Linker" alias cebsim="java dbg.UI" alias cebdumpe="java util.Exe" alias cebdumpm="java asm.Module"You have to kill your current shells and start new ones after making this change for it to have effect.
- Navigate to directory
cebollita/apps/myPrograms.
- Say
make for-os. That establishes your build target.
- Say
make cTest. That will compile and linkcTest.c
- Assuming you've set up the aliases above, say
cebsim cTest.exe. The graphical debugger appears.
- Hit the run button. "Test succeeded" is printed.
The easiest thing to do is to put your program files (both C--.cand assembly language.sfiles) in directorycebollita/apps/myPrograms. If you do that, aMakefilestructure already in place will make life easier dealing with the variety of configurations for which your code can be compiled (e.g., targeted to the Cebollita software simulator or to a SMOK implementation of the Cebollita architecture).To do this, edit your file in the
myProgramsdirectory. Let's assume your file is namedmyTest.c. Edit theMakefilethere to append the basename of your file (myTestin this example) to the line indicated by the comments in theMakefile. Having done that, you:
- Establish the build target using something like
make for-os. You do this once. (Further details are elsewhere in this documentation.)- Now you can compile/assemble and link your application with the command
make myTest.- Assuming you've set up the aliases above, you can run it with:
cebsim test.exe
Setting environment variables differs from system to system, but here's a basic guide.
- UNIX
- Easiest is to set them in your shell RC file. If you use BASH, adding these lines to your .bashrc will do the trick (assuming Cebollita was installed to /usr/local/ceb):
export CLASSPATH="/usr/local/ceb:/usr/local/ceb/jlex.jar:/usr/local/ceb/cup.jar:$CLASSPATH"
- CYGWIN on Windows
- Easiest is to set them in your shell profile file. If you use BASH, adding these lines to your .bash_profile will do the trick (assuming Cebollita was installed to C:\cebollita):
export CLASSPATH="C:\cebollita;C:\cebollita\jlex.jar;C:\cebollita\cup.jar;$CLASSPATH"- (Raw) Windows
- Easiest is to set them in the System Properties Control Panel (under "Advanced"). Under "Environment Variables" either edit or create a new variable called CLASSPATH. Assuming you've installed everything in
C:\cebollita, you'd add this to CLASSPATH:C:\cebollita;C:\cebollita\cup.jar;C:\cebollita\jlex.jar.
- Mac
- I have no idea, but I guess it can be made to work in OS X.
There are a bunch of test C-- and assembly programs in a directory called
apps/tests, plus a single, larger example inapps/quicksort. The OS and runtime libraries are also in apps/. Makefiles are provided to build the various components and test applications.
|
Department of Computer Science & Engineering University of Washington Box 352350 Seattle, WA 98195-2350 (206) 543-1695 voice, (206) 543-2969 FAX [comments to zahorjan@cs.washington.edu] | |