在使用sysbios运行图像处理算法程序时,函数内部建立了大量高维图像局部变量,系统堆栈放在了L2SRAM,发现堆栈不够用,可以把堆栈放在DDR里吗?如果可以怎么修改DDR等初始化程序?
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.
在使用sysbios运行图像处理算法程序时,函数内部建立了大量高维图像局部变量,系统堆栈放在了L2SRAM,发现堆栈不够用,可以把堆栈放在DDR里吗?如果可以怎么修改DDR等初始化程序?
通过GEL文件先初始化DDR看一下,但不应该连不上目标板。
建议你可以参考以下写法试一下。文件来自于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);
MCSDK中的一个例程。