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.

AUTO RUN (.asm) SOURCE FILE



I am using BOARD-TMS320F2808 & directly writing in assembly language (.asm) source file.

After the BUILT & DEBUG (.asm) file finish AUTO-RUN not work & give [ C28xx: AutoRun: Target not run as the symbol "main" is not defined ] error.

How  i defined "main" function in (.asm) source file, so target auto-run possible.

  • Hi Asim,

    If you do not have a 'main', then you can change the auto-run label to whatever label you wish. You can change this in the debugger options (Tools -> Debug Options -> Auto Run and Launch Options)

    Don't forget to press the 'Remember My Settings' button at the bottom when you are done.

    Thanks

    ki

  • Thank You.....
    Ki-Soo Lee

    I am verifying, what you suggest.
  • Hii Ki-Soo,


    I am attaching my assembly code ....====================================================
    // FOR SIN WAVE GENERATION //

    .text ; Program Start
    .global _c_int00 ; Define entry point
    ; Enable EALLOW protected register access
    _c_int00: ; Specifying program entry point for the output module
    EALLOW
    .asg 10.0e-6, t
    .asg 50, fg
    .asg 3.14, p

    va .set $cos(2*p*fg*t) ; 1st phase
    vb .set $cos((2*p*fg*t)+(2*p/3)) ; 2nd phase
    vc .set $cos((2*p*fg*t)+(4*p/3)) ; 3rd phase

    Va .float va
    Vb .float vb
    Vc .float vc

    MOV AR1, #Va ; Initialize Register AR1 pointer with address of Va
    MOV AR2, #Vb ; Initialize Register AR2 pointer with address of Vb
    MOV AR3, #Vc ; Initialize Register AR3 pointer with address of Vc
    ===============================================================================================================

    Than what's the auto-run label in the debugger options ( Tools -> Debug Options -> Auto Run and Launch Options=> Run to Symbol ) .
    So that my (.asm) source file can be auto-run (or Executing Go Main i.e Toolbars Option Run-> Go Main) .
  • Hii Ki-Soo,


    I am attaching my assembly code ....====================================================
    // FOR SIN WAVE GENERATION //

    .text ; Program Start
    .global _c_int00 ; Define entry point
    _c_int00: ; Specifying program entry point for the output module

    EALLOW ; Enable EALLOW protected register access
    .asg 10.0e-6, t
    .asg 50, fg
    .asg 3.14, p

    va .set $cos(2*p*fg*t) ; 1st phase
    vb .set $cos((2*p*fg*t)+(2*p/3)) ; 2nd phase
    vc .set $cos((2*p*fg*t)+(4*p/3)) ; 3rd phase

    Va .float va
    Vb .float vb
    Vc .float vc

    MOV AR1, #Va ; Initialize Register AR1 pointer with address of Va
    MOV AR2, #Vb ; Initialize Register AR2 pointer with address of Vb
    MOV AR3, #Vc ; Initialize Register AR3 pointer with address of Vc
    ===============================================================================================================

    Than what's the auto-run label in the debugger options ( Tools -> Debug Options -> Auto Run and Launch Options=> Run to Symbol ) .
    So that my (.asm) source file can be auto-run (or Executing Go Main i.e Toolbars Option Run-> Go Main) .
  • The debugger will always set the entry point to _c_int00 (the program was built with a different entry point) . Auto-run is meant to run the program from the entry point to a label. But you don't need to do that. So all you need to do is disable the auto-run to main

    ki
  • Hii Ki,

    Setting the entry point to [ _c_int00] in place of [main], but not proceed to next step i.e auto-run.
    The Error shows:- C28xx: AutoRun: Target not run as the symbol "_c_int00:" is not defined

  • yes this is expected because in this case, you are supposed to disable the "On program load or reset" checkbox (or leave the auto-run field blank). The debugger sets the program counter to _c_int00 on its own. The auto-run is to run to a label AFTER _c_int00. Since you are already at _c_int00, enabling auto-run to _c_int00 will run the program and give you the message you saw because it cannot reach _c_int00 after that point.

    Basically disable auto-run.