eclipse 配合 JLINK Gdb 工具开发

安装yargarto 版本eabi编译链 http://www.yagarto.de/

安装JAVA虚拟机  JRE 就足够了。

下载 eclipse 的 C/C++ 版本

下载 zylin 插件,在 eclipse 的 Help --> Install New Software 中
添加地址 http://opensource.zylin.com/zylincdt/ 就可以了。
按照提示安装之后
debug --> debug configuration 中可以看到 zylin 了

点 Zylin Embedded debug(native) ,因为使用的是 yagarto工具链
新建一个 New Launch configuration 改名为项目的名字。、
C/C++ Application 选择生产的elf文件。

Debugger 页选择gdb具体的路径,例如
C:\yagarto\bin\arm-none-eabi-gdb.exe
command file 选择需要的 gdb启动脚本,可以参考jlink的帮助文档,用现成的修改一下就行了。
其他不需要设置了。


三星2440可以使用内部的4K SRAM练习,如果初始化脚本加入初始化SDRAM控制器的话,
就可以直接下载到SDRAM上面调试了,非常方便。

先运行JLINK的 J_Link GDB Server,然后就可以通过eclipse 调试了。

我的gdbinit脚本

target remote localhost:2331
monitor reset
monitor halt
monitor speed 8000
monitor endian little
monitor reg cpsr = 0xd3

#WDT
monitor memU32 0x53000000 = 0x00000000      #WTCON
#PLL
monitor memU32 0x4C000000 = 0xFFFFFFFF      #LOCKTIME
monitor memU32 0x4C000004 = 0x0005C011      #MPLLCON
monitor memU32 0x4C000008 = 0x00038022      #UPLLCON
monitor memU32 0x4C00000C = 0x00FFFFF0      #CLKCON
monitor memU32 0x4C000010 = 0x00000004      #CLKSLOW
monitor memU32 0x4C000014 = 0x00000005      #CLKDIVN
monitor memU32 0x4C000018 = 0x00000000      #CAMDIVN
#MEMCTRL
monitor memU32 0x48000000 = 0x22011110      #BWSCON
monitor memU32 0x48000004 = 0x00000700      #BANK0-5
monitor memU32 0x48000008 = 0x00000700      
monitor memU32 0x4800000c = 0x00000700
monitor memU32 0x48000010 = 0x00000700
monitor memU32 0x48000014 = 0x00000700
monitor memU32 0x48000018 = 0x00000700
monitor memU32 0x4800001C = 0x00018005      #BANK6-7
monitor memU32 0x48000020 = 0x00018005
monitor memU32 0x48000024 = 0x008C07A3      #REFRESH
monitor memU32 0x48000028 = 0x000000B1      #BANKSIZE
monitor memU32 0x4800002C = 0x00000030      #MRSRB6-7
monitor memU32 0x48000030 = 0x00000030

break main
load
#continue

  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值