我们现在使用TMS320F2812,外扩两片8位512k的存储器,组成512k 16位的外部存储器,使用ZONE2存储空间,
PAGE 0:
EXROM: origin = 0x080000, length = 0x040000
PAGE 1:
EXRAM: origin = 0x0C0000, length = 0x040000
现在问题是如果吧.text段分配到EXROM,LOAD程序的时候就出错,错误见附件。
但是如果是把大数组分配到EXRAM,则可以正常读写。
请问这个问题怎么解决?
Jones Chen:
.text段里面存的是代码,就是Code。其中有一部分code是用来初始化外部的extern memory的。
所以那部分代码需要放到内部的Ram中,当配置好外部的external memory之后,才能使用。
因此您把数据区放到external memory是可以的。大数组存在.ebss里面,而code存在.text里面。
我们现在使用TMS320F2812,外扩两片8位512k的存储器,组成512k 16位的外部存储器,使用ZONE2存储空间,
PAGE 0:
EXROM: origin = 0x080000, length = 0x040000
PAGE 1:
EXRAM: origin = 0x0C0000, length = 0x040000
现在问题是如果吧.text段分配到EXROM,LOAD程序的时候就出错,错误见附件。
但是如果是把大数组分配到EXRAM,则可以正常读写。
请问这个问题怎么解决?
lin li5:
回复 Jones Chen:
谢谢你的回答。我把.text段分配到了RAMH0,可以运行。
但是我的目的是想把程序代码分配到外部RAM中去,例如我现在试了,
#pragma CODE_SECTION(func,"dlFile")
void func(void);
在CMD文件中
PAGE 0:
EXROM : origin = 0x080000, length = 0x040000
dlFile : > EXROM, PAGE = 0
load程序的时候还是LOAD不进去,错误如下:请问这是什么问题啊?
Trouble Setting Breakpoint with the Action "Terminate Program Execution" at 0x1005ac: Error 0x0000000A/-1153 Error during: Memory, Break Point, The memory at 0x001005AC continually indicated it was 'not ready' All memory operations currently in progress were aborted in order to regain control of the processor. This is considered a catastrophic event, but the debugger should still be able to access memory and CPU registers. System state has been altered. It is strongly advised that the processor should be reset before resuming execution, Sequence ID: 7 Error Code: -1153 Error Class: 0x0000000A
Trouble Removing Breakpoint with the Action "Terminate Program Execution" at 0x1005ac: Error 0x00000008/-2044 Error during: Break Point, No breakpoint at 0x001005AC Sequence ID: 8 Error Code: -2044 Error Class: 0x00000008
Trouble Writing Memory Block at 0x100000 on Page 0 of Length 0x76f: Error 0x00000002/-1153 Error during: Memory, The memory at 0x00100002 continually indicated it was 'not ready' All memory operations currently in progress were aborted in order to regain control of the processor. This is considered a catastrophic event, but the debugger should still be able to access memory and CPU registers. System state has been altered. It is strongly advised that the processor should be reset before resuming execution, Sequence ID: 66 Error Code: -1153 Error Class: 0x00000002
Trouble Writing Memory Block at 0x100000 on Page 0 of Length 0x1d: Error 0x00000002/-1153 Error during: Memory, The memory at 0x00100002 continually indicated it was 'not ready' All memory operations currently in progress were aborted in order to regain control of the processor. This is considered a catastrophic event, but the debugger should still be able to access memory and CPU registers. System state has been altered. It is strongly advised that the processor should be reset before resuming execution, Sequence ID: 66 Error Code: -1153 Error Class: 0x00000002
Trouble Writing Memory Block at 0x108400 on Page 1 of Length 0x100: Error 0x00000002/-1153 Error during: Memory, The memory at 0x00108402 continually indicated it was 'not ready' All memory operations currently in progress were aborted in order to regain control of the processor. This is considered a catastrophic event, but the debugger should still be able to access memory and CPU registers. System state has been altered. It is strongly advised that the processor should be reset before resuming execution, Sequence ID: 66 Error Code: -1153 Error Class: 0x00000002
Trouble Writing Memory Block at 0x100000 on Page 0 of Length 0x3: Error 0x00000002/-2140 Error during: Memory, Cannot access memory address at 0x00000800 Sequence ID: 66 Error Code: -2140 Error Class: 0x00000002
Trouble Writing Memory Block at 0x100000 on Page 0 of Length 0x3: Error 0x00000002/-1153 Error during: Memory, The memory at 0x00100003 continually indicated it was 'not ready' All memory operations currently in progress were aborted in order to regain control of the processor. This is considered a catastrophic event, but the debugger should still be able to access memory and CPU registers. System state has been altered. It is strongly advised that the processor should be reset before resuming execution, Sequence ID: 66 Error Code: -1153 Error Class: 0x00000002
Trouble Writing Memory Block at 0xc0400 on Page 1 of Length 0x100: Error 0x00000002/-1153 Error during: Memory, The memory at 0x000C0402 continually indicated it was 'not ready' All memory operations currently in progress were aborted in order to regain control of the processor. This is considered a catastrophic event, but the debugger should still be able to access memory and CPU registers. System state has been altered. It is strongly advised that the processor should be reset before resuming execution, Sequence ID: 66 Error Code: -1153 Error Class: 0x00000002
Trouble Writing Memory Block at 0x80000 on Page 0 of Length 0x4: Error 0x00000002/-1153 Error during: Memory, The memory at 0x00080004 continually indicated it was 'not ready' All memory operations currently in progress were aborted in order to regain control of the processor. This is considered a catastrophic event, but the debugger should still be able to access memory and CPU registers. System state has been altered. It is strongly advised that the processor should be reset before resuming execution, Sequence ID: 66 Error Code: -1153 Error Class: 0x00000002
我们现在使用TMS320F2812,外扩两片8位512k的存储器,组成512k 16位的外部存储器,使用ZONE2存储空间,
PAGE 0:
EXROM: origin = 0x080000, length = 0x040000
PAGE 1:
EXRAM: origin = 0x0C0000, length = 0x040000
现在问题是如果吧.text段分配到EXROM,LOAD程序的时候就出错,错误见附件。
但是如果是把大数组分配到EXRAM,则可以正常读写。
请问这个问题怎么解决?
Jones Chen:
回复 lin li5:
建议将.text段放到RAMH0中,将代码放到内部RAM是最佳的选择,将数据放到外部RAM。
原因我上面的回答已经讲了。
至于将某个函数放到其他的空间,可以参考InitFlash这个函数的用法,在TI的Flash历程里面有。