Olimex JTag Debugger Not Working !!!

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
shkuc_292731
Level 3
Level 3

we have puchased a Olimex Jtag Debugger...

   

we have installed the drivers for it.... and we followed the procedure given on the Fx3 Programmers manual.

   

Some how its showing up something in the Eclipse Output window... but when we run a program using this Debugger we are getting some error.

   

 

   

please help..

0 Likes
13 Replies
Anonymous
Not applicable

 can you please post some snapshots of the error?

0 Likes
Anonymous
Not applicable

 Download these drivers:

   

https://www.olimex.com/Products/ARM/JTAG/_resources/OpenOCD_OnlinePackage_v1.1.zip

   

Install them.

   

And use the openocd.exe provided with this package and the configuration fiel (EzUSB_FX3.cfg) as mentioned in the Programmer's manual.

   

In the commands tab (while creating a debug configuration) use the command "monitor halt" after "target remote localhost:3333"

   

 

   

Please let us know after you try out the above things I suggested.

   

 

   

Thanks

   

Nikhil

0 Likes
shkuc_292731
Level 3
Level 3

Hi Nikhil,

   

I have tried using the command "monitor halt" after "target remote localhost:3333" its not working...

   

1.The Error message i am getting  while Running the OLIMEX OCD from Run->External Tools-> OLIMEX OCD is,

   

    

   

               

   

Open On-Chip Debugger 0.4.0 (2010-11-23-14:20)

   

Licensed under GNU GPL v2

   

For bug reports, read

   

http://openocd.berlios.de/doc/doxygen/bugs.html

   

jtag_nsrst_delay: 200

   

jtag_ntrst_delay: 200

   

1000 kHz

   

1000 kHz

   

trst_and_srst srst_pulls_trst srst_gates_jtag trst_push_pull srst_open_drain

   

RCLK - adaptive

   

-chain-position required when creating target

   

 

   

 

   

2.The Error Message i am getting while Debugging is,

   

 

   

    

   

   

               

   

86-gdb-set confirm off

   

86^done

   

(gdb)

   

87-gdb-set width 0

   

87^done

   

(gdb)

   

88-gdb-set height 0

   

88^done

   

(gdb)

   

89-interpreter-exec console echo

   

89^done

   

(gdb)

   

90-gdb-show prompt

   

90^done,value="(gdb) "

   

(gdb)

   

91 set prompt (arm-gdb)

   

&"set prompt (arm-gdb)\n"

   

91^done

   

(gdb)

   

set prompt (arm-gdb)

   

93 target remote localhost:2331

   

target remote localhost:2331

   

&"target remote localhost:2331\n"

   

localhost:2331: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

   

&"localhost:2331: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.\n"

   

93^error,msg="localhost:2331: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond."

   

(gdb)

   

115 monitor halt

   

&"monitor halt\n"

   

&"\"monitor\" command not supported by this target.\n"

   

115^error,msg="\"monitor\" command not supported by this target."

   

monitor halt

   

"monitor" command not supported by this target.

   

(gdb)

   

116 monitor speed 1000

   

&"monitor speed 1000\n"

   

monitor speed 1000

   

"monitor" command not supported by this target.

   

&"\"monitor\" command not supported by this target.\n"

   

116^error,msg="\"monitor\" command not supported by this target."

   

(gdb)

   

117 monitor endian little

   

&"monitor endian little\n"

   

&"\"monitor\" command not supported by this target.\n"

   

117^error,msg="\"monitor\" command not supported by this target."

   

monitor endian little

   

"monitor" command not supported by this target.

   

(gdb)

   

118 set endian little

   

&"set endian little\n"

   

~"The target is assumed to be little endian\n"

   

The target is assumed to be little endian

   

118^done

   

set endian little

   

(gdb)

   

119 monitor reset

   

monitor reset

   

"monitor" command not supported by this target.

   

&"monitor reset\n"

   

&"\"monitor\" command not supported by this target.\n"

   

119^error,msg="\"monitor\" command not supported by this target."

   

(gdb)

   

120 monitor reg cpsr =0xd3

   

monitor reg cpsr =0xd3

   

&"monitor reg cpsr =0xd3\n"

   

&"\"monitor\" command not supported by this target.\n"

   

120^error,msg="\"monitor\" command not supported by this target."

   

"monitor" command not supported by this target.

   

(gdb)

   

121 monitor memU32 0xFFFFF014 =0xFFFFFFFF

   

monitor memU32 0xFFFFF014 =0xFFFFFFFF

   

"monitor" command not supported by this target.

   

&"monitor memU32 0xFFFFF014 =0xFFFFFFFF\n"

   

