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.

Undefiend Symbol in a cfg.obj file

 Hi,

I am getting this error when attempting to build my project

 

<Linking>

 

 undefined first referenced

  symbol       in file    

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

 _GyroRx   ./14ducfg.obj  

 

error: unresolved symbols remain

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

 

GyroRx is a function that I wanted to rename so I changed the call from the HWI properties and the function in the .c file but I get this error.  If I change the function back I don't get any errors.   The function call from the HWI doesn't need to be to GyroRx but the cfg wont work without it existing.

I have tried a clean to remove the .obj file but it is generated in the same way.  I could keep the name as it is but it is quite inacurate now my code has evolved so it would be quite annoying if I or someone else came back to look at the code in a few months/years.

Any suggestions as to a solution would be gratefully received.

Sean

  • Sean,

    I have seen that error when I have forgotten to save the tcf file or change in the tcf file wasn't picked up by CCS.

    Try opening up the tcf file in the text editor.  Right click on it in the project and select open in text editor.   The way tcf files work is that they keep a record of the changes that you have made.  I would suggest searching for GryoRx in the file and delete any lines that look similar to this (instead of HWI_INT4 it would say whatever INT you changed):

    bios.HWI.instance("HWI_INT4").fxn = prog.extern("GyroRx");    

     

    For example I was playing around with my function names and I ended up with a set of statements that looked like this in my file:

     

     

    bios.HWI.instance("HWI_INT4").fxn = prog.extern("john", "asm");

    bios.HWI.instance("HWI_INT4").fxn = prog.extern("main", "asm");

    bios.HWI.instance("HWI_INT4").fxn = prog.extern("main");

    bios.HWI.instance("HWI_INT4").fxn = prog.extern("john");

     

    I could reduce this down to:

    bios.HWI.instance("HWI_INT4").fxn = prog.extern("john");

     

    Note that you will need to close the graphical tcf editor before editing the file otherwise it will keep prompting you to reload the file.

    Regards,

    John

     

     

     

  • Hi John,

    That worked a treat, thank you very much.

    Sean