测试STM32L4R5中出现编译终止

2019-07-14 14:30发布

对我来说,问题从来没有见过,所以一一描述出来,以便高人解答,先谢谢了!
    本例采用STM32CubeMX创建开发工程,设置了1路SYS_tick,2路ADC,2路基于TIM1的PWM,1路I2C1,1路LPUART1,打开了板子上原有的3个LED对应的PC7、PB7、PB14和另外PD7~PD3个GPIO OUT,1个PEDGPIO IN,见截图60。设置时钟,见截图61。配置,见截图62。项目配置选设,见截图63。代码生成选设,见截图64。先生成的是IAR项目,打开IAR编译正常[除了8个警告-以前的实验都无问题!]下载出现第一个对话框,见截图65——执行擦除块解锁,因为写不进去,所以单击Ok 。接着出现截图66——Flash加载错。接着出现截图67——致命错误编译终止。这个问题从昨晚开始发生。
    本例还采用输出到Keil工程进行测试,编译没有警告也没有错!下载报错对话框见截图68——下载错-Cortex-M4,有点莫名其妙;但列表中的错误让脊梁直冒冷汗,太多了也得打印出来,可以看几行直接到最后:
Load "D:\examples\example\stmMcu\stm32l4r5xx\l4r5Keil\MDK-ARM\l4r5Keil\buidling\l4r5Keil.axf"
Erase Done.
Programming Done.
Contents mismatch at: 08000000H  (Flash=00H  Required=E8H) !
Contents mismatch at: 08000001H  (Flash=00H  Required=07H) !
Contents mismatch at: 08000003H  (Flash=00H  Required=20H) !
Contents mismatch at: 08000004H  (Flash=00H  Required=5DH) !
Contents mismatch at: 08000005H  (Flash=00H  Required=02H) !
Contents mismatch at: 08000007H  (Flash=00H  Required=08H) !
Contents mismatch at: 08000008H  (Flash=00H  Required=65H) !
Contents mismatch at: 08000009H  (Flash=00H  Required=02H) !
Contents mismatch at: 0800000BH  (Flash=00H  Required=08H) !
Contents mismatch at: 0800000CH  (Flash=00H  Required=67H) !
Contents mismatch at: 0800000DH  (Flash=00H  Required=02H) !
Contents mismatch at: 0800000FH  (Flash=00H  Required=08H) !
Contents mismatch at: 08000010H  (Flash=00H  Required=69H) !
Contents mismatch at: 08000011H  (Flash=00H  Required=02H) !
Contents mismatch at: 08000013H  (Flash=00H  Required=08H) !
Contents mismatch at: 08000014H  (Flash=00H  Required=6BH) !
Contents mismatch at: 08000015H  (Flash=00H  Required=02H) !
Contents mismatch at: 08000017H  (Flash=00H  Required=08H) !
Contents mismatch at: 08000018H  (Flash=00H  Required=6DH) !
Contents mismatch at: 08000019H  (Flash=00H  Required=02H) !
Contents mismatch at: 0800001BH  (Flash=00H  Required=08H) !
Contents mismatch at: 0800002CH  (Flash=00H  Required=6FH) !
Contents mismatch at: 0800002DH  (Flash=00H  Required=02H) !
Contents mismatch at: 0800002FH  (Flash=00H  Required=08H) !
Contents mismatch at: 08000030H  (Flash=00H  Required=71H) !
Contents mismatch at: 08000031H  (Flash=00H  Required=02H) !
Contents mismatch at: 08000033H  (Flash=00H  Required=08H) !
Contents mismatch at: 08000038H  (Flash=00H  Required=73H) !
Contents mismatch at: 08000039H  (Flash=00H  Required=02H) !
Contents mismatch at: 0800003BH  (Flash=00H  Required=08H) !
Contents mismatch at: 0800003CH  (Flash=00H  Required=75H) !
Contents mismatch at: 0800003DH  (Flash=00H  Required=02H) !
Contents mismatch at: 0800003FH  (Flash=00H  Required=08H) !
Contents mismatch at: 08000040H  (Flash=00H  Required=77H) !
Contents mismatch at: 08000041H  (Flash=00H  Required=02H) !
Contents mismatch at: 08000043H  (Flash=00H  Required=08H) !
Contents mismatch at: 08000044H  (Flash=00H  Required=77H) !
Contents mismatch at: 08000045H  (Flash=00H  Required=02H) !
Contents mismatch at: 08000047H  (Flash=00H  Required=08H) !
Contents mismatch at: 08000048H  (Flash=00H  Required=77H) !
Contents mismatch at: 08000049H  (Flash=00H  Required=02H) !
Contents mismatch at: 0800004BH  (Flash=00H  Required=08H) !
Contents mismatch at: 0800004CH  (Flash=00H  Required=77H) !
Contents mismatch at: 0800004DH  (Flash=00H  Required=02H) !
Contents mismatch at: 0800004FH  (Flash=00H  Required=08H) !
Contents mismatch at: 08000050H  (Flash=00H  Required=77H) !
Contents mismatch at: 08000051H  (Flash=00H  Required=02H) !
Contents mismatch at: 08000053H  (Flash=00H  Required=08H) !
Contents mismatch at: 08000054H  (Flash=00H  Required=77H) !
Contents mismatch at: 08000055H  (Flash=00H  Required=02H) !
Contents mismatch at: 08000057H  (Flash=00H  Required=08H) !
Contents mismatch at: 08000058H  (Flash=00H  Required=77H) !
Contents mismatch at: 08000059H  (Flash=00H  Required=02H) !
Contents mismatch at: 0800005BH  (Flash=00H  Required=08H) !
Contents mismatch at: 0800005CH  (Flash=00H  Required=77H) !
Contents mismatch at: 0800005DH  (Flash=00H  Required=02H) !
Contents mismatch at: 0800005FH  (Flash=00H  Required=08H) !
Contents mismatch at: 08000060H  (Flash=00H  Required=77H) !
Contents mismatch at: 08000061H  (Flash=00H  Required=02H) !
Contents mismatch at: 08000063H  (Flash=00H  Required=08H) !
Contents mismatch at: 08000064H  (Flash=00H  Required=77H) !
Contents mismatch at: 08000065H  (Flash=00H  Required=02H) !
Contents mismatch at: 08000067H  (Flash=00H  Required=08H) !
Contents mismatch at: 08000068H  (Flash=00H  Required=77H) !
Contents mismatch at: 08000069H  (Flash=00H  Required=02H) !
Contents mismatch at: 0800006BH  (Flash=00H  Required=08H) !
Contents mismatch at: 0800006CH  (Flash=00H  Required=77H) !
Contents mismatch at: 0800006DH  (Flash=00H  Required=02H) !
Contents mismatch at: 0800006FH  (Flash=00H  Required=08H) !
Contents mismatch at: 08000070H  (Flash=00H  Required=77H) !
Contents mismatch at: 08000071H  (Flash=00H  Required=02H) !
Contents mismatch at: 08000073H  (Flash=00H  Required=08H) !
Contents mismatch at: 08000074H  (Flash=00H  Required=77H) !
Contents mismatch at: 08000075H  (Flash=00H  Required=02H) !
Contents mismatch at: 08000077H  (Flash=00H  Required=08H) !
Contents mismatch at: 08000078H  (Flash=00H  Required=77H) !
Contents mismatch at: 08000079H  (Flash=00H  Required=02H) !
Contents mismatch at: 0800007BH  (Flash=00H  Required=08H) !
Contents mismatch at: 0800007CH  (Flash=00H  Required=77H) !
Contents mismatch at: 0800007DH  (Flash=00H  Required=02H) !
Contents mismatch at: 0800007FH  (Flash=00H  Required=08H) !
Contents mismatch at: 08000080H  (Flash=00H  Required=77H) !
Contents mismatch at: 08000081H  (Flash=00H  Required=02H) !
Contents mismatch at: 08000083H  (Flash=00H  Required=08H) !
Contents mismatch at: 08000084H  (Flash=00H  Required=77H) !
Contents mismatch at: 08000085H  (Flash=00H  Required=02H) !
Contents mismatch at: 08000087H  (Flash=00H  Required=08H) !
Contents mismatch at: 08000088H  (Flash=00H  Required=77H) !
Contents mismatch at: 08000089H  (Flash=00H  Required=02H) !
Contents mismatch at: 0800008BH  (Flash=00H  Required=08H) !
Contents mismatch at: 0800008CH  (Flash=00H  Required=77H) !
Contents mismatch at: 0800008DH  (Flash=00H  Required=02H) !
Contents mismatch at: 0800008FH  (Flash=00H  Required=08H) !
Contents mismatch at: 08000090H  (Flash=00H  Required=77H) !
Contents mismatch at: 08000091H  (Flash=00H  Required=02H) !
Contents mismatch at: 08000093H  (Flash=00H  Required=08H) !
Contents mismatch at: 08000094H  (Flash=00H  Required=77H) !
Contents mismatch at: 08000095H  (Flash=00H  Required=02H) !
Contents mismatch at: 08000097H  (Flash=00H  Required=08H) !
Contents mismatch at: 08000098H  (Flash=00H  Required=77H) !
Too many errors to display !
Error: Flash Download failed  -  "Cortex-M4"
Flash Load finished at 11:02:37
Flash失配?什么意思不明白,感觉是Flash整个不能写了。
    采取的措施:按照我知道的两种恢复Flash的方法,丢进.bin 或 .hex程序——,丢进去没有任何问题,但无效;第二个方法,下载前按Reset键,也不成功,总是弹出截图66,也不成功。是否Flash坏了,还是仅仅是锁死了。实话实说,没辙了只能来问。写的很多是因为多我来说从没见过——Freescale的遇多了,自然解决起来得心应手。
