Skip to main content
feelingoflight
Associate II
December 27, 2018
Question

stm32h743i + touchgfx

  • December 27, 2018
  • 22 replies
  • 6262 views

Hello.

Im trying to flash evaluation board STM32H743I-EVAL with help of touchgfx designer 4.10.0.

In the simplest case i create project with application template ST STM32H743I EVAL and without any elements (no backgrounds, buttons etc.).

But when i try to flash (button "run target"), i havethis:

make -f target/gcc/Makefile -j10 flash

An error occured during flash. Please make sure you have the right target connected.

Converting images

STM32 ST-LINK CLI v3.3.0.0

STM32 ST-LINK Command Line Interface

ST-LINK SN: 0672FF323338424E43254935

ST-LINK Firmware version: V2J32S22 (Need Update)

Connected via SWD.

SWD Frequency = 4000K.

Target voltage = 3.2 V

Connection mode: Normal

Reset mode: Hardware reset

Device ID: 0x450

Device flash Size: 2048 Kbytes

Device family: STM32H7xx

Loading file...

Flash Programming:

File : build/bin/target.hex

Address : 0x08000000

The elf loader file is not accessible.

MCU Reset.

target/gcc/Makefile:389: recipe for target '_extflash_' failed

make[1]: *** [_extflash_] Error 12

target/gcc/Makefile:77: recipe for target 'flash' failed

make: *** [flash] Error 2

And i tried to update ST-LINK firmware, it doesnt help and debug log still displays the message "need update".

Help me pls to fix my problem, how to flash stm32h743i?

This topic has been closed for replies.

22 replies

Mon2
Senior III
December 27, 2018

Hi. Can you share the details of which ST-LINK update you have applied and tested?

feelingoflight
Associate II
December 28, 2018

STM32 ST-LINK Utility v4.3.0.0

STLinkUSBDriver.dll  v5.1.0.0

ST-LINK_CLI.exe    v3.3.0.0

Firmware Version: V2.J32.M22 STM32 Debug+Mass storage.

But i think that problem in generating some memory files, because when i try to flash firmware from IAR,

it shows error "FlashSTM32H7xxx_CM7.flash file was not found". Way to this file is containing in "QSPI.board" file. And "FlashSTM32H7xxx_CM7.flash" is not present in EWARM folder,

unlike "QSPI.board". When i try to use default IAR's flashloader files, it flashes, but do it wrong.

And for example look at comparsion generated STM32F7 and STM32H7 folders. STM332F7 board file contains ways to ".flash" files, which are presented in IAR folder.

Mon2
Senior III
January 1, 2019

Which ST-LINK update have you applied?

Can you try again after upgrading the following tool?

STSW-LINK009 2.0.1

https://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-utilities/stsw-link009.html

Mon2
Senior III
January 1, 2019

Also, your CLI version is old.

STM32 ST-LINK CLI v3.3.0.0

Current version is posted here:

https://www.st.com/en/development-tools/stsw-link004.html

Current version is 4.3.0.

feelingoflight
Associate II
January 9, 2019

But windows shows that driver and CLI is updated.

And touchgfx still shows this error with wrong driver versions,

I tried reinstall designer, driver and CLI, nothing helps.

Martin KJELDSEN
Principal III
January 9, 2019

Hi @feelingoflight​,

It does look like an incorrect version. When you call make with the "flash" option, it simply makes a call to the ST-Link CLI and if your version does not have the right support (both internal flash and external) you'll get that message "No elf loader found".

Could you try showing me the "About" window from your ST-Link GUI ?

feelingoflight
Associate II
January 9, 2019

Hello

Martin KJELDSEN
Principal III
January 9, 2019

Could you try programming your board from the GUI to see if you get the same error there? I seem to remember having issues with H743I-EVAL and ST-Link.

Moving to STCubeProgrammer resolved my/our issues here. Try it out!

feelingoflight
Associate II
January 9, 2019

Yeah, i tried to flash file target.hex from application/build/bin from st-link utility and from stm32cubeprogrammer, it works, but with some bugs. For example when i add scalable image on screen it flashes wrong and nothing works.

Also i would like to generate hex files from IAR, not from designer or cmake.

Thanks for help, maybe i need to wait more stable version touchgfx.

Martin KJELDSEN
Principal III
January 9, 2019

It's not TouchGFX itself that's a problem, but rather the project files or the programming of the board. The Application Templates are seperate from the framework and can be updated if we find problems with them.

What do you mean by "Flashes wrong"? and "Nothing works"?

The IAR project should convert the .out file to .hex. Have you tried that? There's an IAR8.x folder under target/ in your project.

Thanks!

Best regards,

Martin

Juan Delgado
Associate II
January 27, 2020

I had a similar problem using STM32F746G-DISCO with new TouchGFX 4.13.0 version.

I open the TouchGFX designer, generate a template for this discovery kit and click run target but I had the folowing error:

