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.

errors encountered during linking



 

Hi,

I am using CCS v4 and I opened a 320F28069 project. Then I added the 'init.c' file from FlashingLeds example.
It is very simple actually. In the project "include folder" settings, I included necessary folders.

~SupportFiles\DSP280x_headers
~SupportFiles\DSP280x_headers\include
~SupportFiles\include

But I get the below error. My main.c is very simple also, I just want to initialize the device so just one command DeviceInit().

I think it is about linker?

 

**** Build of configuration Debug for project REK ****

E:\02_ccs\ccsv4\utils\gmake\gmake -k all

'Building file: ../init.c'

'Invoking: Compiler'

"E:/02_ccs/ccsv4/tools/compiler/C2000 Code Generation Tools 5.2.10/bin/cl2000" --silicon_version=28 -g --include_path="E:/02_ccs/ccsv4/tools/compiler/C2000 Code Generation Tools 5.2.10/include" --include_path="E:/01_yazilim/01_ti/01_evm/TI_F28xxx_SysSW/~SupportFiles/include" --include_path="E:/01_yazilim/01_ti/01_evm/TI_F28xxx_SysSW/~SupportFiles/DSP280x_headers/include" --include_path="E:/01_yazilim/01_ti/01_evm/TI_F28xxx_SysSW/~SupportFiles/DSP280x_headers" --diag_warning=225 --large_memory_model --unified_memory --cla_support=cla0 --float_support=fpu32 --preproc_with_compile --preproc_dependency="init.pp" "../init.c"

'Finished building: ../init.c'

' '

'Building file: ../main.c'

'Invoking: Compiler'

"E:/02_ccs/ccsv4/tools/compiler/C2000 Code Generation Tools 5.2.10/bin/cl2000" --silicon_version=28 -g --include_path="E:/02_ccs/ccsv4/tools/compiler/C2000 Code Generation Tools 5.2.10/include" --include_path="E:/01_yazilim/01_ti/01_evm/TI_F28xxx_SysSW/~SupportFiles/include" --include_path="E:/01_yazilim/01_ti/01_evm/TI_F28xxx_SysSW/~SupportFiles/DSP280x_headers/include" --include_path="E:/01_yazilim/01_ti/01_evm/TI_F28xxx_SysSW/~SupportFiles/DSP280x_headers" --diag_warning=225 --large_memory_model --unified_memory --cla_support=cla0 --float_support=fpu32 --preproc_with_compile --preproc_dependency="main.pp" "../main.c"

'Finished building: ../main.c'

' '

'Building target: REK.out'

'Invoking: Linker'

"E:/02_ccs/ccsv4/tools/compiler/C2000 Code Generation Tools 5.2.10/bin/cl2000" --silicon_version=28 -g --diag_warning=225 --large_memory_model --unified_memory --cla_support=cla0 --float_support=fpu32 -z -m"REK.map" --stack_size=0x300 --warn_sections -i"E:/02_ccs/ccsv4/tools/compiler/C2000 Code Generation Tools 5.2.10/lib" -i"E:/02_ccs/ccsv4/tools/compiler/C2000 Code Generation Tools 5.2.10/include" --reread_libs --rom_model -o "REK.out" "./main.obj" "./init.obj" -l"libc.a" "../28069_RAM_lnk.cmd" ../rts2800_ml.lib

<Linking>

undefined first referenced

symbol in file

--------- ----------------

_FlashRegs ./init.obj

error: unresolved symbols remain

error: errors encountered during linking; "REK.out" not built

>> Compilation failure

gmake: *** [REK.out] Error 1

gmake: Target 'all' not remade because of errors.

Build complete for project REK

 

 

 

 

  • The linker error is saying that init.obj is referencing FlashRegs but cannot find a definition for it. If the reference to FlashRegs is not needed for your code, you should remove them, or you should make sure that the definition is visible.

    I looked at the FlashingLeds example and see that the FlashingLeds-DevInit_F280x.c source file sets FlashRegs within the InitFlash() routine. This file also includes the header file "PeripheralHeaderIncludes.h", which in turn includes "DSP280x_SysCtrl.h", which defines the structure for FlashRegs. Make sure you're code is including the appropriate header files based on this example.