Keil Logo

ARMCC: Possible reason for Error: C9912E

Information in this knowledgebase article applies to:

  • MDK-ARM Cortex-M only (not MDK-Lite, MDK-Standard, MDK-Basic or MDK-Professional)


When I compile my project or an example project for Freescale Cortex-M0 or Silicon Laboratories Cortex-M3 devices, I get this error message from the linker:

compiling MySourceFile.c...
build\MyProject.axf: Error: C9912E: No --cpu selected

In the µVision dialog 'Options for Target - Linker - Linker control string' I see that the command line option '--cpu Cortex-M3' or '--cpu Cortex-M0+' is passed to the linker. What could be the reason for this error?


This problem only occurs when you use a linker scatter file that needs to be preprocessed with the ARMCC compiler and when a MDK-Cortex-M license is used. A scatter file is preprocessed by ARMCC when it starts with the following line:

#! armcc ...


There is an easy workaround for this problem. You just need to add the compiler directive
--cpu NameOfTargetCPU to your scatter file. NameOfTargetCPU depends on your microcontroller and can be Cortex-M0, Cortex-M0+, Cortex-M3 or Cortex-M4.

To open the scatter file click on "Edit" in 'Options for Target - Linker' dialog and close the dialog afterwards. Now you can edit the scatter file in µVision editor. Please do not forgot to save your changes.

Example for Silicon Laboratories devices:

#! armcc -E -I.


#! armcc -E -I. --cpu Cortex-M3

Example for Freescale devices:

#! armcc -E


#! armcc -E --cpu Cortex-M0+


This shortcoming will be fixed in one of the next MDK versions.


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.