Tutorial: Adding library header in uVision
Last updated
Last updated
This tutorial explains how to include header files in uVision project.
Here, we assume that necessary header files are stored in your workspace ..\..\repos\EC\include\
Download tutorial source files
Include header files, located in a specific folder
save the downloaded header files in your workspace: ..\..\repos\EC\include\
You can refer to Tutorial: Create a Project with uVision
You can skip this if you already have the project opened.
Create a new program file as TU_CreateProject_main.c
. This is the same file used in Tutorial: Create a Project with uVision
We will modify the main program code as
We will learn how to include Library Path in your project
Open Options for Target (press ALT+F7) > C/C++ tab > Include Paths
Add the path location for the include files.
Right-click on the Project>Target1. Then, select Add Group
Rename the New Group by going to Manage Project Items.
Change the name such as "Include"
Right-Click on Project> Include> Options for Group 'New Group'
Options for Group 'Include' > C/C++ Tab> Include Paths> choose where the header files are located
Options for Group, NOT Target1
Project> Include > Add Existing Files to Group
Add your libraries, such ecSTM32_simple.h, ecSTM32_simple.c
Also, you can add more files