Keil Logo

µVISION: Create Library and Application in One Project


Information in this article applies to:

  • µVision, all versions

QUESTION

I like to generate a Library and an executable application within one µVision project. 

I know that it is easy to generate a Library out of a project, but I want to generate some files of my project as Library without splitting the project. 

Is this possible?

ANSWER

Yes, it is possible. Just follow these steps:

  • Add a target and a group for the Library to the project. For example, add the target Library and file group Library.
  • Move the source files that you want in the Library to the new Library file group. Then, right-click on this file group and open the Options - Properties dialog and disable the option Include in Target Build.
  • Select the Library target and use the Options — Properties dialog to disable Include in Target Build for all other file groups. Now you have two targets where all the file groups are excluded from each other's target.
  • In the Library target, open Options for Target — Output, enter the Library name under Name of Executable, and select Create Library. Then, build the Library target to generate the Library file.
  • Select the other target and add the Library file that you have just created to any file group other than Library. Now you can generate the executable application from this target.

Now you can generate a Library and an executable application within the same project.

MORE INFORMATION

  • Getting Started User's Guide, Chapter 4: Creating Applications

SEE ALSO

Last Reviewed: Tuesday, February 23, 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.