2018-12-26 08:33 PM
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?
2019-01-15 12:43 AM
Okay, so it's worse than before?
Another note on what i saw in the video. The reason you're seeing something different when you press the button is because you're running a double buffering setup and the other framebuffer has a different kind of garbage.
2019-01-15 12:54 AM
Yes, i know about garbage, its not a problem.
Problem now:
To flash firmware i should write code in EWARM, then compile code in touchgfx and then flash it from st-link.
I would like to write code and generate hex file in iar, and then flash it from st-link.
But when i flash iar-generated hex file i see only old buffer garbage.
2020-01-27 02:13 AM
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