cancel
Showing results for 
Search instead for 
Did you mean: 

Where are up to date examples of using BSP_LCD functions on the stm32H743-eval? There is little I can find searching the net and this forum and what does exists is hopeless dated.

GreenGuy
Lead
 
1 ACCEPTED SOLUTION

Accepted Solutions
GreenGuy
Lead

Finally got it to work.

Had to uncheck the generate code for MX_LTDC_Init in the CubeMX Project Manager/Advanced Settings along with unchecking the LTDC global interrupts in the LTDC category NVIC settings since this adds interrupt handlers to the stm32h7xx_it.c file which require a LTDC_HandleTypeDef to have been created. Also had to lower the LCD clock value to 25MHz.

View solution in original post

16 REPLIES 16
KDJEM.1
ST Employee

Hello @Community member​,

You can download the BSP and the display examples using the BSP_LCD functions from the latest release of STM32CubeH7 (version 1.11.0) MCU package:

  • STM32Cube_FW_H7_V1.11.0\Projects\STM32H743I-EVAL\Examples\BSP
  • STM32Cube_FW_H7_V1.11.0\Projects\STM32H743I-EVAL\Applications\Display\LTDC_PicturesFromSDCard
  • STM32Cube_FW_H7_V1.11.0\Projects\STM32H743I-EVAL\Applications\Display\LTDC_Paint
  • STM32Cube_FW_H7_V1.11.0\Projects\STM32H743I-EVAL\Applications\Display\LTDC_AnimatedPictureFromSDCard

When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

Kaouthar

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.

GreenGuy
Lead

In the MCU package referenced there is a BSP example but it does not reveal how to use the LCD as a print device as the older utilities used to provide. The same goes for LTDC example. the MCU package also has a Utility folder which contains an lcd and Lcd_Trace folder, neither containing anything familiar with respect to the older utilities that would print to the lcd using the print function.

Where did that support go?

GreenGuy
Lead

Keep in mind I am using CubeMX to generate the base code. This seems to be an issue since the eval BSP files, namely stm32h743_eval_lcd, conflict with the code in the utilities.

GreenGuy
Lead

Well this just keeps getting worse. One of my problems is that after I added the BSP Components and STM32H743-EVAL folders to my project created bu CubeMX based on the STM32H743-eval board, I added the include paths to the project but forgot that operation does not include the code paths to the Properties>C.C++ General>Paths and Symbols Source Location Tab. Once I got those added, I am getting all kinds of errors for undeclared functions and macros in the utility code for ldc_trace.c Yet if I hilight the offending item and right click to select Open Declaration, the IDE opens the correct file to reveal the item and its definition.

GreenGuy
Lead

OK, found a bug.

In the repository for STM32Cube_FW_H7_V1.11.0, in the Utilities folder, in Common resides the uilities_conf_template.h. The defines under /* Define the LCD TRACE Colors */, starting at line 108 are wrong. They reference defines from stm32_lcd.h but are spelled wrong and therefore cause undefined errors. For example at line 108:

#define    LCD_TRACE_BACKGROUND_COLOR          UTILS_LCD_COLOR_WHITE

should be:

#define    LCD_TRACE_BACKGROUND_COLOR          UTIL_LCD_COLOR_WHITE