&"\"monitor\" command not supported by this target.\n"

   

121^error,msg="\"monitor\" command not supported by this target."

   

(gdb)

   

122 monitor memU32 0x40000000 =0xE3A00015

   

&"monitor memU32 0x40000000 =0xE3A00015\n"

   

&"\"monitor\" command not supported by this target.\n"

   

122^error,msg="\"monitor\" command not supported by this target."

   

(gdb)

   

monitor memU32 0x40000000 =0xE3A00015

   

"monitor" command not supported by this target.

   

123 monitor memU32 0x40000004 =0xEE090F31

   

monitor memU32 0x40000004 =0xEE090F31

   

"monitor" command not supported by this target.

   

&"monitor memU32 0x40000004 =0xEE090F31\n"

   

&"\"monitor\" command not supported by this target.\n"

   

123^error,msg="\"monitor\" command not supported by this target."

   

(gdb)

   

124 monitor memU32 0x40000008 =0xE240024F

   

&"monitor memU32 0x40000008 =0xE240024F\n"

   

&"\"monitor\" command not supported by this target.\n"

   

124^error,msg="\"monitor\" command not supported by this target."

   

(gdb)

   

monitor memU32 0x40000008 =0xE240024F

   

"monitor" command not supported by this target.

   

125 monitor memU32 0x4000000C =0xEE090F11

   

&"monitor memU32 0x4000000C =0xEE090F11\n"

   

&"\"monitor\" command not supported by this target.\n"

   

125^error,msg="\"monitor\" command not supported by this target."

   

(gdb)

   

monitor memU32 0x4000000C =0xEE090F11

   

"monitor" command not supported by this target.

   

126 monitor memU32 0xE0052000 = 0x00080015

   

monitor memU32 0xE0052000 = 0x00080015

   

"monitor" command not supported by this target.

   

&"monitor memU32 0xE0052000 = 0x00080015\n"

   

&"\"monitor\" command not supported by this target.\n"

   

126^error,msg="\"monitor\" command not supported by this target."

   

(gdb)

   

127 monitor sleep 1000

   

&"monitor sleep 1000\n"

   

&"\"monitor\" command not supported by this target.\n"

   

127^error,msg="\"monitor\" command not supported by this target."

   

monitor sleep 1000

   

"monitor" command not supported by this target.

   

(gdb)

   

128 set $pc =0x40000000

   

set $pc =0x40000000

   

No registers.

   

&"set $pc =0x40000000\n"

   

&"No registers.\n"

   

128^error,msg="No registers."

   

(gdb)

   

129 si

   

si

   

The program is not being run.

   

&"si\n"

   

&"The program is not being run.\n"

   

129^error,msg="The program is not being run."

   

(gdb)

   

130 si

   

&"si\n"

   

&"The program is not being run.\n"

   

si

   

The program is not being run.

   

130^error,msg="The program is not being run."

   

(gdb)

   

131 si

   

&"si\n"

   

si

   

&"The program is not being run.\n"

   

131^error,msg="The program is not being run."

   

The program is not being run.

   

(gdb)

   

132 si

   

si

   

&"si\n"

   

&"The program is not being run.\n"

   

132^error,msg="The program is not being run."

   

The program is not being run.

   

(gdb)

   

133-environment-directory "C:/Users/M031" "C:/Users/M031/.svn" "C:/Users/ M031/Debug" "C:/Users/M031/Release"

   

133^done,source-path="C:/Users/ M031;C:/Users/ M031/.svn;

   

C:/Users/ M031/.svn/pristine;

   

C:/Users/ M031/.svn/pristine/02;

   

C:/Users/ M031/Debug;

   

C:/Users/ M031/Release;$cdir;$cwd"

   

(gdb)

   

134 info threads

   

&"info threads\n"

   

134^done

   

(gdb)

   

135-data-list-register-names

   

