Other Parts Discussed in Thread: SYSBIOS
Hi,
I am now debugging and validating an algorithm on the C674x-DSP in DM8168. Since I have the Cortex-A8 bypassed, I have been able to connect and load a *.out program in the DSP.
I managed to load data manually to the EXTERNAL MEMORY by using the "Load Memory" function of the XDS100v2 emualtor when I was debugging. Although my program works well, it seems that I have never indicate my program that such an external block was being used inplicitly. If there were some variables which allocated in the same address (where the data stay), my data would be ruined. Thus, in order to avoid the potential data error, I want to create an Heap object which locates in External Memory (0x8000_0000 ~ 0x9FFF_FFFF), and manually load my data in that place.
However, after adding a HeapMem Instance named "InHeap" in cfg file through the GUI in CCSv5, I add some code in main.c file:
...
if (NULL == (inData = (XDAS_Int8 *)Memory_alloc(InHeap, TESTVECTOR_LEN, 0, &eb)))
{
System_printf("InData Alloc Error\n");
System_exit(-2);
}
...
It cast some error into the console:
'Building file: ../main.c'
'Invoking: C6000 Compiler'
"D:/TI/ccsv5/tools/compiler/c6000_7.4.2/bin/cl6x" -mv6740 --abi=eabi -g --include_path="D:/TI/ccsv5/tools/compiler/c6000_7.4.2/include" --include_path="G:/CCS_Workspace/xDM_Alg/naroah/g722enc" --display_error_number --diag_warning=225 --diag_wrap=off --preproc_with_compile --preproc_dependency="main.pp" --cmd_file="./configPkg/compiler.opt" "../main.c"
"../main.c", line 56: warning #225-D: function declared implicitly
"../main.c", line 56: error #20: identifier "InHeap" is undefined
"../main.c", line 61: error #20: identifier "OutHeap" is undefined
"../main.c", line 107: warning #225-D: function declared implicitly
2 errors detected in the compilation of "../main.c".
>> Compilation failure
gmake: *** [main.obj] Error 1
gmake: Target `all' not remade because of errors.
The "implicitly declared function" was "Memory_alloc()", and "InHeap" is the Heapname I defined in the cfg file.
I don't know how to use the HeapMemory API properly. Besides, I don't know which head file I should include, either.
Could you help me dealing with this problem?
Naroah
Aug/13/2013


