接上一篇。
这里主要是对ECLIPSE与J-LINK相关的设置。首先导入现有的例程,以最简单的驱动IO的例程GpioApp为例,先选中这个工程,再右键,弹出如下快捷菜单,
弹出调试配置页面,如下所示,选择左侧最下面一项,
接下来再双击刚才选择的那项,出现所选择例程GpioApp对应的配置,如下,
接下来设置Debugger一项,共有几个需要修改的地方,如下,
最后是Commands选项卡需要如下设置,
其中第二个框输入的命令较多的,直接拷贝以下命令就可以,
set prompt (arm-gdb)
# This connects to a target via netsiliconLibRemote
# listening for commands on this PC's tcp port 2331
target remote localhost:2331
monitor speed 1000
monitor endian little
set endian little
monitor reset
# Set the processor to SVC mode
monitor reg cpsr =0xd3
# Disable all interrupts
monitor memU32 0xFFFFF014 =0xFFFFFFFF
# Enable the TCMs
monitor memU32 0x40000000 =0xE3A00015
monitor memU32 0x40000004 =0xEE090F31
monitor memU32 0x40000008 =0xE240024F
monitor memU32 0x4000000C =0xEE090F11
# Change the FX3 SYSCLK setting based on
# input clock frequency. Update with
# correct value from list below.
# Clock input is 19.2 MHz: Value = 0x00080015
# Clock input is 26.0 MHz: Value = 0x00080010
# Clock input is 38.4 MHz: Value = 0x00080115
# Clock input is 52.0 MHz: Value = 0x00080110
monitor memU32 0xE0052000 = 0x00080015
# Add a delay to let the clock stabilize.
monitor sleep 1000
set $pc =0x40000000
si
si
si
si
以上内容设置完成后,就可以进入Debug模式了,你可以单步、设置断点操作,随时查看某个函数的执行。
另公布一群号178338109,CYUSB3014开发专业讨论区。
我的博客:http://bbs.ednchina.com/BLOG_liangziusb_440752.HTM
淘宝店铺:http://shop64171919.taobao.com
文章评论(0条评论)
登录后参与讨论