你的浏览器版本过低,可能导致网站不能正常访问!
为了你能正常使用网站功能,请使用这些浏览器。

关于STM32H750B-DK 程序烧录问题

[复制链接]
fsczp 提问时间:2022-9-8 17:33 / 已解决
情况如下:
通过TouchGFX设计好一些界面后,可以直接通过F6(Run Target)去烧录程序到板子里面

然后在C:\TouchGFXProjects\MyApplication_3\TouchGFX\build\bin\路径下面可以找到intflash.hex和target.hex

我尝试通过STM32CubeProgrammer去把这两个hex文件download进去,但是都会报错
  17:28:58 : Error: failed to download Segment[1]
  17:28:58 : Error: failed to download the File


回到TouchGFX Designer里面的控制台
  ST-LINK SN  : 003F003B3137511333333639
        ST-LINK FW  : V3J7M2
        Board       : STM32H750B-DK
        Voltage     : 3.27V
        SWD freq    : 24000 KHz
        Connect mode: Normal
        Reset mode  : Software reset
        Device ID   : 0x450
        Revision ID : Rev V
        Device name : STM32H7xx
        Flash size  : 128 KBytes
        Device type : MCU
        Device CPU  : Cortex-M7
        BL Version  : 0x90



        Memory Programming ...
        Opening and parsing file: target.hex
          File          : target.hex
          Size          : 290.36 KB
          Address       : 0x08000000


        Erasing memory corresponding to segment 0:
        Erasing memory corresponding to segment 1:
        Erasing external memory sectors [0 1]
        Erasing memory corresponding to segment 2:
        Erasing external memory sectors [16 17]
        Download in Progress:
        北北北北北北北北北北北北北北北北北北北北北北北北北 0%
        圹圹圹圹圹圹圹圹圹圹圹圹圹圹圹圹圹圹圹圹圹圹圹圹圹 100%

        File download complete
        Time elapsed during download operation: 00:00:05.772

        Hard reset is performed
        Done


发现它除了擦出 sgment 0 1 2 之外,还会擦出外部的特定的memory sector

所以到底intflash.hex 和 target.hex 到底是要烧录到哪里???

再仔细看了一下TouchGFX Designer里面的控制台
   Compile
        make -f ../gcc/Makefile -j8
        Middlewares/ST/touchgfx
        Reading TouchGFX/application.config
        Video Objects:
        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
        Done


最后写着target.hex是包含了 internal + external 的hex文件,也就是说包含了intflash.hex???



如果我不想通过TouchGFX Designer去下载程序到板子里面,想通过STM32CubeProgrammer去下载的话,需要怎样操作呢?

请各位大神指教一下小弟,谢谢。
收藏 评论7 发布时间:2022-9-8 17:33

举报

7个回答
奇迹 最优答案 回答时间:2022-9-8 20:34:55
因为用到了外部的spi flash存储素材,你需要加载外部的烧写算法才行
点左侧有 EL 的图标,按需选择就行
xmshao 回答时间:2022-9-9 10:07:12
应该是有部分内容要写到外部存储器了,这时就要用到外部加载算法。在CubeIDE和STM32CubeProgrammer里面一般都有针对现有ST开发板外扩存储的准备了
现存算法文件,你针对性地选择后进行烧录。


另外,这个板子按理也有现存的例程,你可以先基于现有例程跑跑,找找流程,然后再自己来会更高效些。
fsczp 回答时间:2022-9-8 17:39:56
在网上查了一下,有帖子说要用TouchGFX Environment去make生成hex文件再烧录,但是只有一句话带过了,有人知道怎么操作吗???
fsczp 回答时间:2022-9-8 17:45:13


make了,发现说有头文件没找到,又说有变量undefine  
但是为什么TouchGFX它自己又能够编译并且通过呢。。。。
fsczp 回答时间:2022-9-8 17:48:06
Administrator@RB46HHN5HNJHQ2F /c/TouchGFXProjects/MyApplication_3/TouchGFX/simulator/gcc
$ make -j6
Reading ./application.config
Compiling gui/src/screen1_screen/Screen1View.cppCompiling gui/src/model/Model.cpp

Compiling generated/gui_generated/src/screen1_screen/Screen1ViewBase.cppCompiling gui/src/common/FrontendApplication.cpp
Compiling generated/simulator/src/video/SoftwareMJPEGDecoder.cpp
gui/src/model/Model.cpp:3:10: fatal error: main.h: No such file or directory
#include "main.h"
          ^~~~~~~~Compiling generated/simulator/src/mainBase.cpp

compilation terminated.
generated/simulator/gcc/Makefile:196: recipe for target 'build/MINGW32_NT-6.2/gui/src/model/Model.o' failed
make[2]: *** [build/MINGW32_NT-6.2/gui/src/model/Model.o] Error 1
make[2]: *** Waiting for unfinished jobs....
gui/src/screen1_screen/Screen1View.cpp: In member function 'virtual void Screen1View::ChangeText()':
gui/src/screen1_screen/Screen1View.cpp:22:19: error: operation on '((Screen1View*)this)->Screen1View::resourceIndex' may be undefined [-Werror=sequence-point]
     resourceIndex = (++resourceIndex % 4);
     ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
cc1plus.exe: all warnings being treated as errors
generated/simulator/gcc/Makefile:196: recipe for target 'build/MINGW32_NT-6.2/gui/src/screen1_screen/Screen1View.o' failed
make[2]: *** [build/MINGW32_NT-6.2/gui/src/screen1_screen/Screen1View.o] Error 1
generated/simulator/gcc/Makefile:155: recipe for target 'generate_assets' failed
make[1]: *** [generate_assets] Error 2
Makefile:32: recipe for target 'all' failed

fsczp 回答时间:2022-9-9 09:01:39
奇迹 发表于 2022-9-8 20:34
因为用到了外部的spi flash存储素材,你需要加载外部的烧写算法才行
点左侧有 EL 的图标,按需选择就行
...


谢谢大佬的回复
fsczp 回答时间:2022-9-9 09:12:13
奇迹 发表于 2022-9-8 20:34
因为用到了外部的spi flash存储素材,你需要加载外部的烧写算法才行
点左侧有 EL 的图标,按需选择就行
...

按照您的方法确实可以了
我发现如果用intflash.hex烧录进去的话图片是不包含的所以会有空缺,需要烧录target.hex
所以这就是说明target.hex是包含了internal和external的信息了。

所属标签

相似问题

官网相关资源

关于
我们是谁
投资者关系
意法半导体可持续发展举措
创新与技术
意法半导体官网
联系我们
联系ST分支机构
寻找销售人员和分销渠道
社区
媒体中心
活动与培训
隐私策略
隐私策略
Cookies管理
行使您的权利
官方最新发布
STM32N6 AI生态系统
STM32MCU,MPU高性能GUI
ST ACEPACK电源模块
意法半导体生物传感器
STM32Cube扩展软件包
关注我们
st-img 微信公众号
st-img 手机版