Open OCD in eclipse, appears to run but nothing happens.

Hi, I am newbie to ARM and Open OCD, etc.

I have been working through the jlynch tutorial:

“Using Open Source Tools for SAM7 Cross Development”

OpenOCD is running inside Eclipse using the Zylin CDT (on Windows XP).

I have successfully compiled some example code: “demo_at91sam7_flash_blink” and downloaded the binary to the device: AT91SAM7S256 using the SAM-BA bootloader utility. The program runs and the LED is flashing.

I am using Olimex ARM-USB-OCD with the development board SAM7-P256. I copied the following config file the berlios website:

The following script was used with an Olimex ARM-JTAG-OCD and a AT91SAM7S64 cpu: 
#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 

#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


# flash-options AT91
working_area 0 0x00200000 0x4000 nobackup
flash bank at91sam7 0 0 0 0 0


# Information: 
# erase command (telnet-interface) for complete flash:
# flash erase <num> 0 numlockbits-1 (can be seen from output of flash info 0)
# SAM7S64 with 16 lockbits and bank 0: flash erase 0 0 15
# set/clear NVM-Bits:
# at91sam7 gpnvm <num> <bit> <set|clear>
# disable locking from SAM-BA:
# flash protect 0 0 1 off



# For more information about the configuration files, take a look at:
# http://openfacts.berlios.de/index-en.phtml?title=Open+On-Chip+Debugger

In my eclipse Debug configuration, I have two windows for entering debug commands. In the “Initialise” window I have entered:

target remote localhost:3333
monitor soft_reset_halt
monitor arm7_9 force_hw_bkpts enable
symbol-file main.out
thbreak main
continue

I have left the “Run” window empty.

When I run the debugger configuration, my Console window displays: “(gdb)” and then clears. Eclipse indicates that OpenOCD is running but nothing is happening. There are no breakpoints to view and there is no further output in the console window.

I would be grateful for your advice.

Thanks

Mark

capture.pdf (91.5 KB)

Hi Sparkymark567.

The most recent version of the Zylin CDT has the commands separated into two screens (initialize and run) as you have pointed out. I’m working on a revision of my tutorial to address this change.

I suggest that you put the command TARGET REMOTE LOCALHOST:3333 into the initialize screen and put the rest of the commands into the “Run” screen.

Try that and report back.

Cheers,

Jim Lynch

Thanks for your reply.

Unfortunately I could not get this to work, probably because I have done something else wrong somewhere.

I have noticed a few differences between the CDT and the tutorial:

  1. In the “create, manage and run configurations window”, the left hand panel displaying the tree list, now has 2 options: <Embedded Debug (Cygwin)> and <Embedded Debug (Native)>. I selected .

  2. In the tab there is an option to select a GDB Command file. I left this blank.

  3. In the tab, there is a list box to select the GDB command set, there is however only one option .

  4. In the tab, there is a list box to select a Protocol, the options are: . I used the default mi option.

  5. As your post. I have put: “target remote localhost:3333” under intialise and moved the remaining commands to ‘Run’.

I guess that most of these will probably not affect your tutorial very much. However, I can still not get the degugger to run.

I use the following procedure:

  1. Cycle power to the board.

  2. Run OpenOCD as an external tool.

  3. Launch the Debugger.

When I run Open OCD I get the following output on the Console:

Info:    openocd.c:82 main(): Open On-Chip Debugger (2006-10-12 18:00 CEST)
Info:    configuration.c:50 configuration_output_handler(): Command The not found
Warning: arm7_9_common.c:683 arm7_9_assert_reset(): srst resets test logic, too

I’m not sure whether the console output is the correct one, but OpenOCD appears to be running.

If I launch the debugger, I get an error message as follows:

“Errors exist in a required project. Continue Launch? ”. If I select I end up in a state where Open OCD and the Debugger both appear to be running, but nothing else happens.

Regards

Mark

It appears I had an error in config file:

If I run OpenOCD, the output is now:

Info:    openocd.c:82 main(): Open On-Chip Debugger (2006-10-12 18:00 CEST)
Warning: arm7_9_common.c:683 arm7_9_assert_reset(): srst resets test logic, too

I think this output is the correct one, but I still can’t get the debugger to run at the moment.