美文网首页
How to compile freedom-e-sdk tes

How to compile freedom-e-sdk tes

作者: 凌空_lingkong | 来源:发表于2020-02-20 12:51 被阅读0次

目前我们的test envrionment是基于freedom-e-sdk的. 详细的文档可以参考官方文档Documentation for Freedom E SDK

为了便于方便快捷的设置好并方便地使用test environment, 可以使用我写的python script:
/users/e0001861/proj/compile-freedom-e-sdk.py,

1. 只需进行简单的设置

编辑/users/e0001861/proj/setup-toolchain.sh, 改为您自己的freedom-e-sdk路径

setenv RISCV_PATH /users/e0001861/proj/xxx_***_release

2. 设置环境变量 source /users/e0001861/proj/setup-toolchain.sh

3 使用例子

  • python compile_freedom-e-sdk.py #编译hello,目标design-rtl
  • python compile_freedom-e-sdk.py -c clean #clean hello的编译结果
  • python compile_freedom-e-sdk.py -p return-pass 编译return-pass,目标design-rtl
  • python compile_freedom-e-sdk.py -p return-pass -c clean #clean hello的编译结果

4. 通过它可以方便的指定不同的参数来满足你的测试需求:

python compile_freedom-e-sdk.py [-h] [-p PROGRAM] [-t TARGET] [-c CMD] [--conf CONF]
可选参数:
-h, --help 显示帮助信息
-p PROGRAM 指定要compile的test, 默认值是hello
-t TARGET 指定target, 默认是design-rtl
-c CMD 指定command, 默认是software
--conf CONF 指定配置release/debug, 默认是debug

5. 编译结果,轻松查看

直接产生elf对应的bin,混合汇编便于调试使用


编译结果,轻松查看

欢迎各种反馈,请留言

相关文章

网友评论

      本文标题:How to compile freedom-e-sdk tes

      本文链接:https://www.haomeiwen.com/subject/ywztqhtx.html