Keil Logo

GCC: µVision Treats Library File as Assembly Ffile


Information in this article applies to:

  • GNU C Compiler for Arm Version 3.03
  • GNU C Compiler for Arm Version 3.22

QUESTION

The GCC linker creates Arm libraries with an .a extension. However an *.a file extension is treated as an assembly file by µVision3. So the assembler tries to assemble any Arm library file included in the project. 

How do I correct this?

ANSWER

The environment settings must be changed for your project in order for the libraries to be linked correctly. Go to Project -> 'Components, Environment and Books' -> 'Folders/Extensions' tab. There is a box labeled 'Default File Extensions'. Remove *.a from the 'Asm Source' Section, and add *.a to the 'Library' section. Now all *.a files will be treated as library files for this project.

An alternative solution is to add the ARM library file to the project workspace window. To change the file association, right click on the ARM library file, and select 'Options for File'. On the 'Properties' tab, change the file type from 'Assembly language file' to 'Library file'. µVision3 will now treat this file as a library file. Each Arm library file added in this way must have the file type changed in this fashion.

SEE ALSO

Last Reviewed: Tuesday, January 12, 2021


Did this article provide the answer you needed?
 
Yes
No
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.