Other Parts Discussed in Thread: FFTLIB
Tool/software:
I tried to implement the fftlib test module FFTLIB_fft1d_i32fc_c32fc_o32fc from the fftlib folder into the example hello_world freertos project. I renamed the "main" function in
fftlib\test\fft_c7x\FFTLIB_fft1d_i32fc_c32fc_o32fc\FFTLIB_fft1d_i32fc_c32fc_o32fc_d.c
and called it in main.c file of the project (hello_world_am62ax-sk_c75ss0-0_freertos_ti-c7000\main.c)
But when building, it had some linker failure issues. I used the original linker from the helloworld project, and added the sections as fftlib source requires (fftlib\cmake\linkers\C7504\lnk.cmd). Please check the attachment.
At last, it failed at this error:
#17003-D relocation from function "TI_profile_setStackDepth" to symbol "__TI_STACK_SIZE" overflowed; the 33-bit relocated address 0xf7f341040 is too large to encode in the 32-bit signed PC-Relative field (type = 'R_C7X_PCR_OFFSET_ADDKPC_HI27' (33), file = "./test/common/TI_profile.obj", offset = 0x00000000004c, section = ".text:TI_profile_setStackDepth") TI_profile.c /hello_world_am62ax-sk_c75ss0-0_freertos_ti-c7000/test/common line 436 C/C++ Problem
Failed function:
void TI_profile_setStackDepth(void) {
#if !defined(_HOST_BUILD) && !defined(DISABLE_STACK_PROFILING)
int32_t i;
for (i = 0; i < ((uint64_t)&_STACK_SIZE / 4); i++) {
if (topStack[i] != 0xDEADBEEF) { // error
break;
}
}
newSP = (i * 4) + (uint64_t)topStack;
stackSize[act_kernel] = (oldSP - newSP);
#endif
}
I found that the source code has some checking for memory segments. I also tried to disable DISABLE_STACK_PROFILING, this setting let me build the code successfully but when I ran debug, the system could not start at the "main" function.
my linker file:
/cfs-file/__key/communityserver-discussions-components-files/791/linker-_2800_1_2900_.txt