ARM Technical Support Knowledge Articles

HOW TO CREATE ASSEMBLY FILES FROM C FILES

Applies to: General Topics

Answer


Information in this article applies to:


QUESTION

How do I create an assembler file from my C source file?

ANSWER

Use the SRC directive to create assembler output from the C compiler. The SRC directive causes the compiler to generate an .SRC file with the same name as your C file. You may then assemble the .SRC file with the assembler. Note that if you make changes to the .SRC file, you should rename it to .A51 or .A66 since re-compiling the C file may overwrite the .SRC file.

You may use the SRC directive as the first line in the file. For example:

#pragma src
.
.
.

Or, you may use it on the command line:

c51 myfile.c src

c166 newfile.c src

MORE INFORMATION

SEE ALSO

Article last edited on: 2008-03-10 02:38:45

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential