TI中文支持网
TI专业的中文技术问题搜集分享网站

6678使用sysbios时系统堆栈溢出

Other Parts Discussed in Thread:SYSBIOS

在使用sysbios运行图像处理算法程序时,函数内部建立了大量高维图像局部变量,系统堆栈放在了L2SRAM,发现堆栈不够用,可以把堆栈放在DDR里吗?如果可以怎么修改DDR等初始化程序?

Nancy Wang:

可以的,参考7.5.1 System Stack 修改,将.stack 重新指定到DDR。
www.ti.com/…/spruex3v.pdf

,

user4192203:

如果直接在cfg里使用下面程序
Program.stack = 0x40000;
Program.sectMap[".stack"] = "DDR3_1G";
使用JTAG在线调试不能连接目标板,出现PSRC FAILED错误。
核0的程序为:
main()
{……初始化局部变量,初始化时钟,UART,SRIO等…//初始化DDR3DDR3_Init();//创建核0与核N任务if(DNUM==0){….}
else{….}

BIOS_START();
}
按照我的理解出现这种错误是由于在进入main之前没有进行DDR3初始化操作。不知道理解的对不对

,

Nancy Wang:

通过GEL文件先初始化DDR看一下,但不应该连不上目标板。

,

user4192203:

6678所有核使用一个工程,使用dnum进行区分,在核0的main程序中把核0的程序直接拷贝到了其他核的本地L2里。
有没有例子使用gel文件初始化DDR?
如果希望固化时怎么初始化ddr?

,

Nancy Wang:

建议你可以参考以下写法试一下。文件来自于helloworld_evmc6678l工程。

4667.helloWorld.cfg6747.helloWorld.c

cfg:

Startup.lastFxns.$add('&EVM_init');

.c :

*  @b EVM_init()

*

*  @n

*    

*  Initializes the platform hardware. This routine is configured to start in

*   the evm.cfg configuration file. It is the first routine that BIOS

*   calls and is executed before Main is called. If you are debugging within

*  CCS the default option in your target configuration file may be to execute

*  all code up until Main as the image loads. To debug this you should disable

*  that option.

*

*  @param[in]  None

*

*  @retval

*      None

************************************************************************/

void EVM_init()

{

platform_init_flags   sFlags;

platform_init_config  sConfig;

/* Status of the call to initialize the platform */

int32_t pform_status;

/*

 * You can choose what to initialize on the platform by setting the following

 * flags. Things like the DDR, PLL, etc should have been set by the boot loader.

*/

memset( (void *) &sFlags,  0, sizeof(platform_init_flags));

memset( (void *) &sConfig, 0, sizeof(platform_init_config));

   sFlags.pll  = 1; /* PLLs for clocking    */

   sFlags.ddr  = 1;     /* External memory    */

   sFlags.tcsl = 1; /* Time stamp counter   */

#ifdef _SCBP6618X_

   sFlags.phy  = 0; /* Ethernet       */

#else

   sFlags.phy  = 1; /* Ethernet       */

#endif

   sFlags.ecc  = 0; /* Memory ECC       */

   sConfig.pllm = 0;  /* Use libraries default clock divisor */

pform_status = platform_init(&sFlags, &sConfig);

,

Nancy Wang:

参考以下帖子,将EVM_init替换为你的DDR3初始化程序。
Startup.lastFxns.$add('&DDR3_init');
e2e.ti.com/…/1927725

,

user4192203:

helloworld_evmc6678l在哪里可以找到该完整工程?

,

Nancy Wang:

MCSDK中的一个例程。

8738.helloworld_evmc6678l.7z

赞(0)
未经允许不得转载:TI中文支持网 » 6678使用sysbios时系统堆栈溢出
分享到: 更多 (0)