cancel
Showing results for 
Search instead for 
Did you mean: 

usart.h / usart.c and the gpio.h / gpio.c files are missing

FLamb.2
Associate II

I am using a Nucleo F091RC.

When I create a new project, the

.../Inc/usart.h

.../Src/usart.c

.../Inc/gpio.h

.../Src/gpio.c

files are missing.

The button on the board is declared as GPIO_Input

The LED on the board is declared as GPIO_Output

PA2 is declared as USART2_TX

PA3 is declared as USART2_TX

When will the files appear in the folders?

1 ACCEPTED SOLUTION

Accepted Solutions

Hello FLamb.2,

STM32CubeMX tool offers you the possibility to whether generate the peripheral initialization in separate .c/.h files or keep all peripheral initialization in the main.c file. In fact you can check "Generate peripheral initialization as a pair of .c/.h files per peripheral" option under Project Manager/Advanced Settings panel as showed in the attached screenshot.

0693W000006IBMIQA4.png 

Hope this answers your question.

If yes, please click on the Select as Best button on my reply . This will help other members of the community find this solution more quickly.

Khouloud.

View solution in original post

1 REPLY 1

Hello FLamb.2,

STM32CubeMX tool offers you the possibility to whether generate the peripheral initialization in separate .c/.h files or keep all peripheral initialization in the main.c file. In fact you can check "Generate peripheral initialization as a pair of .c/.h files per peripheral" option under Project Manager/Advanced Settings panel as showed in the attached screenshot.

0693W000006IBMIQA4.png 

Hope this answers your question.

If yes, please click on the Select as Best button on my reply . This will help other members of the community find this solution more quickly.

Khouloud.