2019-05-22 06:32 AM
I am starting a project from scratch using STM32CubeIDE (new STM32 Project), I select my 32F429Discovery board and select Initialize all periph to defaults.
When the project opens in cubeMX, there is an error in the clock settings, and the graphics middleware is disabled. So I fix the clock and I enable the STemWin graphics framework on the LTDC interface.
Then I try to generate the code, it tells me I have errors in the graphics platform settings which I'm still trying to figure out why I need those BSP settings and what they are, when the board is using the LTDC. I had a project in a previous version of CubeMX that didn't have those settings, and my project worked just fine.
So I just ignore this part and I generate the code, but when I build, I get a bunch of undefinded references to the STemWin Library functions in the STemwin_wrapper.c file.
The old project had a ".a" file in "/middlewares/st/stemwin/lib" which is missing in the new one. The lib file is also missing from the linker libraries list in (project properties->c/c++ build->MCU GCC Linker->libraries), while my old project had the file and path listed there.
What am I missing? Why doesn't CubeMX copy this lib file along with all the other files? Is it because of those BSP settings that I ignored in CubeMX graphics platform settings?
I have not tried copying the library file manually and adding it to the linker list of libraries. I'm just trying to figure out why the new version of cubeMX (or cubeIDE) doesn't generate the project properly.
EDIT: After playing around with the project settings, I've been able to get my project to work but it wasn't "out of the box"
I had to fetch the library file "STemWin540_CM4_OS_GCC_ot_ARGB.a" from my old project. The file I downloaded from ST in the STemWin library files has number 532 instead of 540 and doesn't work. Added the file to the project linker libraries with the path and the project compiled without errors.
But the project still wasn't working. The BSP settings in CubeMX graphics tabs were actually to initialize the LCD using SPI (I didn't know that until now). All those settings have been correctly configured, but still the CubeMX doesn't generate the SPI initialization functions in the STemwin_wrapper.c file. I had to implement those manually to make the whole thing work. Functions like LCD_IO_INIT(), LCD_IO_WriteReg(), LCD_IO_WriteData() and LCD_IO_ReadData() don't contain any code generated by CubeMX, contrarily to my old project which had all these functions automatically generated.
Should I report this as a bug? Or am I still missing something?