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.

LAUNCHXL-F280025C: start up check before c_int00 function

Part Number: LAUNCHXL-F280025C


Hello, 

I want to have a function that do a Kind of start up check and wanted to place before the c_int00 fucntion . So basically i changed the branching from the codestart Region , ist a C fucntion so i dont know how to link it  as mentioned below :

code_start:
    .if WD_DISABLE == 1
        LB wd_disable       ;Branch to watchdog disable code
    .else
        LCR #_selftest         ;Branch to start of boot._asm in RTS library
    .endif

but i am getting the error like  

 undefined first referenced                           
  symbol       in file                                
 --------- ----------------                           
 _selftest ./src/driver/lib/f28002x_codestartbranch.obj
 
error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "200011_HVWH_VW_GEN_2_0.out" not built

  • Hi,

    I believe you are using EABI compiler. In that case the symbol name does not have an _ prefix. You can use the same name as in the c file.

    Also make sure you have .ref <FunctionName> above the codestart.

    Regards,

    Veena

  • Hello, 

    i use c2000 Compiler and from the TMS320C28x Optimizing C/C++
    Compiler v6.0
    User's Guide

    i found the code snippet and i tried but it doesnt work : 

    the error 

    for extern c : expected an identifier

    the other try is with  in C like this : extern void StartAsm_CPUTest(void);

    and in Assembly : 

      .ref  _StartAsm_CPUTest
          .global _StartAsm_CPUTest
    _StartAsm_CPUTest:

    but still i get the errr like 

    undefined        first referenced 
      symbol              in file      
     ---------        ---------------- 
     StartAsm_CPUTest ./src/selftest.obj
     
    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "200011_HVWH_VW_GEN_2_0.out" not buil

    also i tried with such Thing : 

    in  C: 

    extern void StartAsm_CPUTest(void);

    in asm file: 

           .ref  StartAsm_CPUTest
          .global StartAsm_CPUTest
    StartAsm_CPUTest:
    but i though get the same error 

    undefined        first referenced 
      symbol              in file      
     ---------        ---------------- 
     StartAsm_CPUTest ./src/selftest.obj
     
    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "200011_HVWH_VW_GEN_2_0.out" not buil

  • Hi Ushma,

    Are you using EABI format of COFF format?

    In case of EABI, the function name in the asm and C should be the same. That means, no need of underscore prefix in the asm file.

    Regards,

    Veena

  • Hello Venna, 

    yes as i mentioned above i tried without underscore as well like following : 

    ;end codestart section
           .ref  StartAsm_CPUTest
          .global StartAsm_CPUTest
           .bss _ushma
          .global _ushma
    ;
    ;;; Check flags of condition code register
    StartAsm_CPUTest:
              

    in C like this 

    extern void StartAsm_CPUTest(void);

    StartAsm_CPUTest();

    but still i am getting the error .Could you please help me with it ?

  • HI Ushma,

    I am sorry, I mistyped. Use .def instead of .ref. In fact if you use .global, there is no need to use .def

    Regards,

    Veena

  • Hello Veena, 

    i tried the way you said still the error exists.

    Can we have a meeting or call so that i can show you the problem ?

    Thanks 

    Ushma 

  • HEllo Veena, 

    i have tried this as well : 

     .def  StartAsm_CPUTest

    StartAsm_CPUTest:

    in c file : 

    extern void StartAsm_CPUTest(void);

    StartAsm_CPUTest();

    but still the same error: 

    undefined        first referenced 
      symbol              in file      
     ---------        ---------------- 
     StartAsm_CPUTest ./src/selftest.obj
     
    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "200011_HVWH_VW_GEN_2_0.out" not built

  • Hi Ushma,

    Would it be possible to share the test project, so that I could reproduce the error? You could also share it in the private chat, if you do not want to share it publicly.

    Regards,

    Veena

  • Hello Veena, 

    i have shared with u personally .

    Thanks 

  • Hi Ushma,

    As discussed, the names of the c file and the asm file should be different, for the compiler to build the objs correctly.

    I am closing this thread.

    In case you have more queries, please open a new E2E thread

    Regards,

    Veena