1. 安裝RISC-V 仿真環境 --QEMU
安裝包下載地址: https://www.qemu.org/
安裝命令及安裝成功效果如下所示,
target-list 設定爲riscv32-softmmu,
$ cat ~/project/qemu-8.0.4/install.sh
sudo apt-get install libglib2.0-dev
sudo apt-get install libpixman-1-dev
./configure --target-list=riscv32-softmmu
make -j24
sudo make install -j24
$ qemu-system-riscv32 -h
QEMU emulator version 8.0.4
Copyright (c) 2003-2022 Fabrice Bellard and the QEMU Project developers
usage: qemu-system-riscv32 [options] [disk_image]
2. 安裝RISC-V 編譯器, (過程略)
如下cmd 可檢查是否安裝成功並顯示版本號 12.2.0
$ /opt/riscv/bin/riscv64-unknown-elf-gcc --version
riscv64-unknown-elf-gcc (g2ee5e430018) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE