cancel
Showing results for 
Search instead for 
Did you mean: 

Migrating .ioc created with Riverdi template 4.1.0 to CubeMX ver 1.16.0 STM32Cube FW_H7 V1.13.0, issues

LT64
Associate

Hello everyone,

I want to share some issues and their fixes when migrating the .ioc file that was created for the Riverdi 10" STM32 display with template 4.1.0 to the newer version of CubeMX ver 1.16.0, STM32Cube FW_H7 V1.13.0.

My environment is:

Target: Riverdi STM32 10" Display RVT101HVSNWC00-B

 TouchGFX 4.26.0, CubeMX ver 1.16.0 STM32Cube FW_H7 V1.13.0, CubeIDE ver. 1.19.0

1. The build in CubeIDE fails with multiple errors searching for the "cmsis_os2.h" file.
     Fix: Include paths are missing. Manually add the following include paths in both the Include Paths section of MCU GCC Compiler and MCU G++ Compiler (In CubeIDE)
     (Riverdi_101STM32H7_1_6_CM7-->Properties-->C/C++ Build--> Settings-->MCU GCC Compiler-->Include Paths)
       
     The paths to be included are:     " ../../../Drivers/CMSIS/RTOS2/Include" and  "../../../Drivers/CMSIS/Include"    
 
2.  The " freertos.c" file in Application/User/Core/ has a bug that prevents the build in CubeIDE.
      In line 87 has : void vApplicationStackOverflowHook(xTaskHandle xTask, char *pcTaskName);
while in line 104 has
/* USER CODE BEGIN 4 */

void vApplicationStackOverflowHook(xTaskHandle xTask, signed char *pcTaskName)

 

FIX: Setting line 105 to void vApplicationStackOverflowHook(xTaskHandle xTask, char *pcTaskName) (remove the "signed") fixes the problem permanently.

 
3.   CM4 ( (Riverdi_101STM32H7_1_6_CM4) fails to build. Although the project builds for CM7 and runs, if someone does not feel comfortable with the "red marks."  below is the fix:
       Fix:  In Riverdi_101STM32H7_1_6_CM4-->Properties-->C/C++ Build--> Settings-->MCU GCC Compiler-->Preprocessor change in Defined symbols "STM32H747xx" to "STM32H757xx"
                Do the same in In Riverdi_101STM32H7_1_6_CM4-->Properties-->C/C++ Build--> Settings-->MCU G++ Compiler-->Preprocessor
 
4.  I removed LPTIM2 and DFSDM1 ( I use the pins for other purposes). Build fails asking for the "stm32h7xx_hal_lptim.h" and the "stm32h7xx_hal_dfsdm.h" files.
     Workaround Fix: 
  I created a new project, where LPTIM2 and DFSDM1 are present (not disabled).
  I manually copied from NewProject / Drivers / STM32H7xx_HAL_Driver / src the stm32h7xx_hal_lptim.c and stm32h7xx_hal_dfsdm.c files to MyProject / Drivers / STM32H7xx_HAL_Driver / src.
  I have done the same for the  "stm32h7xx_hal_lptim.h" and the "stm32h7xx_hal_dfsdm.h" files ( using inc folders, of course).
 5. This version of CubeMX, although it starts with TIM2 interrupt priority set to 4, if we change anything in the timers section, then it sets the TIM2 interrupt priority to 15. As a result, the code builds successfully, but you end up with a black screen. So, before generating code in CubeMX, it is good practice to check the TIM2 interrupt priority (In System->NVIC1) and change it to 4 if needed.
 For cases 1,2 and 3, the fix is permanent. We have to do it only once. 
 But for cases 4 and 5, we have to do it every time we generate the code from CubeMX.
I hope that all the above will be useful to someone.
Stay safe and be well.
1 ACCEPTED SOLUTION

Accepted Solutions
Peter BENSCH
ST Employee

Welcome @LT64, to the community!

thank you very much for your contribution!

Since you did not ask a question and it apparently concerns the solution to a problem, your post cannot be marked as the Accepted Solution. Therefore, I will take the liberty of marking my post as the solution instead, but I kindly ask all readers who come here to read @LT64's post as the actual answer.

Regards
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

2 REPLIES 2
Peter BENSCH
ST Employee

Welcome @LT64, to the community!

thank you very much for your contribution!

Since you did not ask a question and it apparently concerns the solution to a problem, your post cannot be marked as the Accepted Solution. Therefore, I will take the liberty of marking my post as the solution instead, but I kindly ask all readers who come here to read @LT64's post as the actual answer.

Regards
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Thank you, Peter

As a new member of the community, I did not know where exactly to share all these.

Thank you for making it more accessible to other users.

Regards 

Lazaros