AnsweredAssumed Answered

How do I merge the code from STM32CubeMX with HAL-libraries from the System Workbench project wizard?

Question asked by J.Tobbe on Sep 7, 2016
Latest reply on Sep 7, 2016 by d-chris
Hi.

Hope this will not be a double post. I sent it earlier but got no confirmation whatsoever that it was ever submitted.

I've got the STM32F746G-DISCO board and I'm using the System Workbench IDE and STM32CubeMX for initialization code. The HAL libraries that come with the System Workbench project wizard look different and seem to be more easy to use than the corresponding libraries that can be imported from STM32CubeMX.

Since the "import" function in System Workbench seems to always create a new project rather than adding code to an existing one I find a need to merge the STM32CubeMX code with code generated by the System Workbench project wizard.

The pathnames are different and when I tried to manually merge the projects by simple copy the files there were conflicts and problems that appeared in the resulting project.

A project generated by the project wizard in System Workbench has a folder named "Utilities" which contains a lot of useful headers and sourcecode. An example is the header file stm32746g_discovery_lcd.h which does not come with the code generated from STM32CubeMX. The corresponding header file for the LCD generated by STM32CubeMX is named stm32f7xx_hal_ltdc.h and appears to be less easy to use than the  stm32746g_discovery_lcd.h header file.

I might be doing something wrong or this might exclusively be a System Workbench issue.

Outcomes