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