This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Assembly File Creation From C Source File

Hi, I am Practicing Assembly Language Programming for ARM7TDMI Architecture.
I want to generate the Assembly Source code File for my input C source File
(Like Listing File Generation).Is it Possible in Keil.If yes mean,What all
are the configuration i have to do in target option Tab.

Thanks in Advance,
Shanmugam.s

Parents
  • Information in this article applies to:

    RealView Compiler Version 3
    QUESTION
    How do I create an assembler file from my C source file?

    ANSWER
    Use the --asm control to create assembler output from the C compiler. The --asm control causes the compiler to generate an .S file with the same name as your C file. You may then assemble the .S file with the assembler.

    The --asm control is entered in µVision under Project — Options — C/C++ tab, Misc Controls. Also disable the option Project — Listing — C Compiler Listing since this uses a different output.

    The Assembly file will have a .ASM extension, and will be in your listing file folder for your project.

    =====================================================================================

    i have used the above mentioned setting in keil for generating the asm source file from c source file but it generating the error given below

    Unrecognized option -S or --asm error

Reply
  • Information in this article applies to:

    RealView Compiler Version 3
    QUESTION
    How do I create an assembler file from my C source file?

    ANSWER
    Use the --asm control to create assembler output from the C compiler. The --asm control causes the compiler to generate an .S file with the same name as your C file. You may then assemble the .S file with the assembler.

    The --asm control is entered in µVision under Project — Options — C/C++ tab, Misc Controls. Also disable the option Project — Listing — C Compiler Listing since this uses a different output.

    The Assembly file will have a .ASM extension, and will be in your listing file folder for your project.

    =====================================================================================

    i have used the above mentioned setting in keil for generating the asm source file from c source file but it generating the error given below

    Unrecognized option -S or --asm error

Children