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.
工具/软件:Code Composer Studio
拉胡尔先生:
我在 vpif_lcd_loopback.c 文件中添加了以下内容:
////添加以下2017-07-11
if (VLIB_cache_init ())
{
VLIB_memError ("VLIB_Canny_Edge_Detection");
}
其他
{
//// VLIB_Canny_Edge_Detection_d-aa (0);
canny_getTestParams (&prm、&test_cases);
/*初始化性能评测*/
VLIB_PROFILE_INIT (2、"VLIB_Canny_Edge_Detection);
/*运行每个测试用例*/
for (TPI=0;TPI < test_cases;TPI++)
{
/*初始化状态标志*/
int32_t status_NAT_VS_int = VLIB_kernel_pass;//测试状态:Natural c vs. Optimized *
int32_t status_NAT_VS_ref = VLIB_kernel_pass;//测试状态:Natural c 与静态基准*
/*计算缓冲区大小*/
uint32_t buffersize = prm[TPI].width * prm[TPI].height;
/*为每个测试向量分配缓冲区*/
uint8_t * pInput =(uint8_t *) VLIB_malloc (buffersize * sizeof (uint8_t));
int16_t * pBufGradX =(int16_t *) VLIB_malloc (buffersize * sizeof (int16_t));
int16_t * pBufGrady =(int16_t *) VLIB_malloc (buffersize * sizeof (int16_t));
int16_t * pBufMag =(int16_t *) VLIB_malloc (buffersize * sizeof (int16_t));
uint8_t * pScratch =(uint8_t *) VLIB_malloc (buffersize * sizeof (uint8_t));
uint8_t * pBufOut =(uint8_t *) VLIB_malloc (buffersize * sizeof (uint8_t));
uint8_t * pBufOut_CN =(uint8_t *) malloc (buffersize * sizeof (uint8_t));
int32_t 数字项目;
int32_t numItems_cn;
/*仅当缓冲区分配适合堆时运行测试*/
if (pInput && pBufGradX && pBufGradY && pBufMag && pScratch && pBufOut && pBufOut_CN)
{
uint32_t 失败;
/*根据所需的测试模式填充输入数组*/
VLIB_fillBuffer (PRM[TPI].testPattern、
(uint8_t) 127、
pInput、PRM[TPI].input、
PRM[TPI].width、PRM[TPI].height、PRM[TPI].width、
sizeof (uint8_t)、testPatternString);
/*初始化内存*/
memset (pBufGradX、0、buffersize * sizeof (int16_t));
memset (pBufGradY、0、buffersize * sizeof (int16_t));
memset (pBufMag、0、buffersize * sizeof (int16_t));
memset (pBufOut、0、buffersize * sizeof (uint8_t));
memset (pScratch、0、buffersize * sizeof (uint8_t));
/*测试优化的内核*/
VLIB_PROFILE_START (VLIB_kernel_opt);
}
}
}
////添加上述2017-07-11
然后依次选择"Project"->"Build Project"
以下内容将出现在“Console (控制台)”窗口中,
错误:保留的 far 段中的符号不能作为 near;符号进行访问
在 far 部分中添加了"ACT_kernel"
"C:\ti\VLIB_C674x_3_3_0_3\packages/ti\VLIB\lib\cone.ae674
(.far)"在"../vpif_lcd_loopback .obj (.text)"部分中的 near 位置访问
>>编译失败
错误:保留的 far 段中的符号不能作为 near;符号进行访问
远段中的"beg_count"
"C:\ti\VLIB_C674x_3_3_0_3\packages\ti\VLIB\lib\cone.ae674 <VLIB_profile.oe6
74>(.far)"在段中作为 near 进行访问
"../vpif_lcd_loopback.obj (.text)"
错误:保留的 far 段中的符号不能作为 near;符号进行访问
远段中的"beg_count"
"C:\ti\VLIB_C674x_3_3_0_3\packages\ti\VLIB\lib\cone.ae674 <VLIB_profile.oe6
74>(.far)"在段中作为 near 进行访问
"../vpif_lcd_loopback.obj (.text)"
错误:保留的 far 段中的符号不能作为 near;符号进行访问
"test_cases"
"C:\ti\VLIB_C674x_3_3_0_3\packages/ti\VLIB\lib\cone.ae674
(.fardata)"在段中尽可能接近
"../vpif_lcd_loopback.obj (.text)"
错误:保留的 far 段中的符号不能作为 near;符号进行访问
"test_cases"
"C:\ti\VLIB_C674x_3_3_0_3\packages/ti\VLIB\lib\cone.ae674
(.fardata)"在段中尽可能接近
"../vpif_lcd_loopback.obj (.text)"
错误:保留的 far 段中的符号不能作为 near;符号进行访问
"test_cases"
"C:\ti\VLIB_C674x_3_3_0_3\packages/ti\VLIB\lib\cone.ae674
(.fardata)"在段中尽可能接近
"../vpif_lcd_loopback.obj (.text)"
警告:创建不带段的输出段".SRAM_START"
规格
未定义的首次引用
符号
------ --------
_sam_start C:\ti\VLIB_C674x_3_3_0_3\packages/ti\VLIB\lib\cone.ae674
canny_getTestParams ./vpif_lcd_loopback.obj
错误:未解析的符号仍然存在
错误:链接期间遇到错误;未构建"vpif_lcd_loopback.out"
gmake:***[vpif_lcd_loopback.out]错误1.
gmake:目标`全部'不会由于错误而重制。
****构建完成****
我该怎么办?
正在等待您的有用消息。
祝您好运!
张斌,亚历克斯
先生:
现在我使用 Code Composer Studio 版本:5.1.00031
我找不到设置 --mem_model 的位置。
您能给我更多详细的建议吗?
或者如何获得网站链接或文件,以告诉我 如何将--mem_model 编译器切换为 far?
正在等待您的回复。
祝您好运!
张斌,亚历克斯
Alex、
您看到的警告不是致命的、因为它们不会导致任何功能问题。 导致某些错误的原因是您是链接器命令文件中与 COFF 编译相对应的段、但编译器现在构建 ELF 二进制代码。
processors.wiki.ti.com/.../C6000_EABI_Migration
对于近数据、rodata 和 BSS、请尝试添加以下内容:
GROUP (NEARL_DP_Relative) { .neardata rodata .bss }> DDR2