Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2100] JTAG Connect Problems

2004-02-06 by Bill Knight

OK, got the second problem worked out today.  I have been using a
.gdbinit file for Insight under Cygwin.  If I don't use it and just
connect and download using the GUI, MIXED C and assembly was available
in the source window.  I hacked at the .gdbinit file until I got it
working too.  So for those of you who may be interested, it is
included below.

-Bill Knight
R O Software


echo Setting up the environment for debugging gdb.\n

set complaints 1
#set output-radix 16
#set input-radix 16

# GDB must be set to big endian mode first if needed.
#set endian big

dir .
set prompt (arm-gdb) 

# Set the program file so we can show MIXED C & assembly.
# Must be done before connecting to the target.
file test.elf

# Connect to OcdLibRemote on port 1000 of localhost.
target remote localhost:1000

# Reset the chip to get to a known state.
monitor reset
monitor halt

# LPC Init Values
# Disable IRQ & FIRQ, set SVC mode
set $cpsr = 0xd3

# Increase the packet size to improve download speed.
# Wish this didn't cause an "Are you sure?" popup.
# At least with small programs, they aren't needed.
#set remote memory-write-packet-size 1024
#set remote memory-write-packet-size fixed

# Load the program executable.
load test.elf

# Load the symbols for the program.
symbol-file test.elf

# Set a breakpoint at main().
#b main

# Run to the breakpoint.
#c

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.