You should have Debian 12 or Ubuntu 22.04 (or more recent).
Start by doing a system update:
sudo apt update
sudo apt upgrade
Then install the tools we will need using the command line:
sudo apt install binutils-riscv64-linux-gnu build-essential curl gdb-multiarch git icdiff make micro python3 qemu-user-binfmt
If that succeeds then it means your Linux installation is working and up-to-date.
To install CodeGrinder, click on a CodeGrinder assignment in Canvas and follow the instructions:
grind
on Linux (64-bit x86)”grind
to confirm that it is installed. It should give you
help for the grind tool.You should now be ready to download an assignment. From the command line:
grind list
to see your assignments. Each has an ID
number.grind get <id>
with that ID number to download an
assignment. It will tell you the directory where the files are
placed.Go into that directory using the cd
command. To get into the
directory of assignments for this course:
cd ~/CS-2810
ls
Change into the project directory from there:
cd rv64-hello-world
or whatever the project directory is named.
Problem instructions are in the doc
directory and there is
normally a .s
file that you need to edit, e.g., hw.s
. When you
are ready to test your solution:
make
Note that you can run this from the vscode shell or a command-line window.
When everything works and you are ready to submit for grading:
grind grade
To edit a file from within the current directory, type the name of the editor followed by the name of the file:
micro hw.s
micro
is a simple terminal editor that is good for basic tasks.
Editors like micro (and more sophisticated editors like vim and emacs) work in the terminal text window without requiring a separate graphical window. This is useful when working on remote servers or other environments where a text window may be all that is available.
If you are using vscode, you can run it on your native OS and have
it ssh
into Linux (on WSL or a Mac OS VM) and shuffle files back
and forth for you. It looks and feels like you are working on the
local OS, but the files that you see and edit through vscode are all
from the Linux environment. Here are instructions for getting
started setting this up:
Best of luck! Let me know if these instructions need further fixes.