ARM Technical Support Knowledge Articles

TARGETING AN 8051

Applies to: C251 C Compiler

Answer


Information in this article applies to:


QUESTION

Using the C251 compiler, is it possible to target an 8051 microcontroller? I was thinking of converting my C code to assembler using the SRC directive, then assembling it with the NO251 directive. Will this work?

ANSWER

No, this won't work. You may use the A251 assembler along with the NO251 directive to generate code for an 8051, however, you must not use any of the features that are present in a 251 and are not present in an 8051.

When you generate assembly code from C code using the compiler, it takes advantage of the 251 only features to generate the best code. Therefore, it is not possible to assemble the generated file for an 8051.

MORE INFORMATION

Article last edited on: 2005-07-15 13:22:26

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