安装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