能看到这的已是老师级别的坛主了,先谢谢


友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
该问题目前已经被作者或者管理员关闭, 无法添加新回复
4条回答
HELLOKITTYNEW
1楼-- · 2019-07-14 23:33
ctwewer 发表于 2019-1-18 12:05
楼主怎么把主频HCLK(120MHZ)设成8MHZ了?

不可以设置成低点的吗?这种设置也是点击了自动设置后通过的。我可以试试120MHz的系统Clock试试。但现在的问题是无法写入开发板了。只能用手头有的STM板子做实验了,谢谢
HELLOKITTYNEW
2楼-- · 2019-07-15 01:18
ctwewer 发表于 2019-1-18 12:05
楼主怎么把主频HCLK(120MHZ)设成8MHZ了?

本帖最后由 zhjb1 于 2018-1-3 14:09 编辑

尝试了120Mhz,出现红 {MOD}的警告,自动设置后还是恢复成16MHz——比8MHz高了1倍。
ctwewer
3楼-- · 2019-07-15 04:52
 精彩回答 2  元偷偷看……
HELLOKITTYNEW
4楼-- · 2019-07-15 07:51
ctwewer 发表于 2019-1-18 12:41
我怎么没有出现警告?

本帖最后由 zhjb1 于 2018-1-3 15:32 编辑

这次设置成功了,我试试看能否下载。谢谢谢谢!

一周热门 更多>