STM32
直播中

尚文清

7年用户 1610经验值
私信 关注
[问答]

STM32F746程序镜像大于1MB时,同时使用IROM1和IROM2下载失败是为什么?

您好,我的应用程序大于1MB后,勾选IROM2后,下载失败,提示:Load linking...Program Size: Code=225528 RO-data=866252 RW-data=188 ZI-data=223420  
".Objectslv_f746.axf" - 0 Error(s), 0 Warning(s).
Build time Elapsed:  00:00:07
Load "D:workspaceSTM32STMlv_port_stm32f746_discoideObjectslv_f746.axf"
Full Chip Erase Done.
Programming Done.
Contents mismatch at: 00200001H  (Flash=60H  Required=F0H) !
Contents mismatch at: 00200002H  (Flash=01H  Required=09H) !
Contents mismatch at: 00200003H  (Flash=20H  Required=FBH) !
Contents mismatch at: 00200004H  (Flash=01H  Required=11H) !
Contents mismatch at: 00200005H  (Flash=02H  Required=46H) !
Contents mismatch at: 00200006H  (Flash=00H  Required=18H) !
Contents mismatch at: 00200007H  (Flash=00H  Required=F0H) !
Contents mismatch at: 00200008H  (Flash=01H  Required=0BH) !
Contents mismatch at: 00200009H  (Flash=13H  Required=FBH) !
Contents mismatch at: 0020000AH  (Flash=00H  Required=14H) !
Contents mismatch at: 0020000BH  (Flash=00H  Required=F0H) !
Contents mismatch at: 0020000CH  (Flash=81H  Required=B5H) !
Contents mismatch at: 0020000DH  (Flash=11H  Required=FFH) !
Contents mismatch at: 0020000EH  (Flash=00H  Required=18H) !
Contents mismatch at: 0020000FH  (Flash=00H  Required=F0H) !
Contents mismatch at: 00200010H  (Flash=00H  Required=0CH) !
Contents mismatch at: 00200011H  (Flash=1BH  Required=FBH) !
Contents mismatch at: 00200012H  (Flash=00H  Required=03H) !
Contents mismatch at: 00200013H  (Flash=00H  Required=B4H) !
Contents mismatch at: 00200015H  (Flash=00H  Required=F0H) !
Contents mismatch at: 00200016H  (Flash=00H  Required=0EH) !
Contents mismatch at: 00200017H  (Flash=00H  Required=FBH) !
Contents mismatch at: 00200018H  (Flash=01H  Required=03H) !
Contents mismatch at: 00200019H  (Flash=1CH  Required=BCH) !
Contents mismatch at: 0020001AH  (Flash=00H  Required=18H) !
Contents mismatch at: 0020001BH  (Flash=00H  Required=F0H) !
Contents mismatch at: 0020001CH  (Flash=00H  Required=10H) !
Contents mismatch at: 0020001DH  (Flash=00H  Required=FBH) !
Contents mismatch at: 0020001EH  (Flash=00H  Required=53H) !
Contents mismatch at: 0020001FH  (Flash=00H  Required=EAH) !
Contents mismatch at: 00200020H  (Flash=00H  Required=02H) !
Contents mismatch at: 00200021H  (Flash=00H  Required=0CH) !
Contents mismatch at: 00200023H  (Flash=00H  Required=F0H) !
Contents mismatch at: 00200024H  (Flash=00H  Required=69H) !
Contents mismatch at: 00200025H  (Flash=00H  Required=80H) !
Contents mismatch at: 00200026H  (Flash=00H  Required=2DH) !
Contents mismatch at: 00200027H  (Flash=00H  Required=E9H) !
Contents mismatch at: 00200028H  (Flash=00H  Required=F0H) !
Contents mismatch at: 00200029H  (Flash=00H  Required=4BH) !
Contents mismatch at: 0020002AH  (Flash=00H  Required=4FH) !
Contents mismatch at: 0020002BH  (Flash=00H  Required=F0H) !
Contents mismatch at: 0020002DH  (Flash=02H  Required=06H) !
Contents mismatch at: 0020002FH  (Flash=00H  Required=2BH) !
Contents mismatch at: 00200030H  (Flash=19H  Required=1FH) !
Contents mismatch at: 00200031H  (Flash=06H  Required=BFH) !
Contents mismatch at: 00200032H  (Flash=00H  Required=B3H) !
Contents mismatch at: 00200033H  (Flash=08H  Required=FAH) !
Contents mismatch at: 00200034H  (Flash=00H  Required=83H) !
Contents mismatch at: 00200035H  (Flash=00H  Required=F5H) !
Contents mismatch at: 00200036H  (Flash=00H  Required=03H) !
Contents mismatch at: 00200037H  (Flash=00H  Required=FAH) !
Contents mismatch at: 00200038H  (Flash=01H  Required=05H) !
Contents mismatch at: 00200039H  (Flash=10H  Required=F4H) !
Contents mismatch at: 0020003AH  (Flash=20H  Required=24H) !
Contents mismatch at: 0020003BH  (Flash=00H  Required=FAH) !
Contents mismatch at: 0020003CH  (Flash=01H  Required=05H) !
Contents mismatch at: 0020003DH  (Flash=12H  Required=F6H) !
Contents mismatch at: 0020003EH  (Flash=00H  Required=5EH) !
Contents mismatch at: 0020003FH  (Flash=00H  Required=40H) !
Contents mismatch at: 00200040H  (Flash=02H  Required=12H) !
Contents mismatch at: 00200041H  (Flash=02H  Required=BFH) !
Contents mismatch at: 00200042H  (Flash=00H  Required=16H) !
Contents mismatch at: 00200043H  (Flash=00H  Required=43H) !
Contents mismatch at: 00200044H  (Flash=22H  Required=B2H) !
Contents mismatch at: 00200045H  (Flash=02H  Required=FAH) !
Contents mismatch at: 00200046H  (Flash=00H  Required=82H) !
Contents mismatch at: 00200047H  (Flash=00H  Required=F5H) !
Contents mismatch at: 00200049H  (Flash=02H  Required=FAH) !
Contents mismatch at: 0020004AH  (Flash=00H  Required=05H) !
Contents mismatch at: 0020004BH  (Flash=00H  Required=F4H) !
Contents mismatch at: 0020004CH  (Flash=41H  Required=C5H) !
Contents mismatch at: 0020004DH  (Flash=00H  Required=F1H) !
Contents mismatch at: 0020004EH  (Flash=00H  Required=20H) !
Contents mismatch at: 0020004FH  (Flash=00H  Required=05H) !
Contents mismatch at: 00200050H  (Flash=02H  Required=1EH) !
Contents mismatch at: 00200051H  (Flash=02H  Required=BFH) !
Contents mismatch at: 00200052H  (Flash=00H  Required=22H) !
Contents mismatch at: 00200053H  (Flash=08H  Required=FAH) !
Contents mismatch at: 00200054H  (Flash=01H  Required=05H) !
Contents mismatch at: 00200055H  (Flash=00H  Required=FCH) !
Contents mismatch at: 00200056H  (Flash=00H  Required=44H) !
Contents mismatch at: 00200057H  (Flash=08H  Required=EAH) !
Contents mismatch at: 00200058H  (Flash=00H  Required=0CH) !
Contents mismatch at: 00200059H  (Flash=00H  Required=04H) !
Contents mismatch at: 0020005AH  (Flash=00H  Required=20H) !
Contents mismatch at: 0020005BH  (Flash=00H  Required=35H) !
Contents mismatch at: 0020005CH  (Flash=42H  Required=56H) !
Contents mismatch at: 0020005DH  (Flash=02H  Required=EAH) !
Contents mismatch at: 0020005EH  (Flash=00H  Required=04H) !
Contents mismatch at: 0020005FH  (Flash=08H  Required=4CH) !
Contents mismatch at: 00200060H  (Flash=43H  Required=4FH) !
Contents mismatch at: 00200061H  (Flash=02H  Required=EAH) !
Contents mismatch at: 00200062H  (Flash=00H  Required=14H) !
Contents mismatch at: 00200063H  (Flash=00H  Required=44H) !
Contents mismatch at: 00200064H  (Flash=00H  Required=18H) !
Contents mismatch at: 00200065H  (Flash=02H  Required=BFH) !
Contents mismatch at: 00200066H  (Flash=00H  Required=64H) !
Contents mismatch at: 00200067H  (Flash=08H  Required=1CH) !
Contents mismatch at: 00200068H  (Flash=43H  Required=4FH) !
Contents mismatch at: 00200069H  (Flash=00H  Required=F0H) !
Too many errors to display !
Error: Flash Download failed  -  "Cortex-M7"
Flash Load finished at 12:40:31






回帖(2)

李红梅

2024-3-22 11:33:51
手册上看STM32F746最大的容量是1M哦,所以代码超过该型号容量,编译器会限制的。
举报

刘强

2024-3-22 14:18:59
这个问题可能是由于你的芯片的存储器不能同时使用IROM1和IROM2引起的。STM32F746芯片的IROM1区域大小为496KB,IROM2区域大小为512KB,总共只有1MB的Flash可用。当你的应用程序大于1MB时,就无法同时将其编译进IROM1和IROM2区域。

解决这个问题的方法是,将你的应用程序编译进IROM1区域,然后使用外部存储器,比如SD卡或者外部Flash,来存储额外的数据或者代码。你可以使用SD卡接口或者外部存储器接口来读取这些数据或者代码,并在运行时加载到RAM中。

你还需要在链接器脚本或者工程设置中指定正确的存储器映射,以确保编译器正确地将代码和数据放置在正确的存储器区域。

如果你对如何配置存储器映射不确定,建议你参考ST官方的文档或者开发板的参考手册,以获取更详细的指导。
举报

更多回帖

发帖
×
20
完善资料,
赚取积分