[an error occurred while processing this directive]
You really want to use some good tools to help you navigate, run and debug a big system like OS/161. You are welcome to use any tools you like, but I guarantee that spending a few hours to learn your way around a tool like Eclipse is worth your time.
A good development environment has at least the following features:
Eclipse has all of these features. It is a bit tricky to set up, and it is not fast, but it will save you time and let you spend your thinking time on the actual problems.
The following instructions should work on Linux and on Mac OS X. I have not tested any of this on Microsoft Windows or Cygwin.
You need the following packages. The version numbers correspond to the packages used to prepare this document -- but you should use the most recent stable releases.
Open the "SVN Repository Exploring" perspective. By right-clicking in the
"SVN Repository" window, you can add a new repository. The URL is
https://cslinux.utm.utoronto.ca/svn/csc369h/your-group-id.
You will be asked for your password and then you will see the URL in the SVN
Repository view. Click on the triangle to open the folder, and select the src
folder. By right-clicking on the folder you can checkout the repository.
Select "Checkout as a project configured using the New Project Wizard", and
click on "Finish".
In the wizard, create a C Project, call it 369-A1 (or something similarly useful), and make it a Makefile project with the Other Toolchain. (It will take a while to check out the code.)
In a terminal window (Unix shell), cd into your Eclipse workspace directory and into the 369-A1 project. Configure the system once as described here so that the appropriate make files are available.
Project Properties
/kern/compile/ASST1 to the end of the string that is there.(screenshot)cs161-gcc.In the right pane of the C/C++ perspective are two tabs: Outline and Make.
Select the Make tab and open folders to get to
kern/compile/ASST1 (or whichever assignment you wish to compile). Right-click on ASST1 to add Make targets. Add
targets for "all", "clean", "depend", and "install". You can make the target
name the same as the Make Target. (And yes, it is a pain to have to create
these, but you should only have to do it once.)
Tip: The icon in the upper right corner of the Make window will hide all the folders you don't care about, for a tidier view.
If everything has gone well, you should be able to double click on depend target and then the all target and the kernel will compile. Check the Console tab at the bottom to see the compilation output.
If you get an error that it can't find cs161-gcc then the
Environment variable PATH is not set correctly (or you haven't compiled the
cs161-gcc compiler).
Finally, double click on the "install" target to install the kernel in the right location
If you just want to run OS/161, switch to a shell window, and cd to
~/csc369/root (or whatever your OSTREE directory is) and run
sys161 kernel. You should see some output go by and then a menu
prompt. This means that everything is working.
To use the debugger from within Eclipse, you first need to run System/161 in a
shell window as sys161 -p 30002 -w kernel. The -w
tells the simulator to break and wait for a debugger connection. The -p
30002 tells it that the debugger connection will be on a tcp connection
on port 30002 (you can use whichever port you want.)
Now in Eclipse, go to "Open Debug Dialog". Create a new configuration. Following are screenshots of the 3 screens where I had to change things. You will need to know the path on your own machine.
[an error occurred while processing this directive]