2021-01-11 02:45 AM
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?
Solved! Go to Solution.
2021-01-11 03:03 AM
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.
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.
2021-01-11 03:03 AM
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.
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.