Part Number:TMS320C6678
源文件变量分配代码:
#pragma SET_DATA_SECTION(".testSect")
TY_SRIO_INFO gSrioInfo = {0, 0, 0, 0, 0, 0, 0, 0, 50*1000, {0}, {0}};
TY_NCC_INFO gNccInfo = {{0}, {0}, 0};
TY_ALGORITHM gAlgoInfo = {0, 0, 0, 0, 0, (uint32_t*)SIFT_NUM_ADDRESS, (float*)SIFT_POINT_ADDRESS,
(uint8_t*)SIFT_VECT_ADDRESS, 256, 320, (uint8_t*)SIFT_TX_ADDRESS, gDDRKeySNum, 200*1000,
0, 0, 0.0f, 0, 0, 0, 0, (uint8_t*)SIFT_VECT_ADDRESS, (uint8_t*)SIFT_VECT_ADDRESS, 2000, 8000, 0};
TY_HYPERLink_INFO gHyperInfo = {1000*1000, 0, 0, 0};
TY_CAM_INFO gCameraInfo = {0, 0, (uint32_t*)0x88000024};
TY_DPRAM_INFO gDpramInfo = {0, 0, 0, 20*1000, 0};
TY_NAND_INFO gNandInfo = {0, 0, 0, 256*320, 0x4B00000, (uint32_t *)SIFT_TX_ADDRESS};
uint32_t gCrc32 = 0;
uint32_t gKeyNum[2] = {0};
float gKeyPointSum[2] = {0.0f};
float gKeyVectSum[2] = {0.0f};
float* gPointPter = NULL;
uint8_t* gVecrPtr = NULL;
uint8_t gPos = 0;
uint32_t gErrFlag = 0;
#pragma SET_DATA_SECTION("")
cmd文件配置:
.testSect > SHRAM4
编译时提示警告如下:
Description Resource Path Location Type
#10281-D Section ".testSect" requires a STATIC_BASE relative relocation, but is located at 0x0c280000, which is probably out of range of the STATIC_BASE. STATIC_BASE is located at 0x00810000. Might be required to correct placement of ".testSect" so it lies within 0x8000 of the STATIC_BASE. RC190007_SIFT_DPRAM_TEST C/C++ Problem
Description Resource Path Location Type
#17003-D relocation from function "algProcess" to symbol "gCrc32" overflowed; the 26-bit relocated address 0x2e9cd3a is too large to encode in the 15-bit unsigned field (type = 'R_C6000_SBR_U15_W' (13), file = "./AlgProc/algProcess.obj", offset = 0x000000e4, section = ".text") algProcess.c /RC190007_SIFT_DPRAM_TEST/AlgProc line 63 C/C++ Problem
Description Resource Path Location Type
#17003-D relocation from function "algProcess" to symbol "gErrFlag" overflowed; the 26-bit relocated address 0x2e9cd45 is too large to encode in the 15-bit unsigned field (type = 'R_C6000_SBR_U15_W' (13), file = "./AlgProc/algProcess.obj", offset = 0x000004e8, section = ".text") algProcess.c /RC190007_SIFT_DPRAM_TEST/AlgProc line 116 C/C++ Problem
Description Resource Path Location Type
#17003-D relocation from function "algProcess" to symbol "gErrFlag" overflowed; the 26-bit relocated address 0x2e9cd45 is too large to encode in the 15-bit unsigned field (type = 'R_C6000_SBR_U15_W' (13), file = "./AlgProc/algProcess.obj", offset = 0x000004f0, section = ".text") algProcess.c /RC190007_SIFT_DPRAM_TEST/AlgProc line 116 C/C++ Problem
想请问一下,第一条警告是什么意思?
Nancy Wang:
请问这个STATIC_BASE是定义的地址范围吗?或者您将cmd文件贴出来看一下。
,
Duan Siyu:
,
Nancy Wang:
没看到STATIC_BASE的定义。
从报错提示来看请在cmd中将 .testSect 段指定到 STATIC_BASE。
SECTIONS
{
.testSect > STATIC_BASE
,
Duan Siyu:
感谢,其实我更想知道后续几条警告的含义是什么,能帮助解答一下吗
,
Nancy Wang:
Duan Siyu 说:relocation from function "algProcess" to symbol "gCrc32" overflowed;
请贴出提到的这些名称相关代码的细节看一下。
,
Duan Siyu:
,
Nancy Wang:
没有看到 algProcess. 这两者的关系是什么?没有看明白。
,
Duan Siyu:
不好意思,是函数名称
void algProc(void){ if(ISMDSP) { if(0 == DNUM) /* core 0 initialize peripheral and record device state, then send PIC and execute SIFT*/ { int ret = 0, pos = 0, i = 0;
gSrioInfo.m_initRet = Drv_SIRO_Init(Dev_SRIO, DSP_PORT0_DeviceID, ((SRIO_PATH_MODE_2xLaneAB_2xLaneCD << 8) | Srio_LoopBackDisable), SRIOBPS_5000M);
gCanInfo.m_initRet = Drv_DPRAM_Init(Dev_DPRAM);
gNandInfo.m_initRet = Drv_NandFlash_Init(Dev_DPRAM);
if(0 == gNandInfo.m_initRet) /* if NAND initialization failed, do not read NAND data */ { gNandInfo.m_rxRet = Drv_NandFlash_Read(Dev_NandFlash, gNandInfo.m_ddrAddr, gNandInfo.m_nandAddr, gNandInfo.m_picLength); if(0 == gNandInfo.m_rxRet) { gCrc32 = CalCRC32((uint8_t *)gNandInfo.m_ddrAddr,gNandInfo.m_picLength);
if(0xEDD10215 == gCrc32) { gNandInfo.m_checkRet = 1; } } }
}
,
Nancy Wang:
algProc与警告中的algProcess命名也不相同,可以搜一下algProcess,或者上传您的工程也可以。
,
Duan Siyu:
好像上传不了文件,algProcess是文件名。