ARMCC: Possible reason for Error: C9912E
Information in this knowledgebase article applies to:
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... linking... 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
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
of your data.