I had some problems getting the Algol CPU tests compiled and run:
The compiler I built didn't recognize the "-m32" flag specified in the makefile.
The "riscv_test.h" header file was missing.
The tests would stall because a memory leak consumed all the RAM after 25% of the tests were run.
I solved these problems by:
Installing an earlier version of the compiler.
Grabbing some files from a development branch and adding them into the master branch of my Algol repo.
Increasing the RAM size of my VM. (This doesn't fix the root cause, but avoids memory exhaustion before the end of the tests.)
With these changes, I decided to record a complete set of the steps to get to this point in case I need to do it again.
First, create the VM and start it up:
vagrant init ubuntu/xenial64
Edit the Vagrantfile to increase the RAM size:
config.vm.provider "virtualbox"do |vb|
# Customize the amount of memory on the VM:
vb.memory = "4096"
On the VM, install an earlier version of the RISC-V compiler that was originally used to test this CPU:
Unfortunately, the build.sh failed. I tried some other linux distros (ubuntu/trusty64, debian/jessie64) without success: the toolchain failed to build for a variety of reasons. Finally, I edited the build.sh file to remove the build of the riscv-openocd tool. (I figured I wouldn't need the on-chip debugger right now.) After that, the build was successful.