135^done,register-names=["r0","r1","r2","r3","r4","r5","r6","r7","r8","r9","r10","r11","r12","sp","lr","pc","f0","f1","f2","f3","f4","f5","f6","f7","fps","cpsr","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]

   

(gdb)

   

136-stack-info-depth

   

136^error,msg="No registers."

   

(gdb)

   

137-stack-info-depth

   

137^error,msg="No registers."

   

(gdb)

   

138-stack-list-frames 0 1

   

138^error,msg="No registers."

   

(gdb)

   

139-break-insert M031.c:532

   

139^error,msg="No symbol table is loaded.  Use the \"file\" command."

   

(gdb)

   

140-break-insert M031.c:101

   

140^error,msg="No symbol table is loaded.  Use the \"file\" command."

   

(gdb)

   

141-break-insert -t main

   

141^error,msg="No symbol table is loaded.  Use the \"file\" command."

   

(gdb)

   

142-stack-list-frames

   

142^error,msg="No registers."

   

(gdb)

   

143 load

   

&"load\n"

   

&"No executable file specified.\n"

   

load

   

No executable file specified.

   

&"Use the \"file\" or \"exec-file\" command.\n"

   

143^error,msg="No executable file specified.\nUse the \"file\" or \"exec-file\" command."

   

(gdb)

   

Use the "file" or "exec-file" command.

   

 

   

 

   

Do you have any other solutions ??

   

 

   

Thanks,

   

Shanthakumar.

0 Likes
Anonymous
Not applicable

 Hi 

   

Please use the attached .cfg file.

   

Rename it as required (I believe you are using the name "EZUSB_FX3.cfg")

   

 

   

Thanks

   

Nikhil

0 Likes
Anonymous
Not applicable

 Also I see that in the debug configuration you have used "target remote localhost:2331"

   

It is 'target remote localhost:3333' for OpenOCD based debuggers.

0 Likes
shkuc_292731
Level 3
Level 3

Hi Nikhil,

   

    

   

               

   

1.First I have connected the Olimex Debugger to the PC , when Fx3 DVK is Powered Off. I have installed the required Drivers from OpenOCD_OnlinePackage_v1.1

   

The Inf driver file that I have installed was in the below path,

   

“C:\OpenOCD_OnlinePackage_v1.1\DRIVERS\olimex-libusb-1.2.2.0\driver.inf”

   

I have copied the ezusb_fx3.cfg file to this Directory “C:\OpenOCD_OnlinePackage_v1.1\OpenOCD”

   

 

   

2.After that I have opened the Eclipse SDK

   

Help->Install New Software->Add->

   

Name        : Zylin

   

Location    : http://opensource.zylin.com/zylincdt

   

and then clicked-> OK

   

Selected the Checkbox in Zylin Embedded CDT

   

After that I have Downloaded and Installed it.

   

Restarted the Eclipse SDK.

   

 

   

3.Run->External tools->External Tool Configurations ->New Launch Configuration

   

Name              : OLIMEX OCD

   

Location          : C:\OpenOCD_OnlinePackage_v1.1\OpenOCD\openocd-libftdi.exe

   

Working Directory : C:\OpenOCD_OnlinePackage_v1.1\OpenOCD\

   

Arguments         : -f ezusb_fx3.cfg

   

Applied the Settings.

   

 

   

4.Run->Debug Configurations->Zylin Embedded Debug(Native)->USBVideoClass Debug->Debugger

   

Debugger     :Embedded GDB

   

GBD Debugger : arm-none-eabi-gdb.exe

   

Selected the Check box->Verbose Console mode

   

Run->Debug Configurations->Zylin Embedded Debug(Native)->USBVideoClass Debug->Commands

   

‘Initialize’ commands :

   

set prompt (arm-gdb)

   

# This connects to a target via netsiliconLibRemote

   

# listening for commands on a TCP port on the local machine.

   

# 2331 if the Segger J-Link GDB Server is being used

   

# 3333 if OpenOCD is being used

   

# Uncomment the appropriate line below:

   

#target remote localhost:2331

   

target remote localhost:3333

   

monitor halt

   

monitor speed 1000

   

monitor endian little

   

set endian little

   

monitor reset

   

# Set the processor to SVC mode

   

monitor reg cpsr =0xd3

   

# Disable all interrupts

   

monitor memU32 0xFFFFF014 =0xFFFFFFFF

   

# Enable the TCMs

   

monitor memU32 0x40000000 =0xE3A00015

   

monitor memU32 0x40000004 =0xEE090F31

   

monitor memU32 0x40000008 =0xE240024F

   

monitor memU32 0x4000000C =0xEE090F11

   

# Change the FX3 SYSCLK setting based on

   

# input clock frequency. Update with

   

# correct value from list below.

   

# Clock input is 19.2 MHz: Value = 0x00080015

   

# Clock input is 26.0 MHz: Value = 0x00080010

   

# Clock input is 38.4 MHz: Value = 0x00080115

   

# Clock input is 52.0 MHz: Value = 0x00080110

   

monitor memU32 0xE0052000 = 0x00080015

   

# Add a delay to let the clock stabilize.

   

monitor sleep 1000

   

set $pc =0x40000000

   

si

   

si

   

si

   

si

   

‘Run’ Commands :

   

Load

   

And Applied the Settings

   

 

   

5.Connected the  Fx3 DVK board to the Pc and loaded the Firmware to Fx3

   

 

   

6.When I click the Debug button I am getting these Errors :

   

set prompt (arm-gdb)

   

target remote localhost:3333

   

localhost:3333: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

   

monitor halt

   

"monitor" command not supported by this target.

   

monitor speed 1000

   

"monitor" command not supported by this target.

   

monitor endian little

   

"monitor" command not supported by this target.

   

set endian little

   

monitor reset

   

"monitor" command not supported by this target.

   

monitor reg cpsr =0xd3

   

"monitor" command not supported by this target.

   

monitor memU32 0xFFFFF014 =0xFFFFFFFF

   

"monitor" command not supported by this target.

   

monitor memU32 0x40000000 =0xE3A00015

   

"monitor" command not supported by this target.

   

monitor memU32 0x40000004 =0xEE090F31

   

"monitor" command not supported by this target.

   

monitor memU32 0x40000008 =0xE240024F

   

"monitor" command not supported by this target.

   

monitor memU32 0x4000000C =0xEE090F11

   

"monitor" command not supported by this target.

   

monitor memU32 0xE0052000 = 0x00080015

   

"monitor" command not supported by this target.

   

monitor sleep 1000

   

"monitor" command not supported by this target.

   

set $pc =0x40000000

   

No registers.

   

si

   

The program is not being run.

   

si

   

The program is not being run.

   

si

   

The program is not being run.

   

si

   

load

   

You can't do that when your target is `exec'

   

 

   

 

   

Whether the above Configurations are Correct ? Did I miss something ?

   

Please Help..

   

 

   

Thanks,

   

Shanthakumar

0 Likes
Anonymous
Not applicable

 Yes, seems like you are doing "Run" and "Debug" before connecting the FX3 kit to Olimex.

   

As far as the External tools configuration and Debug configuration goes, you have done it right. The configurations are saved now.

   

Please follow the below steps:

   

1) Connect Olimex to PC through USB

   

