我随便打开一个例程,连接好板子,debug,然后用memory browser查看内存,比如0xc3000000,就会发现里面已经有数据了,这个数据是从哪来的呢?它掉电没被擦除掉难道是属于flash段么?那怎么在debug时让它初始化为0呢、、
随便还想请教一下怎么查询各ram,rom的起始地址,还有flash为什么要烧写而不是像DDR一样直接在cmd里划定~?
谢谢了,正在迷茫中:(
下面是例程的cmd代码
MEMORY
{
L2: o = 0x00800000 l = 0x00040000
share: o = 0x80000000 l = 0x00020000
L1P: o = 0x00E00000 l = 0x00008000
L1D: o = 0x00F00000 l = 0x00008000
dsp_ddrii: o = 0xc2000000 l = 0x1000000
}
/* =========================================================================*
* Specify the Sections Allocation into Memory *
* =========================================================================*/
SECTIONS
{
.cinit > dsp_ddrii /* Initialization Tables */
.pinit > dsp_ddrii /* C++ Constructor Tables */
.const > dsp_ddrii /* Constant Data */
.switch > dsp_ddrii /* Jump Tables */
.text:_c_int00 > 0xc2000000
.text > dsp_ddrii /* Executable Code */
.bss > dsp_ddrii /* Global & Static Variables */
.far > dsp_ddrii /* Far Global & Static Variables */
.stack > dsp_ddrii /* Software System Stack */
.sysmem > dsp_ddrii /* Dynamic Memory Allocation Area */
.cio > dsp_ddrii /* C I/O Buffer */
.vecs > dsp_ddrii /* Interrupt Vectors */
}
下面是生成的map文件
MEMORY CONFIGURATION name origin length used unused attr fill ---------------------- -------- --------- -------- -------- ---- -------- L2 00800000 00040000 00000000 00040000 RWIX L1P 00e00000 00008000 00000000 00008000 RWIX L1D 00f00000 00008000 00000000 00008000 RWIX share 80000000 00020000 00000000 00020000 RWIX dsp_ddrii c2000000 01000000 00107c1f 00ef83e1 RWIX