See Danny Pratama’s step-by-step tutorial for running SPIKE Simulator with Proxy Kernel. This tutorial assumes you already have compiler for RISC-V.
For setting up compiler environment (RISC-V GCC Toolchain), please watch the other videos: RISCV: GCC Toolchain & SiFive Prebuilt Toolchain.
For more advanced debugging, he has covered the Spike Debugging with OpenOCD and GDB.
Visit Danny Pratama’s blog for the full series: http://derrylab.com