cancel
Showing results for 
Search instead for 
Did you mean: 

How to add external files .c and .h files in STM32CubeIDE project

SIVAOAS
Associate II

How to add external files .c and .h files in STM32CubeIDE project ,can you please explain steps to add .c and .h files in STM32CUBEIDE project

1 ACCEPTED SOLUTION

Accepted Solutions
SofLit
ST Employee

Hello,

For .h files, you need to give the path(s) to that files as include paths:

Proprieties -> Settings -> MCC GCC compiler -> Include Paths:

SofLit_0-1720092773799.png

For .c file you need to drag and drop the file to the Project explorer at the level you want. You will get this message:

SofLit_1-1720093004615.png

Click OK. The file will be added to you project.

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

View solution in original post

2 REPLIES 2
SofLit
ST Employee

Hello,

For .h files, you need to give the path(s) to that files as include paths:

Proprieties -> Settings -> MCC GCC compiler -> Include Paths:

SofLit_0-1720092773799.png

For .c file you need to drag and drop the file to the Project explorer at the level you want. You will get this message:

SofLit_1-1720093004615.png

Click OK. The file will be added to you project.

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.