eclipse下jlink如何设置
问下在eclipse下用jlink调试rtt时jlink如何设置,我用的是mini2440的板子本帖最后由 moyanqd 于 2013-9-9 00:03 编辑
initialize
# This connects to a GDB Server listening
# for commands on localhost at tcp port 2331
target remote localhost:2331
# Enable flash download and flash breakpoints.
# Flash download and flash breakpoints are features of
# the J-Link software which require separate licenses
# from SEGGER.
# Select flash device
monitor flash device = STM32F103C8
# Enable FlashDL and FlashBPs
monitor flash download = 1
monitor flash breakpoints = 1
# Clear all pendig breakpoints
monitor clrbp
# Set gdb server to little endian
monitor endian little
# Set JTAG speed to 5 kHz
monitor speed 5
# Reset the target
monitor reset 0
monitor sleep 100
# Set JTAG speed in khz
run
monitor reg r13 = (0x00000000)
monitor reg pc = (0x00000004)
#reset
break main
continue 我用的是STM32系列的,你可以参考修改 我有自己配置的TQ2440板子,在Linux下Eclipse通过gdb连接Jlink GDB Server调试的init commands:target remote192.168.2.105:2331
monitor arm920t sw_bkpts enable
monitor endian little
monitor reset
monitor MemU32 0x53000000=0x00000000
monitor MemU32 0x53000000=0x00000000
monitor MemU32 0x4A000008=0xFFFFFFFF
monitor MemU32 0x4A00001C=0x000007FF
monitor MemU32 0x56000050=0x000055AA
monitor MemU32 0x4C000014=0x00000007
monitor MemU32 0x4C000000=0x00FFFFFF
monitor MemU32 0x4C000004=0x00061012
monitor MemU32 0x4C000008=0x00040042
monitor MemU32 0x48000000=0x22111120
monitor MemU32 0x48000004=0x00000700
monitor MemU32 0x48000008=0x00000700
monitor MemU32 0x4800000C=0x00000700
monitor MemU32 0x48000010=0x00001f4c
monitor MemU32 0x48000014=0x00000700
monitor MemU32 0x48000018=0x00000700
monitor MemU32 0x4800001C=0x00018005
monitor MemU32 0x48000020=0x00018005
monitor MemU32 0x48000024=0x008e04f4
monitor MemU32 0x48000028=0x00000032
monitor MemU32 0x4800002C=0x00000030
monitor MemU32 0x48000030=0x00000030
load
#break do_menu
#break _start_armboot
break reset
#break main
continue其中:
monitor MemU32 0x53000000=0x00000000
monitor MemU32 0x53000000=0x00000000
为关WDT。
monitor MemU32 0x4A000008=0xFFFFFFFF
monitor MemU32 0x4A00001C=0x000007FF
为关闭中断。
后面的大部分都是memory配置。根据自己的需要配置。
顺便说一下,如果不是很熟悉gdb和monitor的命令,那么可以直接使用gdb来调试,多熟悉一下命令。 如果不知道Jlink monitor的命令,那么使用monitor命令来查找。这样子有助于学习。 moyanqd 发表于 2013-9-8 23:59 static/image/common/back.gif
initialize
# This connects to a GDB Server listening
# for commands on localhost at tcp port 2331
我用STM32F103RB的板子,按照你那配置还有官方的教程
http://www.rt-thread.org/dokuwiki/doku.php?id=%E9%85%8D%E7%BD%AEeclipse%E9%9B%86%E6%88%90%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83_%E7%BC%96%E8%AF%91_%E8%B0%83%E8%AF%95
直接下载还是可以的,但就是不能调试,配置命令跑完后就kill了,网上查了也没解决,不知你知道不?
页:
[1]