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.
Tool/software: Code Composer Studio
Mr. Rahul :
I add the following content in the vpif_lcd_loopback.c file ,
//// add the following 2017-07-11
if( VLIB_cache_init())
{
VLIB_memError("VLIB_Canny_Edge_Detection");
}
else
{
//// VLIB_Canny_Edge_Detection_d-aa(0);
canny_getTestParams(&prm, &test_cases);
/* Initialize profiling */
VLIB_profile_init(2, "VLIB_Canny_Edge_Detection");
/* Run each test case */
for( tpi=0; tpi < test_cases; tpi++ )
{
/* Initialize status flags */
int32_t status_nat_vs_int = vlib_KERNEL_PASS; /* Test status : Natural c vs. Optimized */
int32_t status_nat_vs_ref = vlib_KERNEL_PASS; /* Test status : Natural c vs. Static Reference */
/* Compute buffer sizes */
uint32_t bufferSize = prm[tpi].width * prm[tpi].height;
/* Allocate buffers for each test vector */
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 numItems;
int32_t numItems_cn;
/* Only run the test if the buffer allocations fit in the heap */
if( pInput && pBufGradX && pBufGradY && pBufMag && pScratch && pBufOut && pBufOut_cn )
{
uint32_t fail;
/* Fill input arrays according to desired test pattern */
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);
/* initialize memory */
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));
/* Test optimized kernel */
VLIB_profile_start(vlib_KERNEL_OPT);
}
}
}
//// add the above 2017-07-11
then Project-> Build Project
the following appear in the Console window ,
<Linking>
error: symbols in the reserved far sections cannot be accessed as near; symbol
"act_kernel" in the far section
"C:\ti\vlib_c674x_3_3_0_3\packages\ti\vlib\lib\common.ae674<VLIB_test.oe674>
(.far)" is accessed as near in the section "./vpif_lcd_loopback.obj(.text)"
>> Compilation failure
error: symbols in the reserved far sections cannot be accessed as near; symbol
"beg_count" in the far section
"C:\ti\vlib_c674x_3_3_0_3\packages\ti\vlib\lib\common.ae674<VLIB_profile.oe6
74>(.far)" is accessed as near in the section
"./vpif_lcd_loopback.obj(.text)"
error: symbols in the reserved far sections cannot be accessed as near; symbol
"beg_count" in the far section
"C:\ti\vlib_c674x_3_3_0_3\packages\ti\vlib\lib\common.ae674<VLIB_profile.oe6
74>(.far)" is accessed as near in the section
"./vpif_lcd_loopback.obj(.text)"
error: symbols in the reserved far sections cannot be accessed as near; symbol
"test_cases" in the far section
"C:\ti\vlib_c674x_3_3_0_3\packages\ti\vlib\lib\common.ae674<VLIB_test.oe674>
(.fardata)" is accessed as near in the section
"./vpif_lcd_loopback.obj(.text)"
error: symbols in the reserved far sections cannot be accessed as near; symbol
"test_cases" in the far section
"C:\ti\vlib_c674x_3_3_0_3\packages\ti\vlib\lib\common.ae674<VLIB_test.oe674>
(.fardata)" is accessed as near in the section
"./vpif_lcd_loopback.obj(.text)"
error: symbols in the reserved far sections cannot be accessed as near; symbol
"test_cases" in the far section
"C:\ti\vlib_c674x_3_3_0_3\packages\ti\vlib\lib\common.ae674<VLIB_test.oe674>
(.fardata)" is accessed as near in the section
"./vpif_lcd_loopback.obj(.text)"
warning: creating output section ".sram_start" without a SECTIONS
specification
undefined first referenced
symbol in file
--------- ----------------
_sram_start C:\ti\vlib_c674x_3_3_0_3\packages\ti\vlib\lib\common.ae674<VLIB_memory.oe674>
canny_getTestParams ./vpif_lcd_loopback.obj
error: unresolved symbols remain
error: errors encountered during linking; "vpif_lcd_loopback.out" not built
gmake: *** [vpif_lcd_loopback.out] Error 1
gmake: Target `all' not remade because of errors.
**** Build Finished ****
What can I do ?
Waiting for your helpful message .
Good Luck !
Zhangbin , Alex .
Mr. :
Now I use Code Composer Studio , Version: 5.1.1.00031
I can not find where to set the --mem_model ,.
can you give me some more suggestions in detail ?
Or how can I get a web-site link , or a file , to tell me , how to set the --mem_model compiler switch to far ?
Waiting for your response .
Good Luck !
Zhangbin , Alex .
Alex,
The warning that you are seeing are not fatal as in they may not cause any functional issue. Some of the errors is caused because you are sections in the linker command file corresponding to COFF build but the compiler now builds ELF binary code.
processors.wiki.ti.com/.../C6000_EABI_Migration
For neardata, rodata and bss try adding the following:
GROUP (NEAR_DP_RELATIVE) { .neardata .rodata .bss } > DDR2