(no "S" in "UTILS..."

this goes back to V1.9.0 but that is as far as I have for H7.

I found this comparing some of the application examples for H743 where the uilities_conf.h files have the correct spelling.

GreenGuy
Lead

I am still getting a lot conflicts between the LCD_trace in Utilities and cube MX code for MX_LTCD_Init.

So is someone from ST going to answer the orginal question of how are we supposed to use the LCD trace utilities with code generated from cube MX without having to re-write the trace utility code?

GreenGuy
Lead

This is such a time sink trying to figure out how to use the Utility/LCD_Trace functions in conjunction with a project from CubeMX using the stm32H743i-Eval board as a board selection, and having enabled the SDMMC, LTCD, and Azure RTOS. Adding the Utilities and the BSP/stm32h743i-eval drivers to the project conflicts with the code the CubeMX generates. So how is this supposed to work???

GreenGuy
Lead

Following the documentation in UM2298 I have verified that my project conforms to the information found therein. I created a folder called BSP under drivers and have set all the correct properties for inclusion and source paths. I did the same for Utilities. the BSP files and Utilities I imported from STM32Cube_FW_H7_V1.11.0. I have not written any calls to the BSP or Utility functions. When I compile I get the following errors:

Description   Resource   Path   Location   Type

./Drivers/BSP/STM32H743I-EVAL/stm32h743i_eval_qspi.o:/mnt/Data/DevData/STM32CubeIDE/Workspace_1-11-0/STM32H743-EVAL-Utils/Debug/../Drivers/BSP/STM32H743I-EVAL/stm32h743i_eval_qspi.c:79: multiple definition of `hqspi'; ./Core/Src/main.o:/mnt/Data/DevData/STM32CubeIDE/Workspace_1-11-0/STM32H743-EVAL-Utils/Debug/../Core/Src/main.c:75: first defined here   STM32H743-EVAL-Utils         C/C++ Problem

./Utilities/lcd/stm32_lcd.o:/mnt/Data/DevData/STM32CubeIDE/Workspace_1-11-0/STM32H743-EVAL-Utils/Debug/../Utilities/lcd/../Fonts/font12.c:1380: multiple definition of `Font12'; ./Utilities/Fonts/font12.o:/mnt/Data/DevData/STM32CubeIDE/Workspace_1-11-0/STM32H743-EVAL-Utils/Debug/../Utilities/Fonts/font12.c:1380: first defined here   STM32H743-EVAL-Utils         C/C++ Problem

./Utilities/lcd/stm32_lcd.o:/mnt/Data/DevData/STM32CubeIDE/Workspace_1-11-0/STM32H743-EVAL-Utils/Debug/../Utilities/lcd/../Fonts/font12.c:47: multiple definition of `Font12_Table'; ./Utilities/Fonts/font12.o:/mnt/Data/DevData/STM32CubeIDE/Workspace_1-11-0/STM32H743-EVAL-Utils/Debug/../Utilities/Fonts/font12.c:47: first defined here   STM32H743-EVAL-Utils         C/C++ Problem

./Utilities/lcd/stm32_lcd.o:/mnt/Data/DevData/STM32CubeIDE/Workspace_1-11-0/STM32H743-EVAL-Utils/Debug/../Utilities/lcd/../Fonts/font16.c:1760: multiple definition of `Font16'; ./Utilities/Fonts/font16.o:/mnt/Data/DevData/STM32CubeIDE/Workspace_1-11-0/STM32H743-EVAL-Utils/Debug/../Utilities/Fonts/font16.c:1760: first defined here   STM32H743-EVAL-Utils         C/C++ Problem

./Utilities/lcd/stm32_lcd.o:/mnt/Data/DevData/STM32CubeIDE/Workspace_1-11-0/STM32H743-EVAL-Utils/Debug/../Utilities/lcd/../Fonts/font16.c:47: multiple definition of `Font16_Table'; ./Utilities/Fonts/font16.o:/mnt/Data/DevData/STM32CubeIDE/Workspace_1-11-0/STM32H743-EVAL-Utils/Debug/../Utilities/Fonts/font16.c:47: first defined here   STM32H743-EVAL-Utils         C/C++ Problem

./Utilities/lcd/stm32_lcd.o:/mnt/Data/DevData/STM32CubeIDE/Workspace_1-11-0/STM32H743-EVAL-Utils/Debug/../Utilities/lcd/../Fonts/font20.c:2139: multiple definition of `Font20'; ./Utilities/Fonts/font20.o:/mnt/Data/DevData/STM32CubeIDE/Workspace_1-11-0/STM32H743-EVAL-Utils/Debug/../Utilities/Fonts/font20.c:2139: first defined here   STM32H743-EVAL-Utils         C/C++ Problem

./Utilities/lcd/stm32_lcd.o:/mnt/Data/DevData/STM32CubeIDE/Workspace_1-11-0/STM32H743-EVAL-Utils/Debug/../Utilities/lcd/../Fonts/font20.c:45: multiple definition of `Font20_Table'; ./Utilities/Fonts/font20.o:/mnt/Data/DevData/STM32CubeIDE/Workspace_1-11-0/STM32H743-EVAL-Utils/Debug/../Utilities/Fonts/font20.c:45: first defined here   STM32H743-EVAL-Utils         C/C++ Problem

./Utilities/lcd/stm32_lcd.o:/mnt/Data/DevData/STM32CubeIDE/Workspace_1-11-0/STM32H743-EVAL-Utils/Debug/../Utilities/lcd/../Fonts/font24.c:2516: multiple definition of `Font24'; ./Utilities/Fonts/font24.o:/mnt/Data/DevData/STM32CubeIDE/Workspace_1-11-0/STM32H743-EVAL-Utils/Debug/../Utilities/Fonts/font24.c:2516: first defined here   STM32H743-EVAL-Utils         C/C++ Problem

./Utilities/lcd/stm32_lcd.o:/mnt/Data/DevData/STM32CubeIDE/Workspace_1-11-0/STM32H743-EVAL-Utils/Debug/../Utilities/lcd/../Fonts/font24.c:43: multiple definition of `Font24_Table'; ./Utilities/Fonts/font24.o:/mnt/Data/DevData/STM32CubeIDE/Workspace_1-11-0/STM32H743-EVAL-Utils/Debug/../Utilities/Fonts/font24.c:43: first defined here   STM32H743-EVAL-Utils         C/C++ Problem

./Utilities/lcd/stm32_lcd.o:/mnt/Data/DevData/STM32CubeIDE/Workspace_1-11-0/STM32H743-EVAL-Utils/Debug/../Utilities/lcd/../Fonts/font8.c:1000: multiple definition of `Font8'; ./Utilities/Fonts/font8.o:/mnt/Data/DevData/STM32CubeIDE/Workspace_1-11-0/STM32H743-EVAL-Utils/Debug/../Utilities/Fonts/font8.c:1000: first defined here   STM32H743-EVAL-Utils         C/C++ Problem

./Utilities/lcd/stm32_lcd.o:/mnt/Data/DevData/STM32CubeIDE/Workspace_1-11-0/STM32H743-EVAL-Utils/Debug/../Utilities/lcd/../Fonts/font8.c:47: multiple definition of `Font8_Table'; ./Utilities/Fonts/font8.o:/mnt/Data/DevData/STM32CubeIDE/Workspace_1-11-0/STM32H743-EVAL-Utils/Debug/../Utilities/Fonts/font8.c:47: first defined here   STM32H743-EVAL-Utils         C/C++ Problem

If I exclude the utilities/lcd, utilities/lcd_trace, and bsp/stm32H743i-eval folders from the build I get 0 errors. The imports of the utilities and bsp packages should be very straightforward as I have done this before with other boards such as stm32f429-disco with no problems. However, it does not work with stm32h743-eval and I suspect that ST has a problem. I have already noted in an earlier post a minor issue, but now I believe it goes much deeper.

GreenGuy
Lead

I am attaching the archived project.