Skip to main content
DMavr.1
Visitor II
Apr 12, 2020 11:22 PM UTC
Question

STM32CubeIDE v1.3.0 + TouchGFX v4.13.0 + CubeMX 5.6.0 -- Issue Compiling when using latest versions of those apps together.

Hi!

Given the circumstances, I've finally found time to learn the STM32 dev environment. I have a STM32F769iDisco board.

I've successfully used TouchGFX v4.13.0 to start a new project with a simple interface (background and button). I can compile, simulate and run on target.

I've also been able to use CubeMX to open the ICO file and to modify board settings and then compiling & running using TouchGFX.

The issues begin when I try and debug using STM32CubeIDE. I open the project in a new workspace, build without errors, but when I try and run or debug I get an error.

In the console I get:

STMicroelectronics ST-LINK GDB server. Version 5.5.0
Copyright (c) 2019, STMicroelectronics. All rights reserved.
 
Starting server with the following options:
 Persistent Mode : Disabled
 Logging Level : 1
 Listen Port Number : 61234
 Status Refresh Delay : 15s
 Verbose Mode : Disabled
 SWD Debug : Enabled
 InitWhile : Enabled
 
Waiting for debugger connection...
Debugger connected
Debugger connection lost.
Shutting down...

And a "Problem Occurred" Alert with the following error:

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

The same project builds fine with TouchGFX but not via the IDE. Why?

Is there a way to change the IDE to use the same compiler/programmer settings TouchGFX is using?

Thanks.

This topic has been closed for replies.

9 replies

Martin KJELDSEN
Principal III
Apr 29, 2020 2:52 PM UTC

Hi,

Are you still having this issue?

aponski
Associate
Dec 20, 2020 2:33 PM UTC

DMavr.1 how did you solve this isssue?

GOtté.1
Visitor II
Jan 14, 2021 2:14 PM UTC

I encounter the same problem. Anybody an idea how to fix this?

aponski
Associate
Jan 14, 2021 2:35 PM UTC

Me too

Martin KJELDSEN
Principal III
Jan 18, 2021 3:08 PM UTC

​Is an external flashloader configured for the project? These versions are pretty old now - what are your current toolchain versions?

Some of the ATs were missing flashloader configuration which would cause this. But should have been fixed.

GOtté.1
Visitor II
Jan 18, 2021 3:40 PM UTC

I'm working with TouchGFX 4.16, STM32CubeIDE 1.51 (latest versions) on a NUCLEO-G071RB + X-NUCLEO-GFX01M1 board.

I opened the one sample project available for this board combo in CubeMX, uploaded it to the board without any problem.

Then I opened the project in CubeIDE, compiled without any problem, but uploading/running is returning these errors:

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

And there is no external flashloader configured.

When I enable the external flashloader (S25FL032P_STM32G071B-NUCLEO, 0x90000000, SPI_FLASH, S25FL032P_STM32G071B-NUCLEO.stldr)

This is returned:

Error in final launch sequence:
 
Failed to start GDB server
Failed to start GDB server
Error in initializing ST-LINK device.
Reason: (-2147155971) Unknown. Please check power and cabling to target.

GOtté.1
Visitor II
Jan 18, 2021 5:09 PM UTC

Maybe it's related, but when I build the release in STM32CubeIDE, the .bin file is >2GB!

Is this because of this in the linker script:

SPI_FLASH (r)   : ORIGIN = 0x90000000,  LENGTH = 8M

Martin KJELDSEN
Principal III
Jan 19, 2021 9:45 AM UTC

It's because .bin files do not contain notions of memory ranges, so it has to contain all the data from 0x0-0x90000000+8M. Disable bin file generation if you don't need it - You probably just want the .elf or .hex

GOtté.1
Visitor II
Jan 19, 2021 8:25 AM UTC

A small update. I convert the generated .elf file to a .hex file (the .bin is way too big) : arm-none-eabi-objcopy -O ihex STM32G071_NUCLEO.elf STM32G071_NUCLEO.hex

Then I programmed the board by using "ST-Link Utility" and the external loader file (MX25L6433F_STM32G071B_NUCLEO.stldr) from the folder "en.X-CUBE-DISPLAY_1_0_0\Utilities\PC_Software\ExternalLoader".

And this is working fine, so the building in STM32CubeIDE is fine, only the uploading to the board is failing.