cancel
Showing results for 
Search instead for 
Did you mean: 

Debug ToughGFX generated code

DamageG
Associate II

I generated code using ToughGFX 4.13.0 for the STM32F769I_DISCO board. I was able to run target in ToughGFX and import the code into the CubeIDE. There were missing files that needed to be deleted from the project to get it to build.

But after that, I can't load the debugger. I get the following in the console:

STMicroelectronics ST-LINK GDB server. Version 5.3.2
Copyright (c) 2019, STMicroelectronics. All rights reserved.
 
Starting server with the following options:
        Persistent Mode            : Disabled
        LogFile Name               : C:\TouchGFXProjects\tgfx769_slider_2\STM32CubeIDE\Debug\st-link_gdbserver_log.txt
        Logging Level              : 31
        Listen Port Number         : 61234
        Status Refresh Delay       : 15s
        Verbose Mode               : Enabled
        SWD Debug                  : Enabled
        InitWhile                  : Enabled
 
Target connection mode: Under reset
Hardware watchpoint supported by the target 
COM frequency = 4000 kHz
ST-LINK Firmware version : V2J34M25
Device ID: 0x451
PC: 0x8011654
ST-LINK device status: HALT_MODE
ST-LINK detects target voltage = 3.23 V
ST-LINK device status: HALT_MODE
ST-LINK device initialization OK
Waiting for debugger connection...
Waiting for connection on port 61234...
Accepted connection on port 61234...
Debugger connected
Enter STM32_AppReset() function 
NVIC_DFSR_REG = 0x00000009
NVIC_CFGFSR_REG = 0x00000000
XPSR = 0x01000000
Debugger connection lost.
Shutting down...

And the following in the error dialog:

Error in final launch sequence:
 
Failed to execute MI command:
load C:\\TouchGFXProjects\\tgfx769_slider_2\\STM32CubeIDE\\Debug\\STM32F769I_DISCO.elf 
 
Error message from debugger back end:
Load failed
Failed to execute MI command:
load C:\\TouchGFXProjects\\tgfx769_slider_2\\STM32CubeIDE\\Debug\\STM32F769I_DISCO.elf 
 
Error message from debugger back end:
Load failed
Failed to execute MI command:
load C:\\TouchGFXProjects\\tgfx769_slider_2\\STM32CubeIDE\\Debug\\STM32F769I_DISCO.elf 
 
Error message from debugger back end:
Load failed
Load failed

3 REPLIES 3
scottSD
Senior III

This post has information about the Stm32F769i with the new version of the tools. Hopefully it will help you with your issue.

https://community.st.com/s/question/0D50X0000C0vVhySQE/setup-up-stm32f769idisco-board-with-cubemx-and-touchgfx-support

scottSD
Senior III

Here's what I did to fix that "Failed to execute MI command" debugger issue.

I needed to add the QUADSPI definition to the following area of the linker file (STM32F769NIHX_FLASH.ld):

/* Memories definition */
MEMORY
{
  RAM    (xrw)    : ORIGIN = 0x20000000,   LENGTH = 512K
  FLASH    (rx)    : ORIGIN = 0x8000000,   LENGTH = 2048K
  QUADSPI (rx) : ORIGIN = 0x90000000, LENGTH = 64M
}

DamageG
Associate II

Thank you. Adding the QUADSPI line and changing the debugger to

Type: Software system reset

got me up and running.

The graphics are all messed up but it's running :)