Setup

配置环境

根据架构下载相应loongarch32r-linux-gnusf-${TOOLCHAINS_DATE}.tar.gz,并解压。解压后将loongarch32r-linux-gnusf-${TOOLCHAINS_DATE}/bin/目录添加到path中。 linux下建议打开

https://gitee.com/loongson-edu/la32r-toolchains/releases/download/v0.0.2/loongarch32r-linux-gnusf-2022-05-20-loongarch64.tar.gz

https://gitee.com/loongson-edu/la32r-toolchains/releases/download/v0.0.2/loongarch32r-linux-gnusf-2022-05-20-x86.tar.gz

GCC交叉编译器

tar -xvf loongarch32r-linux-gnusf-2022-05-20-loongarch64.tar.gz
tar -xvf loongarch32r-linux-gnusf-2022-05-20-x86.tar.gz

image.png

image.png

image.png

image.png

wjw@wjw-pc:~/longxin/chiplab$ sudo apt install libcapstone4

Setting up Scala

If we are using a proxy with WSL, might have to configure Scala’s proxy as well:

scala-cli . --verbose --jvm-index <https://github.com/coursier/jvm-index/blob/master/index.json>
scala-cli --power config httpProxy.address <MY_PROXY>

Like so:

scala-cli --power config httpProxy.address <http://localhost:7890>

Missing Library(s)

/usr/share/verilator/include/gtkwave/fstapi.h:36:10: fatal error: zlib.h: No such file or directory
   36 | #include <zlib.h>