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.

Linking problems?

Other Parts Discussed in Thread: OMAP-L138, CCSTUDIO, OMAPL138

Hi I'm trying to use UART2 in OMAP-L138 on board from LogicPD, but I stuck on some errors:

<code>

----------------------  OMAPL138-DSP-LED-DSP.pjt - Debug  ----------------------
[Linking...] "C:\CCStudio_v3.3\C6000\cgtools\bin\cl6x" -@"Debug.lkf"
<Linking>

 undefined first referenced                                                                                            
  symbol       in file                                                                                                 
 --------- ----------------                                                                                            
 _sysRegs  C:\\Documents and Settings\\Cooler\\Moje dokumenty\\OMAP\\OMAPL138-DSP-LED\\DSP\\src\\Debug\\main_led_dip.obj

error: unresolved symbols remain
error: errors encountered during linking; "../Debug/OMAPL138-DSP-LED-DSP.out"
   not built

>> Compilation failure

Build Complete,
  1 Errors, 0 Warnings, 0 Remarks.

</code>

This is my source file:

<code>#include <UART_interrupt_loopback_dspL138.h>
 



int main (void)
{
  init_OMAPL138();
  //setup i2c registers and start i2c running
  //init_i2c();

//    LED_turnOn(0);
 // blink_leds();

  while(1);

}

static void init_OMAPL138 (void)
{
    // Open Permissions to SYSCFG Registers
    CSL_FINS(sysRegs->KICK0R, SYSCFG_KICK0R_KICK0, KICK0_KEY);
    CSL_FINS(sysRegs->KICK1R, SYSCFG_KICK1R_KICK1, KICK1_KEY);
    
    // Configure UART2 Transmit & Receive Signals
    CSL_FINST(sysRegs->PINMUX4, SYSCFG_PINMUX4_PINMUX4_23_20, UART2_TXD);
    CSL_FINST(sysRegs->PINMUX4, SYSCFG_PINMUX4_PINMUX4_19_16, UART2_RXD);
    
    // Configure UART0 with the DSP CPU
    CSL_FINST(sysRegs->SUSPSRC, SYSCFG_SUSPSRC_UART2SRC, DSP);
    
    // Close Permissions to SYSCFG Registers
    CSL_FINS(sysRegs->KICK0R, SYSCFG_KICK0R_KICK0, KICK_LOCK);
}/* init_OMAPL138 */


</code>

 

I'm using included files from qStartExamples package  I found on TI's wiki tutorials and CCSv3. I think it is someting wrong with my linking file, but I don't know how to create this files properly.Could anyone give me same clues where can I find some tutorials dokuments about creating linking files? ( something about sections, general rules related with OMAP)

My looks like this:

<code> ; Code Composer Project File, Version 2.0 (do not modify or remove this line)

[Project Settings]
ProjectDir="C:\Documents and Settings\Cooler\Moje dokumenty\OMAP\OMAPL138-DSP-LED\DSP\ccs\"
ProjectType=Executable
CPUFamily=TMS320C67XX
Tool="Compiler"
Tool="CustomBuilder"
Tool="DspBiosBuilder"
Tool="Linker"
Config="Debug"

[Source Files]
Source="..\src\main_led_dip.c"
Source="linker_dsp.cmd"

["Compiler" Settings: "Debug"]
Options=-g -q -fr".\Debug\" -i"..\inc" -i"C:\Program Files\Texas Instruments\quickStartOMAPL1x_rCSL\OMAPL1x\support\includes" -d"DEBUG" -mv6740

["Linker" Settings: "Debug"]
Options=-q -c -m"..\Debug\OMAPL138-DSP-LED-DSP.map" -o"..\Debug\OMAPL138-DSP-LED-DSP.out" -x
</code>

  • Pawel Pyszko,

    Thank you for writing to us regarding the issue you are facing. Inorder to make sure you have the latest software for the device let me inform you that the latest BIOSPSP package for OMAPL138 can be downloaded from here

    http://software-dl.ti.com/dsps/dsps_public_sw/psp/BIOSPSP/index.html

    This package has example code to initialize the EVM for using UART2 under the path pspdrivers_01_30_01\packages\ti\pspiom\platforms\evmOMAPL138\src\uart_evmInit.c

    Coming to your code, it appears that you have not defined the variable sysReg in your code due to which you are seeing the error at the time of linking.

    please define sysReg [as a global variable or inside function "init_OMAPL138 ()"]as mentioned below

    CSL_SyscfgRegsOvly syscfgRegs = (CSL_SyscfgRegsOvly)CSL_SYSCFG_0_REGS;

    You will need to include the header file cslr_syscfg0_OMAPL138.h that can be found in the BIOSPSP package under the path pspdrivers_01_30_01\packages\ti\pspiom\cslr.

    Please let us know if you were able to compile your code after you define this variable.

    Regards,

    Rahul

  • Thanks it working now. I did like you told me a while before you posted. I wrote new post because I was confused:

    First: if it was a problem with lack of definition i would expect some mentioning about it ( not on linker level )

    Second: I thought I included all files from example I used ( UART2 from qStartExamples ) and I still think that way, but maybe I omitted something in linking file or project options, besause I used CCSv3 to compile CCSv4 project and in CCS4's projects there is no clear text file with configuration like in CCSv3