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.

CCS/TMS570LS0714: Illegal mnemonic specified in sys_startup.c

Part Number: TMS570LS0714
Other Parts Discussed in Thread: HALCOGEN

Tool/software: Code Composer Studio

Good morning,

I'm getting the error [E0002] Illegal mnemonic specified in the following piece of code in my sys_startup.c code:

...I don't understand. An error with a comment? Can anyone please explain?

My guess is that this is not the statement that's posing a problem. The file being identified as the source of the issue isn't my project's sys_startup.c, but rather a file in AppData\Local\Temp. Somehow that's being linked to line 320 in sys_startup.c, but the content that's linked there is definitely not representative of the error. How's that happening?

Thank you,
Pedro

  • The compiler generated assembly code for which the assembler issues an error diagnostic.  One of them is wrong.  For the C source file that is being built when this problem occurs, please follow the directions in the article How to Submit a Compiler Test Case.

    Thanks and regards,

    -George

  • Hi George,

    Thanks for the help! File attached.

    "C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.5.LTS/bin/armcl" -mv7R4 --code_state=32 --float_support=VFPv3D16 --include_path="C:/Users/pedro.campos/Code Composer Studio/eps-ti-bootloader-migration" --include_path="C:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.5.LTS/include" [*other stuff I had to leave out, sorry George*] -g --c11 --preproc_with_comment --preproc_with_compile --diag_warning=225 --diag_wrap=off --display_error_number --enum_type=packed --abi=eabi --obj_directory="Source/Bootloader/HALCoGen/source"  "../Source/Bootloader/HALCoGen/source/sys_startup.c"

    Thank you,
    Pedro

    sys_startup.pp.txt

  • It's not a problem with the TI ARM tools.  The problem is these lines ...

    asm ( " REQUIRE  update1"
          " DC32     g_ulUpdateStatusAddr"
          " DC32     0x8001500"
          " DC32     0x5c1e4ba3"
          " DC32     0x801fffc" );
    

    That asm statement injects those assembler directives into the assembly file generated by the compiler.  Those are IAR assembler directives.  The TI assembler does not support them.  You need to change them to TI ARM assembler directives.  To learn about them, please search the ARM assembler manual for the chapter titled Assembler Directives.

    I'm not sure what TI assembler directives are equivalent.  I think REQUIRE is similar to .symdepend.  And I think DC32 is similar to .word.  

    Another detail ... The TI compiler handles that string input to the asm statement such that it all ends up on one line in the generated assembly file.  You want them on separate lines.  So, add the newline escape sequence \n just before the closing " on each line.  

    Thanks and regards,

    -George

  • Hello George,

    Thank you for taking the time to write such a complete answer. Problem fixed!

    Best regards,
    Pedro