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.

TMS320VC5509A: The assembly file reports an error

Part Number: TMS320VC5509A

Hi Team,

Here's an issue from the customer may need your help:

Self-built project import files encounter assembly file error reporting: 

  • Statements in comments are also compiled as errors.
  • Some of the assembly instructions in 5509 are not recognized.
  • The # semicolon before the immediate number, and some missing brackets may also be reported. 

Could you help check this case? Thanks.

Best Regards,

Cherry

  • Hi Cherry,

    C5509 assembly code uses the ';' at the beginning of a line for comment.the line 1 and line 28 in the code segment is not follow that convention.

    Make sure the suffix f the assembly code file is *.asm

    Best regards,

    Ming

  • Hi Ming,

    Thanks for your support.

    After modified, the DMA settings begin to report large errors. The header file is also referenced, but it will report the error: not recognized, and pressing CTRL and click will be able to link to the corresponding header file. 

    #include <csl.h>
    #include <csl_mcbsp.h>
    #include <csl_dma.h>
    #include <csl_timer.h>
    #include <csl_mmc.h>
    #include <csl_irq.h>

    #include "register.h"
    #include "variable.h"
    #include "function.h"
    #include "mcbsp_initial.h"
    #include "wendu.c"
    #include "subfunction.c"
    #include "interrupt_function.c"
    #include "tistdtypes.h"

    The following 3 documents currently report errors: 

    1) In Subfunction.C.
    For example, ADCCTL = 0x8000; // Start ad conversion, channel 0
    do
    {
    temp_ADC=ADCDATA;

    The error here is that ADCCTL is not defined, and ADCCTL is actually defined in the header file register.h, why it cannot be recognized?

    2) The same is true in wendu.C.

    Volatile UINT32 delay;

    IODOR |= 0x02; // set to output state
    IODATA |= 0x02; // output high

    UINT32 is defined in tistdtypes.h as follows:  “ typedef unsigned long Uint32;”, but it still reports "not defined".

    3) In variable.h
    With the exception of Uint undefined error messages,

    Volatile UINT32 time_delay; // forward delay

    There is also an issue where the definition of the handle cannot be implemented, and the handle such as DMA_handle, which is defined in csl_dma.h, can also be undefined. 

    DMA_Handle myhDma, hDmaSend0,hDmaSend1;
    TIMER_Handle mhTimer0,mhTimer1;
    MMC_Handle mmc1;
    MMC_CardObj *card, cardalloc;

    The case here is that the h. file does not recognize parameters, statements, etc. that are defined in some of the other header files. Is there anything wrong with how the header file references? 

    The build environment is as follows:

    Thanks and Regards,

    Cherry

  • Hi Cherry,

    I saw two issues above:

    1. C55xxCSL\include does not have register.h. Where is it? Make sure the path is included.

    2. You said "UINT32 is defined in tistdtypes.h as follows:  “ typedef unsigned long Uint32;”" In fact, UINT32 is not the same as Uint32.

    Best regards,

    Ming

  • Hi Ming,

    1. C55xxCSL\include does not have register.h. Where is it? Make sure the path is included.

    The header file for the registers is written by the customer and is not in this CSL library. But the strange thing is Uint is already defined in tistdtypes.h in the CSL library.

    The customer links the header file, but it doesn't work well. Is there a good way to enable the desired header file path to be included?

    Thanks and Regards,

    Cherry

  • Hi Cherry,

    Yes, you can add a new include path in CCS by adding a new path in "include options":

    Best regards,

    Ming