首页 | 新闻 | 新品 | 文库 | 方案 | 视频 | 下载 | 商城 | 开发板 | 数据中心 | 座谈新版 | 培训 | 工具 | 博客 | 论坛 | 百科 | GEC | 活动 | 主题月 | 电子展
返回列表 回复 发帖

问个问题,NIOSII中把程序从FLASH调到SRAM中的不愉快!!!!

问个问题,NIOSII中把程序从FLASH调到SRAM中的不愉快!!!!

问题1:


我的SRAM中是存变量的。现在要把程序调入其中运行,我怎么防止程序很变量位置的问题?


问题2:


还有就是System Library Properties属性中program .text这个是什么意思?为什么系统默认把它设置为on-chip memory呢?
其他的.rodata、.text和rwdata等默认也是设置为on-chip memory,我测试过,把.text后面的on-chip-memory设置为sram-0程序反而不运行,不知道为什么? 请问这些设置究竟是什么意思,我看了斑竹的”NIOS II Step by Step raw uart program“里面全部设置为SDRAM了(当然我这里没有SDRAM就用SRAM),如果我全部设置到SRAM,系统也不运行,只有设置到on-chip memory才运行,为什么?

hao
第一个问题,这个由nios自身处理,可以不用管,一般的处理器都能处理这种问题。
第二个问题,program使代码的运行空间,肯定可以放在sram中的,你看看你是不是有什么其他方面的问题,这些东西都放在sram中没有问题。
在交流中前进,共同实现nios的应用。
谢谢!KZW!
NIOSII IDE中我,没有找到其他还可以设置的东西。在SOPC中我设置为复位地址为ex-flash,异常地址ex-sram不知道会不会影响到这里呢?
hao
如果只设置*.rodata到SRAM中会是影响什么呢?
hao
在SOPC中我设置为复位地址为ex-flash,异常地址ex-sram不会影响的。
*.rodata值得是只度的空间,也就是代码存放的空间啊。
在交流中前进,共同实现nios的应用。
谢谢!
那.text也是代码空间,那究竟哪个才是真正的CODE空间呢?
hao
Simple Placement Options
The reset handler code is always placed in the .reset partition. The
exception handler code is always the first code within the section that
contains the exception address. By default, the remaining code and data
are then divided into the following three output sections:
■ .text—all remaining code
■ .rodata—the read only data
■ .rwdata—read and write data, including zero initialized data
You can control the placement of .text, .rodata, .rwdata, and all
other memory partitions as a system library property in the Nios II IDE.
在交流中前进,共同实现nios的应用。
你看看文档.
在交流中前进,共同实现nios的应用。
谢谢!
我也看到这个说明,结果是.text是放程序的.rodata不是放程序的,因为“the read only data”可以是是一些常数。
hao
不过,我很感谢你的帮助!
hao
在硬的嵌入式系统中,一般只有rodata和rwdata这两个,其实text应该是这两个的和。在ads下就是这个样子的,所以,在嵌入式系统rodata就是指的固定不变的代码部分,而rwdata值得是变量部分。在nios中同时出现。
在交流中前进,共同实现nios的应用。
返回列表