cancel
Showing results for 
Search instead for 
Did you mean: 

Issues of TouchGFX Generator 4.15.0 on STM32F746 Discovery Board, Toolchain Keil MDK

GWang.3
Associate III

I used TouchGFX generator 4.15.0 to create a simple project (from GUI Template) on STM32F746 Discovery board, inside TouchGFX generator, "Run Simulator", "Run on Target" and "Generate Code" all are working correctly. However, when I tried to open the generated project using Keil MDK ARM Toolchain, it cannot be compiled. I compared files between the KEIL compile error message and Touchgfx Generator "Run Target" log, there are some bugs for the "Generate Code" for the toolchain Keil MDK.

Some error messages from Keil MDK:

"no source": Error: #5: cannot open source input file "../touchgfx/generated/fonts/src/font_verdana_10_4bpp_0.cpp": No such file or directory

../touchgfx/generated/fonts/src/font_verdana_10_4bpp_0.cpp: 0 warnings, 1 error

compiling Font_verdana_20_4bpp_0.cpp...

"no source": Error: #5: cannot open source input file "../touchgfx/generated/fonts/src/font_verdana_20_4bpp_0.cpp": No such file or directory

../touchgfx/generated/fonts/src/font_verdana_20_4bpp_0.cpp: 0 warnings, 1 error

compiling Font_verdana_40_4bpp_0.cpp...

"no source": Error: #5: cannot open source input file "../touchgfx/generated/fonts/src/font_verdana_40_4bpp_0.cpp": No such file or directory

../touchgfx/generated/fonts/src/font_verdana_40_4bpp_0.cpp: 0 warnings, 1 error

compiling FrontendApplication.cpp...

compiling CachedFont.cpp...

compiling Kerning_verdana_20_4bpp.cpp...

"no source": Error: #5: cannot open source input file "../touchgfx/generated/fonts/src/kerning_verdana_20_4bpp.cpp": No such file or directory

../touchgfx/generated/fonts/src/kerning_verdana_20_4bpp.cpp: 0 warnings, 1 error

compiling Kerning_verdana_10_4bpp.cpp...

"no source": Error: #5: cannot open source input file "../touchgfx/generated/fonts/src/kerning_verdana_10_4bpp.cpp": No such file or directory

../touchgfx/generated/fonts/src/kerning_verdana_10_4bpp.cpp: 0 warnings, 1 error

compiling GeneratedFont.cpp...

compiling FontCache.cpp...

compiling Kerning_verdana_40_4bpp.cpp...

"no source": Error: #5: cannot open source input file "../touchgfx/generated/fonts/src/kerning_verdana_40_4bpp.cpp": No such file or directory

../touchgfx/generated/fonts/src/kerning_verdana_40_4bpp.cpp: 0 warnings, 1 error

compiling Table_verdana_20_4bpp.cpp...

"no source": Error: #5: cannot open source input file "../touchgfx/generated/fonts/src/table_verdana_20_4bpp.cpp": No such file or directory

../touchgfx/generated/fonts/src/table_verdana_20_4bpp.cpp: 0 warnings, 1 error

compiling Screen1ViewBase.cpp...

"no source": Error: #5: cannot open source input file "../touchgfx/generated/gui_generated/src/screen1_screen/screen1viewbase.cpp": No such file or directory

../touchgfx/generated/gui_generated/src/screen1_screen/screen1viewbase.cpp: 0 warnings, 1 error

compiling Table_verdana_10_4bpp.cpp...

"no source": Error: #5: cannot open source input file "../touchgfx/generated/fonts/src/table_verdana_10_4bpp.cpp": No such file or directory

../touchgfx/generated/fonts/src/table_verdana_10_4bpp.cpp: 0 warnings, 1 error

compiling Table_verdana_40_4bpp.cpp...

"no source": Error: #5: cannot open source input file "../touchgfx/generated/fonts/src/table_verdana_40_4bpp.cpp": No such file or directory

Then I tried to remove these files from Keil MDK and replaced the correct files (according to Touchgfx Generator log), some more files are missing.

In the end, I manually added all the files and removed necessary files inside Keil MDK, it can compile and be downloaded to STM32F746 Discovery board. However, the picture/buttons are NOT displayed correctly.

1 ACCEPTED SOLUTION

Accepted Solutions
Alexandre RENOUX
Principal

Hello,

This is because you didn't set the correct IDE in CubeMX. By default, if you chose the Application Template available in TouchGFX Designer, the IDE is CubeIDE. Therefore you can only run target or build with CubeIDE. If you want to use Keil, you need to open .ioc file in CubeMX, go to Project Manager and change the IDE to MDK-ARM. Then generate code, go back to Designer and generate code from Designer. Now you can open and build with Keil.

0693W000000UySAQA0.png 

When your question is answered, please close this topic by choosing Select as Best.

/Alexandre

View solution in original post

4 REPLIES 4
Alexandre RENOUX
Principal

Hello,

This is because you didn't set the correct IDE in CubeMX. By default, if you chose the Application Template available in TouchGFX Designer, the IDE is CubeIDE. Therefore you can only run target or build with CubeIDE. If you want to use Keil, you need to open .ioc file in CubeMX, go to Project Manager and change the IDE to MDK-ARM. Then generate code, go back to Designer and generate code from Designer. Now you can open and build with Keil.

0693W000000UySAQA0.png 

When your question is answered, please close this topic by choosing Select as Best.

/Alexandre

GWang.3
Associate III

Hello Alexandre

Thank you, I tried this approach before. The compile/build worked fine, however, the pictures/buttons, etc. are NOT working correctly. In the Programming window, KEIL MDK shows something like,

No Algorithm found for: 90000000H - 9000FFFFH; .....

I didn't edit any configurations and everything comes from STM32CUBEMX and Touchgfx generator. Something generated seems not correct. I'll spend more time later on to play around.

If possible, can you share with Touchgfx generated KEIL MDK-ARM sample project? (with the latest touchgfx generator and stm32cubemx). The demo/sample projects in STM32CUBEMX and also STM32 CUBE7 don't work as expected.

Thanks,

Guoping

This is because you are trying to download your code using Keil. But Keil does not know about the external memories used on F746G-DISCO like the external Flash at address 0x90000000.

Keil can only be used for building the project and debugging NOT downloading. To download the code you need to use CubeProgrammer and select the right External loader (see attached file).

Then when the code is downloaded into the board you can debug without downloading with Keil.

/Alexandre

GWang.3
Associate III

Thank you, Alexandre, and now it is working perfectly. Here is the summary to use STM32CubeMX, TouchGFX designer for other toolchains.

1)     Use TouchGFX Designer to create a GUI first, and then save your project.

2)     Open the TouchGFX Designer generated .ioc in STM32CubeMX and change the IDE to Keil MDK, then generate code

3)     Open TouchGFX Designer and generate code.

4)     Use Keil MDK to open the project and generate the .axf or .hex programming file

5)     Use STM32Cube Programmer to program STM32F746 discovery kit

6)     Go back to Keil MDK, for debugging/troubleshooting if needed. 

Guoping