在windows环境下安装riscv 工具链
01
下载 riscv-toolchain.exe
并安装
02
配置环境变量
在系统搜索栏输入“查看高级系统设置” ,环境变量->系统环境变量->path ,把上面 toolchain 的安装目录下的 bin 目录添加到 PATH
例如
C:\Program Files (x86)\RV32IMC\bin
03
在任意 terminal(推荐使用 git) 中测试 toolchain
输入如下命令打印版本号
riscv32-unknown-elf-ld -v
输出
yang@DESKTOP-3E9KST5 MINGW64 ~/Desktop/work_space/firmware-flash_2
$ riscv32-unknown-elf-ld -v
GNU ld (GNU Binutils) 2.27
输入
riscv32-unknown-elf-objdump -v
输出
yang@DESKTOP-3E9KST5 MINGW64 ~/Desktop/work_space/firmware-flash_2
$ riscv32-unknown-elf-objdump -v
GNU objdump (GNU Binutils) 2.27
Copyright (C) 2016 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.
yang@DESKTOP-3E9KST5 MINGW64 ~/Desktop/work_space/firmware-flash_2
$