Keil Logo


Information in this article applies to:

  • C251 Version 2.14


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?


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.


  • Refer to SRC in the Cx51 User's Guide.


The following Discussion Forum threads may provide information related to this topic.

Last Reviewed: Wednesday, January 25, 2017

Did this article provide the answer you needed?
Not Sure
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.