用dsp2812进行在线仿真,因为用的是模糊控制算法生成的代码段过大,主要是.ebss段,和.text段太长,吧.ebss放到FLASH可以行得通,但是.text却不能放到FLASH中,对RAM的内存进行配置还是放不下这么大的.text段,请问大神们有没有更好的方法,可以解决这个问题,或者有什么方法把.text放到FLASH中,(注意我是采用ram在线调试的)
cmd文件
MEMORY
{
PAGE 0:
OTP: origin=0x3d7800, length=0x800
BEGINRAM: origin=0x3f8000, length=0x2
BEGINFLASH: origin=0x3f7ff6, length=0x2
CSM_PWL: origin=0x3f7ff8, length=0x8
RAMH0: origin=0x3f8002, length=0x1ffe
BOOTROM: origin=0x3ff000, length=0xfc0
RESET: origin=0x3fffc0, length=0x2
VECTORS: origin=0x3fffc2, length=0x3e
FLASH: origin=0x3d8000, length=0x1fff6
ZONE6P: origin=0x100000, length=0x8000
PAGE 1:
RAMM0M1: origin=0x0, length=0x800
RAML0L1: origin=0x8000, length=0x2000
ZONE6D: origin=0x108000, length=0x8000
}
SECTIONS
{
.vectors: load = 0x000000000
.text: > RAMH0, PAGE = 0
.switch: > RAMH0, PAGE = 0
.bss: > RAML0L1, PAGE = 1
.ebss: > RAML0L1, PAGE = 1
.far: > RAML0L1, PAGE = 1
.cinit: > RAMH0, PAGE = 0
.pinit: > RAMH0, PAGE = 0
.const: > RAML0L1, PAGE = 1
.econst: > RAML0L1, PAGE = 1
.reset: > RESET, PAGE = 0, TYPE = DSECT
.data: > RAML0L1, PAGE = 1
.cio: > RAML0L1, PAGE = 1
.sysmem: > RAML0L1, PAGE = 1
.esysmem: > RAML0L1, PAGE = 1
.stack: > RAMM0M1, PAGE = 1
.rtdx_text: > RAMH0, PAGE = 0
.rtdx_data: > RAML0L1, PAGE = 1
codestart: > BEGINRAM, PAGE = 0
IQmath: > RAMH0, PAGE = 0
ramfuncs: > RAMH0, PAGE = 0
IQmathTables: > BOOTROM, PAGE = 0, TYPE = NOLOAD
}
编译过程出现的报错
10#:
任意方式调试,都需要确保空间够大,你自己知道.text和.ebss的大小分别是多少吗?如果FLASH和RAM的空间总和本身就不能支撑你的所有代码大小,怎么放置都是不行的。
用dsp2812进行在线仿真,因为用的是模糊控制算法生成的代码段过大,主要是.ebss段,和.text段太长,吧.ebss放到FLASH可以行得通,但是.text却不能放到FLASH中,对RAM的内存进行配置还是放不下这么大的.text段,请问大神们有没有更好的方法,可以解决这个问题,或者有什么方法把.text放到FLASH中,(注意我是采用ram在线调试的)
cmd文件
MEMORY
{
PAGE 0:
OTP: origin=0x3d7800, length=0x800
BEGINRAM: origin=0x3f8000, length=0x2
BEGINFLASH: origin=0x3f7ff6, length=0x2
CSM_PWL: origin=0x3f7ff8, length=0x8
RAMH0: origin=0x3f8002, length=0x1ffe
BOOTROM: origin=0x3ff000, length=0xfc0
RESET: origin=0x3fffc0, length=0x2
VECTORS: origin=0x3fffc2, length=0x3e
FLASH: origin=0x3d8000, length=0x1fff6
ZONE6P: origin=0x100000, length=0x8000
PAGE 1:
RAMM0M1: origin=0x0, length=0x800
RAML0L1: origin=0x8000, length=0x2000
ZONE6D: origin=0x108000, length=0x8000
}
SECTIONS
{
.vectors: load = 0x000000000
.text: > RAMH0, PAGE = 0
.switch: > RAMH0, PAGE = 0
.bss: > RAML0L1, PAGE = 1
.ebss: > RAML0L1, PAGE = 1
.far: > RAML0L1, PAGE = 1
.cinit: > RAMH0, PAGE = 0
.pinit: > RAMH0, PAGE = 0
.const: > RAML0L1, PAGE = 1
.econst: > RAML0L1, PAGE = 1
.reset: > RESET, PAGE = 0, TYPE = DSECT
.data: > RAML0L1, PAGE = 1
.cio: > RAML0L1, PAGE = 1
.sysmem: > RAML0L1, PAGE = 1
.esysmem: > RAML0L1, PAGE = 1
.stack: > RAMM0M1, PAGE = 1
.rtdx_text: > RAMH0, PAGE = 0
.rtdx_data: > RAML0L1, PAGE = 1
codestart: > BEGINRAM, PAGE = 0
IQmath: > RAMH0, PAGE = 0
ramfuncs: > RAMH0, PAGE = 0
IQmathTables: > BOOTROM, PAGE = 0, TYPE = NOLOAD
}
编译过程出现的报错
xianglin chen:
回复 10#:
图片里面有显示,目前我把.text缩减到0x3000左右还是不行,将.text加载到FLASH然后在RAM中运行这种方法可行吗?
用dsp2812进行在线仿真,因为用的是模糊控制算法生成的代码段过大,主要是.ebss段,和.text段太长,吧.ebss放到FLASH可以行得通,但是.text却不能放到FLASH中,对RAM的内存进行配置还是放不下这么大的.text段,请问大神们有没有更好的方法,可以解决这个问题,或者有什么方法把.text放到FLASH中,(注意我是采用ram在线调试的)
cmd文件
MEMORY
{
PAGE 0:
OTP: origin=0x3d7800, length=0x800
BEGINRAM: origin=0x3f8000, length=0x2
BEGINFLASH: origin=0x3f7ff6, length=0x2
CSM_PWL: origin=0x3f7ff8, length=0x8
RAMH0: origin=0x3f8002, length=0x1ffe
BOOTROM: origin=0x3ff000, length=0xfc0
RESET: origin=0x3fffc0, length=0x2
VECTORS: origin=0x3fffc2, length=0x3e
FLASH: origin=0x3d8000, length=0x1fff6
ZONE6P: origin=0x100000, length=0x8000
PAGE 1:
RAMM0M1: origin=0x0, length=0x800
RAML0L1: origin=0x8000, length=0x2000
ZONE6D: origin=0x108000, length=0x8000
}
SECTIONS
{
.vectors: load = 0x000000000
.text: > RAMH0, PAGE = 0
.switch: > RAMH0, PAGE = 0
.bss: > RAML0L1, PAGE = 1
.ebss: > RAML0L1, PAGE = 1
.far: > RAML0L1, PAGE = 1
.cinit: > RAMH0, PAGE = 0
.pinit: > RAMH0, PAGE = 0
.const: > RAML0L1, PAGE = 1
.econst: > RAML0L1, PAGE = 1
.reset: > RESET, PAGE = 0, TYPE = DSECT
.data: > RAML0L1, PAGE = 1
.cio: > RAML0L1, PAGE = 1
.sysmem: > RAML0L1, PAGE = 1
.esysmem: > RAML0L1, PAGE = 1
.stack: > RAMM0M1, PAGE = 1
.rtdx_text: > RAMH0, PAGE = 0
.rtdx_data: > RAML0L1, PAGE = 1
codestart: > BEGINRAM, PAGE = 0
IQmath: > RAMH0, PAGE = 0
ramfuncs: > RAMH0, PAGE = 0
IQmathTables: > BOOTROM, PAGE = 0, TYPE = NOLOAD
}
编译过程出现的报错
10#:
回复 xianglin chen:
.text放在flash上是可以的,copy到RAM上运行也是可以的。
如果你的.text的大小在0x3000,那么你需要将用来存放它的flash的大小也配置为不小于0x3000,可是你的MEMORY下面对于任何一个内存在大小都没有达到这个大小。