2) Connect Olimex to FX3 via JTAG connector

   

3) Switch on the FX3 kit ( make sure the PMODE is set to USB boot: PMODE[2:0]=F11)

   

4) Open Eclipse and Click on Run->External tool configuration->(Saved configuration)

   

At this point the Connection between Eclipse, Olimex adapter and the target (FX3) is established

   

5) Now click on the saved debug configuration.

   

The configuration gets "launched" ( you can view this in bottom right corner of eclipse screen). After the launch is complete you will probably have to click on "Resume" ( in the debug window) once. The cursor will stop at Main (if you have used "Break Main" command in the load section of debug configuration) or it will stop at the assigned break point.

   

Let me know if you were able to debug fine after following these steps.

   

 

   

Thanks

   

Nikhil

0 Likes
shkuc_292731
Level 3
Level 3

Hi Nikhil,

   

 

   

I have followed these steps as you have told and still i am getting the error.

   

 

   

Yes i am using Stop on Startup at Main.

   

After i have Clicked the Resume, i am getting this dialog box

   

   

 

   

I am giving yes, then it giving the following Error.

   

   

 

   

In the Console window i am getting this error,

   

load
No executable file specified.
Use the "file" or "exec-file" command.

   

 

   

Do you have anyother solution ?

   

 

   

 

   

Thanks,

   

Shanthakumar

0 Likes
Anonymous
Not applicable

Hello.

   

I had same problem. Check that  '*.elf' of your project is added to

   

Run->Debug Configurations->Zylin Embedded Debug(Native)->USBVideoClass Debug->Main->C/C++ Applications

   

Fill this field if it wasn't filled automatically.

0 Likes
shkuc_292731
Level 3
Level 3

Hi suppy,

   

I have tried that also...but its not working...

   

Anyone else having a solution for this ?

   

 

   

Thanks,

   

Shanthakumar

0 Likes
Anonymous
Not applicable

In my case everything works only if I set full path to .elf file to

   

Run->Debug Configurations->Zylin Embedded Debug(Native)->USBVideoClass Debug->Main->C/C++ Applications

   

For example: C:\...\USBVideoClass\Debug\USBVideoClass.elf

   

Did you try to set full path to *.elf file to this field?

0 Likes
shkuc_292731
Level 3
Level 3

Hi suppy,

   

Yes , i have selected the path and checked it.

   

Now also the same error.

   

any other solution ?

   

 

   

Thanks,

   

Shanthakumar

0 Likes
Anonymous
Not applicable

Please try everything from the start. Probably even restart your system and then try.

   

As far as the steps I previousy mentioned, everything should work fine.

   

IF you are still unablel to debug successfully, please create a tech support case. Please ask one of our engineers to access your computor remotely and try to debug the issue.

   

That will be a faster way to debug the issue.

   

 

   

Thanks

   

Nikhil

0 Likes