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.

Linker Warning

Hi,

I am trying to build an image for loading into a C6727 which makes use of the DSP/BIOS in ROM.  I get the following linker warning:

[Linking...] "C:\Program Files\Texas Instruments\ccsv4\tools\compiler\c6000\bin\cl6x" -@"Debug.lkf"
<Linking>
"SOS_thread.cpp", line 43: warning: relocation type is static base-relative,
   but references symbol "_KNL_curtask" defined in section ".biosram";
   references to section ".biosram" are not relative to any static base, so
   this relocation cannot be performed (type = 'R_C60BASE' (80), file =
   "C:\\Dsp\\Ccs3Projects\\Dsp1App\\Debug\\SO
   S_thread.obj", offset = 0x000001f0, section = ".text")

I read some previous posts which suggest a fix by adding "far" to the variable declaration, however, in this case the variable is internal to DSP/BIOS.  When I link DSP/BIOS into the application image (not using ROMed DSP/BIOS) I don't have any problems.

Any help would be great, thanks,

Colin

  • This looks like BIOS problem.  So, I'll move this thread to the BIOS forum.

    Thanks and regards,

    -George

  • Colin --

    I think the problem is that your .cpp file is calling TSK_self().   TSK_self() is defined as a macro in 'tsk.h'

    #define TSK_self()              ((TSK_Handle)KNL_curtask)

    The problem is that KNL_curtask is resides in the .biosram section and not the .bss section.  

    The solution is pretty simple.  You need to compile the offending .cpp file to treat data as "far data".   This will cause the data to be loaded using the full address rather than an offset from B14 (B14 points to base of .bss).

    Which version of BIOS and the compiler are you using? 

    The compiler option to force this reference to be a 'far' reference is:

    --mem_model:data=far

    If you add this to your compile line for the offending .cpp file, you should be good to go.

    -Karl-

  • Thanks Karl,

    I was using the Far Aggregate memory model, changing to Far seems to fix the problem.