Flash
 make -f ../gcc/Makefile flash
 Linking TouchGFX/build/bin/target.elf
 Producing additional output formats...
 target.hex - Combined internal+external hex
 intflash.elf - Internal flash, elf debug
 intflash.hex - Internal flash, hex
 extflash.bin - External flash, binary
 /usr/bin/sh: C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\STM32_Programmer_CLI.exe: No such file or directory
 gcc/Makefile:284: recipe for target '_extflash_' failed
 make[1]: *** [_extflash_] Error 127
 ../gcc/Makefile:50: recipe for target 'flash' failed
 make: *** [flash] Error 2
 Failed

The error is because I don´t have STM32CubeProgrammer carpet into my STMicroelectronics\STM32Cube files path and so I don't have the correct STM32_Programmer_CLI.exe file.

To fix it I went to the the make file in MyApplication (../TouchGFXProjects/MyApplication/gcc/Makefile) and modify the path to my STM32 Cli programmer (that will have a different name because I will use the ST-Link Utility STM32 Cli programmer because I don´t have STM32 Cube Programmer).

In my make file I changed:

stm32cubeProgrammer := STMicroelectronics\\STM32Cube\\STM32CubeProgrammer\\bin\\STM32_Programmer_CLI.exe
 
to
 
stm32cubeProgrammer := STMicroelectronics\\STM32 ST-LINK Utility\\ST-LINK Utility\\ST-LINK_CLI.exe
 
AND
 
stm32cubeLoader := STMicroelectronics\\STM32Cube\\STM32CubeProgrammer\\bin\\ExternalLoader\\N25Q128A_STM32F746G-DISCO.stldr
 
to
 
stm32cubeLoader := STMicroelectronics\\STM32 ST-LINK Utility\\ST-LINK Utility\\ExternalLoader\\N25Q128A_STM32F746G-DISCO.stldr

Then the first error was resolved but a new was raised:

Flash
 make -f ../gcc/Makefile flash
 Linking TouchGFX/build/bin/target.elf
 Producing additional output formats...
 target.hex - Combined internal+external hex
 intflash.elf - Internal flash, elf debug
 intflash.hex - Internal flash, hex
 extflash.bin - External flash, binary
 STM32 ST-LINK CLI v3.5.0.0
 STM32 ST-LINK Command Line Interface
 
 [port=SWD]: Unknown debug protocol or option!
 make[1]: *** [_extflash_] Error 1
 gcc/Makefile:284: recipe for target '_extflash_' failed
 ../gcc/Makefile:50: recipe for target 'flash' failed
 make: *** [flash] Error 2
 Failed
 Failed

This is because I am using the ST-LINK_CLI.exe STM32 programmer instead of STM32_Programmer_CLI.exe, so the command syntax is different. Parameter "port=SWD" doesn't exists. To fix it I changed:

_extflash_:
	@$(st_stm32cube_programmer) -c port=SWD -d $(binary_output_path)/target.hex -el $(st_stm32cube_external_loader) -hardRst
 
to 
 
_extflash_:
	@$(st_stm32cube_programmer) -c SWD -d $(binary_output_path)/target.hex -el $(st_stm32cube_external_loader) -hardRst

But another error was raised:

Flash
 make -f ../gcc/Makefile flash
 Linking TouchGFX/build/bin/target.elf
 Producing additional output formats...
 target.hex - Combined internal+external hex
 intflash.elf - Internal flash, elf debug
 intflash.hex - Internal flash, hex
 extflash.bin - External flash, binary
 STM32 ST-LINK CLI v3.5.0.0
 STM32 ST-LINK Command Line Interface
 
 ST-LINK SN: 0670FF485157717867143119
 ST-LINK Firmware version: V2J34M25
 Connected via SWD.
 SWD Frequency = 4000K.
 Target voltage = 3.2 V
 Connection mode: Normal
 Reset mode: Software reset
 Device ID: 0x449 
 Device flash Size: 1024 Kbytes
 Device family: STM32F74x/F75x
 
 [-d]: Unknown command!Use -? for help.
 
 make[1]: *** [_extflash_] Error 1
 gcc/Makefile:284: recipe for target '_extflash_' failed
 ../gcc/Makefile:50: recipe for target 'flash' failed
 make: *** [flash] Error 2
 Failed
 Failed

This is because [-d] signal the path to the target file in STM32_Programmer_CLI.exe but not in ST-LINK_CLI.exe. So I changed:

@$(st_stm32cube_programmer) -c SWD -d $(binary_output_path)/target.hex -el $(st_stm32cube_external_loader) -hardRst
 
to 
 
@$(st_stm32cube_programmer) -c SWD -p $(binary_output_path)/target.hex -el $(st_stm32cube_external_loader) -hardRst

Now I am developing my applications normally!

P.D.

1.- If you will flash in internal flash it is a must change the commands for _intflash too.

2.- I am using:

2.1.- STM32CubeMX Version 5.5.0 with TouchGFX Generator (4.13.0) X-CUBE-TOUCHGFX STMicroelectronics packages installed.

2.2.- STM32 ST-Link Utility v4.5.0.0

2.3.- STLinkUSBDriver.dll v5.1.2.0

2.4.- ST-LINK_CLI.exe v3.5.0.0

2.5.- TouchGFX designer 4.13.0 installed from within CubeMX.

Bests regards,

Juan