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.

Getting errors in assembly file

Other Parts Discussed in Thread: OMAP-L137

Hello,

I am trying to port assembly code written in Code Sourcery to CCSv5.1. I resolved most of the errors which i am getting while doing so but

still some are there. my code is attached in this post and below are the errors which i am getting on following lines:

.if $isdefed("__thumb2__") || $isdefed("__ARM_ARCH_6M__") || $isdefed("__ARM_ARCH_6SM__")                          // illlegal mnemonic specified

.if (THUMB = 1)                                                                                                                                                                                  // illlegal mnemonic specified  & Symbol .if has already been defined

.else                                                                                                                                                  // Symbol .else has already been defined

b _start_addr                                                                                                                                     // Symbol .else has already been defined

.endif

 Please help to resolve these errors. I am working on OMAP-L137 in that for ARM 9 processor.

Regards,

Priya

HST-reset.asm
  • Most likely you need to add whitespace before ".if", ".else", etc.  The only things that can legally be in the first column are labels and comments.  Directives (".if") and mnemonics ("b") must be indented at least one space.

  • Thanks, my most of the error had gone now. But still i am getting some errors in below .if conditions

    .if $isdefed("__thumb2__") || $isdefed("__ARM_ARCH_6M__") || $isdefed("__ARM_ARCH_6SM__")

    these errors are like

    1. Unexpected trailing operands.
    2. Unmatched .if directive
    3. Absolute, well defined integer value expected
    4. The following symbols are undefined: $isdefed.

    I am working on OMAP-L137 in that we are coding for ARM9 so i had selected ARM9 as my target.

    Thanks,

    Priya

  • The assembler expression syntax does not include the logical operations || and &&.  You can use the binary operations | and & instead.  Note the binary operations do evaluate both operands in every case.  This is unlike the logical operations, where the second operand is evaluated only if the result of evaluating the first operand requires it. 

    Thanks and regards,

    -George

  • For ARM, you may need to double-up the dollar signs, as follows:

     .if $$isdefed("__thumb2__") | $$isdefed("__ARM_ARCH_6M__") | $$isdefed("__ARM_ARCH_6SM__")