Why does TouchGFX program need to be manually run in Keil ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-12 6:33 AM - last edited on ‎2025-04-14 2:09 AM by Andrew Neil
Hi everyone, after I've configured TouchGFX, the program needs to be manually run in Keil's debug environment to execute. Why is that?
My ICNA3306_DrawBlock data transfer did not use DMA.
Solved! Go to Solution.
- Labels:
-
STM32CubeMX
-
TouchGFX
-
TouchGFX Designer
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-16 3:46 AM
I found the problem — the TouchGFX project generated by CubeMX doesn't run when targeting Keil, but it works if it's generated as an STM32CubeIDE project.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-14 2:12 AM - edited ‎2025-04-14 2:13 AM
Welcome to the forum.
For best results, please see: How to write your question to maximize your chances to find a solution;
And, in particular: How to insert source code.
@weixun wrote:the program needs to be manually run in Keil's debug environment to execute.
Not sure what you mean by that?
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-14 4:14 AM
Hello @weixun ,
If you cannot "flash" your program through Keil but you are able to debug it through Keil, try to flash it using STM32CubeProgrammer.
Regards,
Software engineer at ST (TouchGFX)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-14 6:46 AM
Hi GaetanGodart, thanks for your reply. I am able to flash the chip using Keil. The problem is that the program doesn't run automatically after flashing. I need to start a debug session ('Start/Stop Debug Session') and click 'Step' or 'Step Out' to get it running. I've observed that after stepping out several times, the ICNA3306_Init function is called, but then the execution gets permanently stuck right here:
if (OSWrappers::isVSyncAvailable())
{
hal.backPorchExited();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-14 6:59 AM - edited ‎2025-04-14 7:05 AM
Hi Andrew Neil, this means 'I need to start a debug session ('Start/Stop Debug Session') and click 'Step' or 'Step Out' to get it running.Sorry, my English isn't very good, so I used a translator.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-14 6:59 AM - edited ‎2025-04-14 7:00 AM
@weixun wrote:I am able to flash the chip using Keil. The problem is that the program doesn't run automatically after flashing.
I think you have to configure that?
Maybe in the Debug settings - configure it to do a download at the start of a session?
Have you got it to work with a simple "Blinky" project?
For questions specifically about the Keil tools, probably best to ask in Keil's own forum:
https://community.arm.com/support-forums/f/keil-forum/
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-14 7:09 AM
I have already uploaded the code to https://github.com/weixuna/touchgfx_amoled_
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-14 7:16 AM
I don't think it's a Keil issue, because I can flash other programs normally. It's only when I configure TouchGFX in CubeMX that it doesn't work, so it's likely a problem with my code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-14 7:32 AM
@weixun wrote:I can flash other programs normally.
But you said you can flash this one OK - it's just a matter of starting the debug session?
Again, I think this is a project setting - presumably, TouchGFX just sets it differently?
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-15 1:05 AM
Hello @weixun ,
I have looked at the ICNA3306, it seems it is a third party display that I have no control about. If it's init function is behaving poorly I am not sure I can help with that.
You say your program gets stuck and you show a screen shot where the current line is the end of the taskEntry. I have trouble understanding that picture, if you end up on the last line of that function that is just the closing bracket, are you really stuck on this line? There is nothing to get stuck to there.
If you mean that you permanently loop through it (through the if statement), then perhaps you implemented your hal.BackPorchExited() wrongly, you can look at a TBS we made that has a similar configuration as your (same communication, same display type, so RTOS) to see how we implemented it.
Regarding your last message to Andrew, maybe you can try to copy the setting file from one of the project that works into your TouchGFX project. I believe it is the "Project.wsdt" file.
Regards,
Software engineer at ST (TouchGFX)
