MRS使用

RISC-V IDE MounRiver Studio软件介绍(RISCV IDE)(二)-CSDN博客

1.使用数学库

   首先我们在目标工程代码合适位置添加#include "math.h",然后点击工具栏工程属性配置按钮,打开工程属性页,在C/C++ Build->Settings->Tool Settings->GNU RISC-V Cross C Linker->Libraries 右侧窗口中增加m参数

2.开启浮点数

在C/C++ Build->Settings->Tool Settings->Target Processor,Floating point 选择Single precision externsion,Floating point ABI 选择single precision

3.查看ram与rom使用情况:

C/C++ Build->Settings->Tool Settings->GNU RISC-V Cross C Linker->Miscellaneous->Linker flags中添加--print-memory-usage

4.添加.o文件保护.c

C/C++ Build->Settings->Tool Settings->GNU RISC-V Cross C Linker->Miscellaneous->Miscellaneous->Other objects->关联.o文件即可。

我一般先将.c文件移除,再从obj中拷贝相应的.o文件添加到项目栏中方便查看。

5.输出bin文件

C/C++ Build->Settings->Tool Settings->GNU RISC-V Cross Create Flash Image->General->Output file format中选择Intel HEX则输出hex文件,选择Raw binary则输出bin文件或者两者都输出。

6.仿真时不显示数组,右击变量->选择Display As Array...

7.查看内存地址,window->show view memory

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值