tracksun 发表于 2021-6-29 14:26:25

RT1050无法从FLASH启动

自己画的板,主控RT1052,无外置RAM,FLASH为W25Q64JVST,IDE为McuXpresso V11.3,SDK为V2.9.1
硬件方面:Flash接FlexSPI_A(GPIO_SD_B1_06~11),DQS已悬空,BOOT_CFG1和BOOT_CFG2均接地。
软件方面:跑一个HelloWorld,已配置XIP的三个宏,已配置flexspi_nor_config_t结构体并确定参数正确,程序在开发板上跑通并正确。
现状:BOOT_MODE设置为,通过CMSIS-DAP(或ULINK2)连接SWD,下载程序正常(通过工具回读Flash的结果与二进制文件做过比较),DEBUG时无法进入到Main函数,提示错误:
Program stopped.
0x0020d138 in ?? ()GDB trace信息如下:
748,874 2-list-thread-groups
748,889 2^done,groups=[{id="i1",type="process"}]
748,889 (gdb)
752,035 3-gdb-version
752,049 ~"GNU gdb (GNU Arm Embedded Toolchain 9-2020-q2-update) 8.3.1.20191211-git\n"
752,049 ~"Copyright (C) 2019 Free Software Foundation, Inc.\n"
752,049 ~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is fre\
e software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitt\
ed by law."
752,049 ~"\nType \"show copying\" and \"show warranty\" for details.\n"
752,049 ~"This GDB was configured as \"--host=i686-w64-mingw32 --target=arm-none-eabi\".\n"
752,049 ~"Type \"show configuration\" for configuration details.\n"
752,049 ~"For bug reporting instructions, please see:\n"
752,049 ~"<http://www.gnu.org/software/gdb/bugs/>.\n"
752,049 ~"Find the GDB manual and other documentation resources online at:\n    <http://www.gnu.org/\
software/gdb/documentation/>."
752,049 ~"\n\n"
752,049 ~"For help, type \"help\".\n"
752,049 ~"Type \"apropos word\" to search for commands related to \"word\".\n"
752,049 3^done
752,049 (gdb)
752,050 4-environment-cd E:/McuXpresso/evkbimxrt1050_hello_world
752,064 4^done
752,064 (gdb)
752,065 5-gdb-set breakpoint pending on
752,080 5^done
752,080 (gdb)
752,080 6-gdb-set detach-on-fork on
752,096 6^done
752,096 (gdb)
752,096 7-enable-pretty-printing
752,111 7^done
752,111 (gdb)
752,111 8-gdb-set python print-stack none
752,127 8^done
752,127 (gdb)
752,127 9-gdb-set print object on
752,142 9^done
752,142 (gdb)
752,142 10-gdb-set print sevenbit-strings on
752,157 10^done
752,157 (gdb)
752,157 11-gdb-set host-charset UTF-8
752,173 11^done
752,173 (gdb)
752,173 12-gdb-set target-charset GBK
752,189 12^done
752,189 (gdb)
752,189 13-gdb-set target-wide-charset UTF-16
752,205 13^done
752,205 (gdb)
752,205 14-gdb-set dprintf-style call
752,220 14^done
752,220 (gdb)
752,220 15-gdb-set target-async on
752,235 15^done
752,235 (gdb)
752,235 16-gdb-set record full stop-at-limit off
752,250 16^done
752,250 (gdb)
752,250 17-gdb-set non-stop on
752,266 17^done
752,266 (gdb)
752,266 18-gdb-set auto-solib-add on
752,281 18^done
752,281 (gdb)
752,283 19-file-exec-and-symbols --thread-group i1 E:/McuXpresso/evkbimxrt1050_hello_world/Debug/evk\
bimxrt1050_hello_world.axf
752,353 19^done
752,353 (gdb)
752,354 20-interpreter-exec console "set non-stop on"
752,374 20^done
752,374 (gdb)
752,374 21-interpreter-exec console "set pagination off"
752,390 =cmd-param-changed,param="pagination",value="off"
752,390 21^done
752,390 (gdb)
752,391 22-interpreter-exec console "set mi-async"
752,406 22^done
752,406 (gdb)
752,406 23-interpreter-exec console "set remotetimeout 60000"
752,421 =cmd-param-changed,param="remotetimeout",value="60000"
752,421 23^done
752,421 (gdb)
752,477 24-target-select extended-remote | crt_emu_cm_redlink -msg-port=56371 -g -mi -2 -pMIMXRT1052\
xxxxB -vendor=NXP --connectscript=RT1050_connect.scp-ProbeHandle=1 -CoreIndex=0 -cache=disable --f\
lash-hashing --flash-driver= -x E:/McuXpresso/evkbimxrt1050_hello_world/Debug --flash-dir C:/nxp/MCU\
XpressoIDE_11.3.0_5222/ide/plugins/com.nxp.mcuxpresso.tools.bin.win32_11.3.0.202101111546/binaries/F\
lash --flash-dir E:/McuXpresso/.mcuxpressoide_packages_support/MIMXRT1052xxxxB_support/Flash --telne\

