Add a source file to the project in keill5

1. Create a new folder under the USER file in the project, and create two files xxx.c and xxx.h under the file;

2. Fill the content in the xxx.h file as shown below:

3. Right-click the mouse in the project display window of keil and click the option of adding an existing source file, and then select the file in xxx.c in the folder you just created, as shown in the following figure:

 

4. Click the configuration icon in the keil interface, then select the C / C ++ option, click the include paths option, add your own new header file xxx.h file, and add your own header file path when in the project, as shown in the following picture:

 

5. Click the compile button in the project, the source file and header file are successfully added to the project, and other source files can refer to the functions defined in the source file.

Published 2 original articles · won 4 · views 3215

Guess you like

Origin blog.csdn.net/qq_27630885/article/details/89849934