AM62A7: linker issue using fftlib

Part Number: AM62A7
Other Parts Discussed in Thread: FFTLIB

Tool/software:

Hello Team
"Could you please help me fix the linker issue to implement fftlib test from AM62AXMCU SDK 10.0.0.15 on C7504?


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

Do you have any example on CCS that run fftlib on C7? Or please guide me how to use fftlib library on MCU SDK example project? 
Thank you
Guy
  • Hi Guy,

    For the linker error you are facing the following wiki article provides some details on relocation overflow errors, what could cause them and some solutions.

    Regarding your query on how to use fftlib on your project, I am working on it and will get back to you as soon as I have an update.

    Best Regards,

    Meet.