Problems with Insigth and OpenOCD

Hi,

I’m evaluating the possibility of using Olimex ARM-USB-OCD and OpenOCD to debug programs running from RAM. One of the boards I’m testing is the Atmel AT91EB55 witch is build around the AT91M55800 microcontroller (ARM7TDMI core).

At this moment I’m not using any IDE, just GNU ARM toolchain and OpenOCD. This is the script I wrote, based on other scripts and the information presented at the berliOS OpenOCD site:

#daemon configuration
telnet_port 4444
gdb_port 3333 


#interface
interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG A"
ft2232_layout olimex-jtag
ft2232_vid_pid 0x15BA 0x0003
jtag_speed 0
jtag_nsrst_delay 200
jtag_ntrst_delay 200 

#use combined on interfaces or targets that can't set TRST/SRST separately
reset_config srst_only srst_pulls_trst 

#jtag scan chain
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
jtag_device 4 0x1 0xf 0xe 
#jtag_device 4 

#target configuration
daemon_startup reset 

#target <type> <startup mode>
#target arm7tdmi <endianness> <reset mode> <chainpos> <variant>
target arm7tdmi little run_and_halt 0 arm7tdmi
run_and_halt_time 0 30

The problem is that, when I try to connect to the target, using arm-elf-insight, I get:

Couldn’t establish connection to remote target
Malformed response to offset query, timeout

After trying this, the telnet session also stops responding.

Does anyone share some light on why this is happening?

Thanks,

Luís M. Costa

To ensure that everything is set up correctly you should try with GDB only first. Start up arm-elf-gdb, and connect to the target with:

target remote localhost:3333

This should connect you to the target and display the current address at which the target was halted.

The response from Insight could indicate that you tried to connect to the telnet port with a GDB client - make sure you’re using port 3333. Also, be sure to select the Remote/TCP protocol in Insight.

I don’t know the AT91M55800, but chance are that it doesn’t need the nsrst_pulls_ntrst option. Check the OpenOCD Wiki for a description of the reset_config setting.

Regards,

Dominic

Thanks for the response Dominic!

Dominic:
To ensure that everything is set up correctly you should try with GDB only first. Start up arm-elf-gdb, and connect to the target with:

target remote localhost:3333

This should connect you to the target and display the current address at which the target was halted.

I have tried what you suggested, but the results weren’t very good…

D:\OpenOCD>arm-elf-gdb
GNU gdb 6.0
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
This GDB was configured as "--host=i686-pc-cygwin --target=arm-elf".
(gdb) target remote localhost:3333
Remote debugging using localhost:3333
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Couldn't establish connection to remote target
Malformed response to offset query, timeout

Dominic:
]The response from Insight could indicate that you tried to connect to the telnet port with a GDB client - make sure you’re using port 3333. Also, be sure to select the Remote/TCP protocol in Insight.

All configurations are according your suggestions.

Dominic:
I don’t know the AT91M55800, chances are that it doesn’t need the nsrst_pulls_ntrst option. Check the OpenOCD Wiki for a description of the reset_config setting.

I’m not using nsrst_pulls_ntrst, but I’ll look to the reset_config commnad options with more attention.

Thanks again,

Luís M. Costa

Hello Luis,

could you send me a logfile (run with -d -l ) do Dominic Rath gmx de?

Regards,

Dominic

Thaks for the response Dominic!

Dominic:
To ensure that everything is set up correctly you should try with GDB only first. Start up arm-elf-gdb, and connect to the target with:

target remote localhost:3333

This should connect you to the target and display the current address at which the target was halted.

I have tried this, but the results weren't very good:
D:\OpenOCD>arm-elf-gdb
GNU gdb 6.0
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
This GDB was configured as "--host=i686-pc-cygwin --target=arm-elf".
(gdb) target remote localhost:3333
Remote debugging using localhost:3333
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Couldn't establish connection to remote target
Malformed response to offset query, timeout

Dominic:
The response from Insight could indicate that you tried to connect to the telnet port with a GDB client - make sure you’re using port 3333. Also, be sure to select the Remote/TCP protocol in Insight.

All configurations are according your suggestions.

Dominic:
I don’t know the AT91M55800, but chance are that it doesn’t need the nsrst_pulls_ntrst option. Check the OpenOCD Wiki for a description of the reset_config setting.

I’m not using the nsrst_pulls_ntrst, but I’ll confirm the reset_config options.