This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

关于DATA_SECTION的一个困惑的问题



问题

源文件代码如下:

#pragma DATA_SECTION(DDRStart,".ddr_mem");
VUint32 DDRStart;

#pragma DATA_SECTION(NANDStart,".aemif_mem");
VUint32 NANDStart;

Uint32 nandtest()
{
   …………//省略

    // Initialize NAND Flash
    pNandInfo = NAND_Open((Uint32)&NANDStart);
   if (pNandInfo == NULL)
    {
          printf( "\tERROR: NAND Initialization failed.\r\n" );
          return E_FAIL;
     }

   …………//省略
}

CMD代码如下:

MEMORY
{
	DRAM		org=0x80000000 len=0x07000000 /* DDR RAM */
	DRAM_PROG   org=0x87000000 len=0x01000000 /* DDR for program */
	AEMIF		org=0x02000000 len=0x01000000 /* AEMIF CS2 region */
}

SECTIONS
{
	.text       > DRAM_PROG
	.const      > DRAM_PROG
	.bss        > DRAM_PROG
	.stack      > DRAM_PROG
	.data       > DRAM_PROG
	.cinit		> DRAM_PROG
	.sysmem		> DRAM_PROG
	.cio		> DRAM_PROG
	.ddr_mem    > DRAM 
	.aemif_mem  > AEMIF
}

大家解释下:

NAND_Open((Uint32)&NANDStart)中 volatile uint32    NANDStart 这个变量的值是多少?
#pragma DATA_SECTION(NANDStart,".aemif_mem");这句话到底起了什么作用?难道还对全局变量进行了初始化,那初始化值为多少?
望解答,谢谢!