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.

build error in TMS320C5416 assembly language

hi i have CCS 3.3 and i want to compile and run assembly language program of TMS320C5416 processor on simulator. my CCS 3.3 have TMS320C5416 simulator target but not DSK.would that cause any problem?

now, when build i am getting lot errors as:

"test.asm", ERROR!   at line 2: [E0002] Invalid mnemonic specification

"test.asm", ERROR!   at line 7: [E0300] Symbol STM has already been defined.

i have tried to compile given code:

.mmregs
.global _c_int00
.text

_c_int00:
STM #10H, AR2
STM #410H, AR1
LD #0H, A
SSBX SXM

START:
ADD *AR1+, A
BANZ START, *AR2-
NOP

.end

steps that i have followed is simply created new project and added asm file in source and build. not made any other changes !

what other changes have to be done?some library file needed to be added or some BSP etc.

please tell about those files and where to add them to get things working.

thank you

  • You must add whitespace to the beginning of every line that is not a label, like so:

            .mmregs
            .global _c_int00
            .text
    
    _c_int00:
            STM #10H, AR2
            STM #410H, AR1
            LD #0H, A
            SSBX SXM
    
    START:
            ADD *AR1+, A
            BANZ START, *AR2-
            NOP
    
            .end
  • hi

    thanks for your reply.it worked !!

    but now i am getting another warnings while compiling for sine wave. how to remove them. these are the warnings i got:
    <Linking>
    >> warning: creating output section COSINE without SECTIONS specification
    >> warning: creating output section STACK without SECTIONS specification
    >> warning: creating output section CODE without SECTIONS specification
    >> warning: entry point symbol _c_int00 undefined

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

    and here's the code for sine wave:

    FREQ1000 .set 1486
    FREQ1750 .set 2600
    FREQ2000 .set 2972
    FREQ3000 .set 4458
    FRAME_SIZE .set 64
        .mmregs
        .include "cos256_tbl.inc"
        .global COSINE_BUFFER
        .global FREQ_BUFFER
        .bss TEMP,1
        .bss FREQ_BUFFER,128
        .bss COSINE_BUFFER,257
        .bss _FREQ_STEP,1
        .bss _INIT_PHASE,1
        .def FREQ
    STK .usect "STACK",100
        .mmregs
        .sect "CODE"
    FREQ:
        SSBX OVM
        SSBX SXM
        SSBX FRCT
        NOP
        NOP
        STM #STK+100H,SP
        STM #001EH,PMST
        ST #FREQ1000,*(_FREQ_STEP) ;
        ST #0,*(_INIT_PHASE) ;
        STM #FREQ_BUFFER,AR3 ;
        CALL COPY_COS_TBL ;
        CALL GEN_FREQ ;
    LOOP:
        B LOOP ;

    GEN_FREQ:
        STM #FRAME_SIZE-1,BRC ;
        RPTB sine1-1
        LD *(_FREQ_STEP),A ;
        ADD *(_INIT_PHASE),A ;A=PRESENT PHASE
        STL A,*(_INIT_PHASE) ;SAVE PRESENT PHASE
        SUB #4000H,A ;SUB PI/2 FOR SINE
        ABS A ;Acc CONTAINS THE OFFSET
        STL A,*(TEMP) ;
        LD *(TEMP),9,A ;
        STH A,*(TEMP) ;
        LD *(TEMP),A ;
        ABS A ;
        ADD #COSINE_BUFFER,A ;
        STLM A,AR2 ;
        nop ;
        nop ;
        LD *AR2,A ;
        STL A,*AR3+ ;

    sine1:
        NOP ;
        RET ;
    COPY_COS_TBL:
        STM #COSINE_BUFFER,AR2
        RPT #257-1
        MVPD #COSOFF,*AR2+
        RET

    what's the problem now?