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.

Compiler: ti-cgt-arm_18.12.1.LTS

Tool/software: TI C/C++ Compiler

Hello All,

I have a very strange issue, the executable (armcl.exe) doesn't compile any assembly file (.asm), doesn't understand any simple instruction like (MOV) except the (NOP) instruction.

After searching I have found that I should specify the architecture (-mv7R4), but nothing happens.

Any suggestions. 

Thanks in advance.

  • Please show a few lines of assembly code that do not build.  Also show exactly how you invoke the arm compiler shell armcl.

    Thanks and regards,

    -George

  • Thanks for your fast reply, here is the snapshots. 

  • Thank you.

    Remove the option --silicon_version=4.  It says to build for the old ARM7 CPU architecture.  And it overrides the -mv7R4 that appears first.

    That said, I still cannot reproduce the problem.  Whether I build with or without --silicon_version=4, I get a clean build.  Odd.

    If you want to continue to pursue it ... Please attach the file try_assembly.asm to your next post.  So the forum will accept it, add the file extension .txt to it.

    Thanks and regards,

    -George

  • I have tried to remove that option but the same errors appear. The most probable reason is the compiler version may have a problem.

    Please find the attached file.

    Thanks an advance.

    
    
    
    
    
    ADDEQ R2,R4,R5		 	; If the Z flag is set make R2:=R4+R5
    TEQS R4,#3 				; test R4 for equality with 3.
    						; (The S is in fact redundant as the
    						; assembler inserts it automatically.)
    SUB R4,R5,R7,LSR R2 	; Logical right shift R7 by the number in
    						; the bottom byte of R2, subtract result
    						; from R5, and put the answer into R4.
    MOV PC,R14 				; Return from subroutine.
    MOVS PC,R14 			; Return from exception and restore CPSR
    						; from SPSR_mode.

  • Thank you for sending the file.  I understand the problem now.

    Instructions cannot begin in the first column.  Only labels can begin in the first column.  Please search the ARM assembly tools manual for the sub-chapter titled Source Statement Format.

    Thanks and regards,

    -George

  • Hello George,

    Yes that was the mistake, it builds normally now.

    Thanks a lot for your help.