2022-01-04 08:33 AM
When I create a new project in STM32CubeIDE with the use of a configuration (.ioc) file, configure peripherals, and generate code, all handlers (such as I2C_HandleTypeDef, UART_HandleTypeDef, QSPI_HandleTypeDef, DMA_HandleTypeDef, etc.) and their initialization functions are placed in main.c file.
Is there a way to automatically split the code into multiple pairs of headers and source files (let's say, a header-source pair for UART, a header-source pair for I2C, etc.)?
I would like to define some custom parameters and functions related to my peripherals. Of course, I can create additional headers and source files. I would just prefer to group them all together without producing multiple files.
Thank you.
Solved! Go to Solution.
2022-01-04 08:46 AM
> Is there a way to automatically split the code into multiple pairs of headers and source files (let's say, a header-source pair for UART, a header-source pair for I2C, etc.)?
Yes. See the screenshot here:
2022-01-04 08:46 AM
> Is there a way to automatically split the code into multiple pairs of headers and source files (let's say, a header-source pair for UART, a header-source pair for I2C, etc.)?
Yes. See the screenshot here:
2022-01-04 08:51 AM
Thank you a lot! It helped, my issue is resolved.
2022-07-26 10:24 AM
thanks!