754,765 =thread-group-started,id="i1",pid="42000"
754,765 =thread-created,id="1",group-id="i1"
754,765 *running,thread-id="1"
754,894 ~"\nProgram"
754,894 ~" stopped.\n"
754,896 ~"0x0020d138 in ?? ()\n"
754,896 *stopped,reason="signal-received",signal-name="0",signal-meaning="Signal 0",frame={addr="0x0\
020d138",func="??",args=[],arch="armv7e-m"},thread-id="1",stopped-threads=["1"]
754,896 24^connected
754,896 (gdb)
754,897 25-interpreter-exec console "set mem inaccessible-by-default on"
754,897 25^done
754,897 (gdb)
754,898 26-interpreter-exec console "mon ondisconnect cont"
754,923 26^done
754,923 (gdb)
754,923 27-interpreter-exec console "set arm force-mode thumb"
754,923 =cmd-param-changed,param="arm force-mode",value="thumb"
754,923 27^done
754,923 (gdb)
754,924 28-interpreter-exec console "set remote hardware-breakpoint-limit 6"
754,924 =cmd-param-changed,param="remote hardware-breakpoint-limit",value="6"
754,924 28^done
754,924 (gdb)
754,924 29set range-stepping on
754,925 &"set range-stepping on\n"
754,925 29^done
754,925 (gdb)
754,925 30-interpreter-exec console "mon semihost enable"
754,939 30^done
754,939 (gdb)
754,939 31-target-download
754,970 31+download,{section=".boot_hdr",section-size="8192",total-size="1779440"}
754,970 31+download,{section=".boot_hdr",section-sent="8192",section-size="8192",total-sent="8192",t\
otal-size="1779440"}
754,986 31+download,{section=".text",section-size="17948",total-size="1779440"}
754,986 31+download,{section=".data",section-size="104",total-size="1779440"}
755,502 32-list-thread-groups
755,616 31^done,address="0x600022f0",load-size="26244",transfer-rate="361984",write-rate="6561"
755,616 (gdb)
755,616 33-interpreter-exec console "mon SWO datasource"
755,617 32^done,groups=[{id="i1",type="process",pid="42000",executable="E:\\McuXpresso\\evkbimxrt105\
0_hello_world\\Debug\\evkbimxrt1050_hello_world.axf"}]
755,617 (gdb)
755,623 34-list-thread-groups i1
755,631 33^done
755,631 (gdb)
755,635 35-gdb-show --thread-group i1 language
755,663 34^done,threads=[{id="1",target-id="Thread 1",details="Runnable",frame={level="0",addr="0x60\
0022f0",func="ResetISR",args=[],file="../startup/startup_mimxrt1052.c",fullname="E:\\McuXpresso\\evk\
bimxrt1050_hello_world\\startup\\startup_mimxrt1052.c",line="638",arch="armv7e-m"},state="stopped"}]\

755,663 (gdb)
755,664 35^done,value="auto"
755,664 (gdb)
755,665 36-gdb-set --thread-group i1 language c
755,665 36^done
755,665 (gdb)
755,665 37-interpreter-exec --thread-group i1 console "p/x (char)-1"
755,666 ~"$1 = 0xff\n"
755,666 37^done
755,666 (gdb)
755,666 38-data-evaluate-expression --thread-group i1 "sizeof (void*)"
755,667 38^done,value="4"
755,667 (gdb)
755,667 39-gdb-set --thread-group i1 language auto
755,667 39^done
755,667 (gdb)
755,668 40-interpreter-exec --thread-group i1 console "show endian"
755,668 ~"The target endianness is set automatically (currently little endian)\n"
755,668 40^done
755,668 (gdb)
755,671 41-break-insert -t -h -f main
755,671 42-stack-info-depth --thread 1 11
755,709 41^done,bkpt={number="1",type="hw breakpoint",disp="del",enabled="y",addr="0x6000266e",func=\
"main",file="../source/hello_world.c",fullname="E:\\McuXpresso\\evkbimxrt1050_hello_world\\source\\h\
ello_world.c",line="36",thread-groups=["i1"],times="0",original-location="main"}
755,709 (gdb)
755,709 43-gdb-show --thread-group i1 new-console
755,709 42^done,depth="1"
755,710 (gdb)
755,710 43^error,msg="Undefined show command: \"new-console\".Try \"help show\"."
755,710 (gdb)
755,711 44-exec-continue --thread-group i1
755,711 44^running
755,711 *running,thread-id="1"
755,773 (gdb)
756,047 45-thread-info 1
756,117 45^done,threads=[{id="1",target-id="Thread 1",details="Running",state="running"}]
756,117 (gdb)
756,134 46-thread-select 1
756,159 47-thread-select 1
756,165 46^done,new-thread-id="1"
756,165 (gdb)
756,166 48-thread-select 1
756,229 47^done,new-thread-id="1"
756,229 (gdb)
756,276 48^done,new-thread-id="1"
756,276 (gdb)
貌似RESET后BOOTROM程序在ROMCP段因某个逻辑判断异常后终止。
因烧写的程序数据是对的,于是将BOOT_MODE切到位置,再次上电启动,串口未能正常输出HelloWorld,也就是说,程序仍旧未能正确执行。
请问各位大佬,有遇到过这样的问题吗?可能的原因何在?

eric2013 发表于 2021-6-30 09:42:49

帮顶。
页: [1]
查看完整版本: RT1050无法从FLASH启动