cancel
Showing results for 
Search instead for 
Did you mean: 

Best Practice for Using STM32Cube on Existing Project?

amoore
Associate II
Posted on July 31, 2014 at 01:18

I need to add USB Host (FS, MSC) capability to an existing project that's using a STM32F205 (my client wants the product to be able to read/write to a USB flash drive). Using STM32CubeMX v4.3 I created a new project, selected the FATFS and USB_HOST middleware, and the USB_OTG_FS IP, and then generated the source code. So far so good.

But is there a recommended way to integrate the resulting tree of files into an already existing project, avoiding conflicts with the existing code?
1 REPLY 1
stm32cube-t
Senior III
Posted on September 10, 2014 at 10:50

Hello Allen,

Please note that STM32CubeMX generated code uses the new embedded software librairies STM32Cube.

So the best approach, would be to use STM32CubeMX to configure the pinout, clock tree, peripheral and middleware configurations (matching your client's configuration) and generate the corresponding project. Then the client's application code will need to be merged in: use STM32CubeMX pre-defined user sections in the generated code for this purpose.

Best regards