cancel
Showing results for 
Search instead for 
Did you mean: 

Integrating touchGFX & STCube on STM32F429I-DISC with ARM-MDK

Chi
Associate II

Hello all, I tried to integrate touchGFX to ​STM32CubeMX and I'm using keil to complie all the files. The complication is successful yet mountains of errors occurs during linking ! All errors are of the same type like this:

Error: L6654E: Rejected Local Symbol .x refered to from non group member x.o (.iar.stackusage)

Please help! I think I'm almost there!

0690X000006CwNaQAK.png

1 ACCEPTED SOLUTION

Accepted Solutions
Chi
Associate II

​The problem is finally solved. Here I will list the related procedure.

  1. Enable DMA2D, LTDC, SDRAM, I2C(if you wanna touch control), FreeRTOS, CRC, SPI
  2. Make sure LCD clock is 6MHz and ili9341(screen driver) is enabled in GRAPHICS
  3. Make sure timebase source in SYS is NOT SysTick
  4. Make sure you have configured every parameter in GRAPHICS correctly, especially the platform settings, every pin should be defined properly.
  5. Locate the touchGFX exe in GRAPHIC so that you can execute it afterward BUT NOT NOW.
  6. Configure the project manager and press generate code.
  7. Confiure the keil project by adding a group containing discovery files: stm32f429i_discovery.c/h, stm32f429i_discovery_ts.c/h, stm32f429i_discovery_io.c/h
  8. Add extern "C" before MX_FREERTOS_Init() at main.c and void GRAPHICS_MainTask(void){} at BoardConfiuration.cpp.
  9. Delete one LCD_Delay() function in EITHER hal file OR discovery file, the latter is recommended.
  10. Compile the project and make sure it succeeds.
  11. Include stm32f429i_discovery_ts.h in TouchController.c and make the commented BSP functions code.
  12. Now it's ok to execute touchGFX in STCube and make your own GUI. IF you've already execute touchGFX at step 5, error as mine stated above might happen.

Hope this help.

Enjoy and goodluck!

View solution in original post

11 REPLIES 11
Mon2
Senior III

Yes. This is a well known fact. Suggest to wait for the bugs to be fixed.

Please take some time to read the many related topics.

Full details on the exact procedure are now posted in this forum for:

STM32F429 with IAR + TouchGFX 4.10 + CubeMX 5.0

STM32F429 with SW4STM32 + TouchGFX 4.10 + CubeMX 5.0

STM32F746 with SW4STM32 + TouchGFX 4.10 + CubeMX 5.0

There are a few more but complete articles on the use of IAR with other targets on the parent Draupner website.

However, Keil support remains broken at this time of writing for the above combination of tools.

Chi
Associate II

Thanks a lot for your comment. I agree that it might be a bug since L6654E is so rare that few solution is released currently.

I disabled touchgfx in STM32CubeMx and deleted all related c files. I enabled the framework again and the error comes to be:

"Error: L6242E: Cannot Link Object xx.o as its attributes are incompatible with the image attributes.   ... wchart-16 clashes with wchart-32."

These xx.os are all touchgfx objects. Hence enum length definition conflict between touchgfx lib and STM32CubeMX library might be the reason.

I have to switch to AC6 compiler and use command line options to unify their length or just shift to IAR/SW4STM32 (which can be a better solution)...

Mon2
Senior III

If you can consider IAR, you will be in very good shape. Also, be cautious about which target you will be using as all of these tools are difficult to stitch together but the above models are stable.

< permanent link on our server >

https://axxonshare.s3.amazonaws.com/my_combo_tutorial.zip

Chi
Associate II

Thank you for your sharing! It's rather impressive! I still worked on keil afterward and I switched to Arm Compiler Version 6.10.1. Here's the only error left:

469_touchGFX_interfacing_test\469_touchGFX_interfacing_test.axf: Error: L6683E: Merge Section TextFlashSection(texts.o) has an element size of zero

Furthermore, there're lots of touchGFX objects showing the warnings as below:

469_touchGFX_interfacing_test\469_touchGFX_interfacing_test.axf: Warning: L6776W: The debug frame in .debug_frame(stm32f4dma.o) does not describe an executable section.

as well as:

469_touchGFX_interfacing_test\469_touchGFX_interfacing_test.axf: Warning: L6869W: utils.o requested the Rogue Wave Standard C++ Library which has been removed from the product. This might cause link errors because libc++ is used instead.

Chi
Associate II

I can load the images now! But still need some efforts to make touchController work...I found that keil users should generate the code and compile it at first, before pressing the execute button of touchGFX.

Chi
Associate II

​The problem is finally solved. Here I will list the related procedure.

  1. Enable DMA2D, LTDC, SDRAM, I2C(if you wanna touch control), FreeRTOS, CRC, SPI
  2. Make sure LCD clock is 6MHz and ili9341(screen driver) is enabled in GRAPHICS
  3. Make sure timebase source in SYS is NOT SysTick
  4. Make sure you have configured every parameter in GRAPHICS correctly, especially the platform settings, every pin should be defined properly.
  5. Locate the touchGFX exe in GRAPHIC so that you can execute it afterward BUT NOT NOW.
  6. Configure the project manager and press generate code.
  7. Confiure the keil project by adding a group containing discovery files: stm32f429i_discovery.c/h, stm32f429i_discovery_ts.c/h, stm32f429i_discovery_io.c/h
  8. Add extern "C" before MX_FREERTOS_Init() at main.c and void GRAPHICS_MainTask(void){} at BoardConfiuration.cpp.
  9. Delete one LCD_Delay() function in EITHER hal file OR discovery file, the latter is recommended.
  10. Compile the project and make sure it succeeds.
  11. Include stm32f429i_discovery_ts.h in TouchController.c and make the commented BSP functions code.
  12. Now it's ok to execute touchGFX in STCube and make your own GUI. IF you've already execute touchGFX at step 5, error as mine stated above might happen.

Hope this help.

Enjoy and goodluck!

Mon2
Senior III

@Chi​ - many thanks for sharing!!

Your procedure may be the first working solution on this forum using the Keil compiler :)

Did you have to remove the duplicate LCD_Delay function?

Can you use the TouchGFX tool from STCube only 1 time or can repeatedly call from the GUI? My experience from a week or so ago was that you may use the GUI only once from STCube else all the work is reset to defaults. Perhaps an update has been applied already to fix this bug.

Will give this process a test when less tired. Thanks again!

Chi
Associate II

Sure, LCD_Delay() in the discovery file is the one recommended to remove. I forgot to mention this stuff...

Sorry actually I think I misunderstood your description about the BUG, I had thought you mean If I execute touchGFX in STCube more than once the entire gui work would be erased (quite scaring if it's true) ! However after practice I found out you mean that all the settings of the widget in the project would be reset to default and unfortnately it also happens to me...The bug hasn't been fixed yet, my mistake.

Many Thanks to your effort on IAR and SW4 as well, or I may have difficulties in configuring the touch controller part!

How can I apply similar steps for stm32f746-DISCO ??