Rahul Balani> I am new to this mailing list.

Welcome.

=====================

Rahul Balani> [i.MX21]

Hmm - I have an iMX27 - close but not exactly the same.

=====================

Rahul Balani>  OpenOCD (rev: 1187)

Reasonably very new :-) FYI there is/was a big change to one of the 
commands I just committted.

To be clear: Don't be tempted to move to the newer version "just yet" -
what you have should work fine. You have two options.

Option 1 - stay where you are. It should just work. now
Option 2 - Move to the newer version.

Below, you ask some questions and I will refer to to the *NEW* user 
manual (this new manual appeared in SVN r1194) you do not have it but it 
is on-line now.

HTML DOCS are located here:
    http://openocd.berlios.de/doc/index.html

=====================

Rahul Balani> gdb 6.8 with an Olimex ARM-USB-OCD.

I have the same one, I use "Insight (aka: The Tcl/Tk Version of GDB) 6.8" -
that should not be any problem.

Did *YOU* build this, GDB, or did somebody else build it.
Where did you get it form? (I build my own from the gdb ftp site)

=====================

Rahul> My configuration and gdbinit script is given below:

Thank you very much for supplying all of this information in your first 
email!
Often others give vague and incomplete pleas for help.

=====================

Rahul> [SNIP: OpenOcd.cfg file]

Seems fine with me :-)

FYI - in this email, I refer to the *NEW* version of OpenOCD.
There was a recent large change - one thing was a better user manual :-)

The type of configuration file you have is a called a "monolithic 
configuration file"
Very useful for debugging and figuring things out and getting it up and 
running.
See Section 6 of the new user manual.

=====================

Rahul > [SNIP: ".gdbinit"]

You did not say host development system.
based on the OpenOCD.cfg and the .GDBINIT file.

My hunch is:  Linux Dev Host + with usb jtag.
Please confirm.

=====================

Rahul>   [ snip ] seen some messages [about] debug reason MOE=0xc,

Rahul>  I only got those messages when I used jtag_speed 0.
Rahul> And, along with that, the jtag device ID reported with speed 0 
was wrong.

Item #1 - "JTAG SPEED 0" - means: Try to use "RTCK" method.

Your JTAG Dongle does not support this.

Does your target actually support the RTCK?
Is it actually wired on the board?
(Some board vendors think you do not need it)

For more information see the *NEW* ( >= r1194) user manual -

(A)
    It is actually easier for humans to understand the newer command:  
"jtag_khz"
    See section 9.3 Jtag Speed. (of the *new* user manual)

(B) See FAQ number 1. "RTCK What is it?"
    Section 21 of the *new* user manual.

    http://openocd.berlios.de/doc/FAQ.html#FAQ

    This discusses "RTCK" and issues associated with it.

   If you use "Option 2" - a quick rule of thumb is to use "jtag_khz 
1000" for now.
   Make that work reliably 100% of the time.
   Then - try faster speeds. - See Option #2 under FAQ #1 - "RTCK What 
is it?"
   
=====================

Rahul> [errors when loading to ram]

You are loading to SDRAM correct?
What is initializing the SDRAM controller?
And the CPU osccilators?

I presume, based on your OPENOCD script the following:

(A) You RESET and let the board run, ie: "reset run"

(B) Some program runs perhaps a flash rom on your board?
    Is it a boot loader?

(C) Does that flash rom initialize the SDRAM?

IF NOT - you have to do this with a series of "mww" commands.
In the *NEWER* version of OpenoCD ( >= r1194) you will find a *BOARD* 
directory.

See ${INSTALL_DIR}/lib/openocd/board/<FILENAME>.cfg

for examples.
Also see the *NEW* manual (>=r1194) section 6.2

(D) Does that flash rom configure the MMU
    Or turn the CACHE on? (which requires the MMU)

(E) If the MMU is enabled - are you writing to locations that are 
"disabled" via the MMU?

=====================

Rahul> [snip] This is trying to load the program at RAM address 0xC0100000.
Rahul> [snip]  This is the 64 MB external SDRAM mapped at 0xC0000000.

Hmm - You say mapped? - I point back to my MMU question (E).

Or is the memory just there?

=====================

rahul> It is possible that the first line in X-packet protocol ...

First: GDB is fine.  I know it is - I use this version.
Second: OpenOCD is fine, I know it is, I used versions before & after 
that version and many others.

=====================

rahul> I also have an IAR J-Link usb dongle that I used with this board 
and got similar results with the only difference that I was able to use 
jtag_speed 0

Two things:
    The IAR dongles supports RTCK.
    The Olimex dongle does not - I would expect problems at high speed.

YEA! - This tells me that the IAR version of JLink works ! YEA !
I can remove my note in the new manual at "Section 3.4 USB JLINK based" 
- last bullet!
Very helpful.

===================

When you are done = and it works = would you like to submit a complete 
target configuration for

(A) your board
and
(B) your target

So we can add them to the list.
Be sure to put a (C)opyright YOURNAME at the top of the file.

===================
END
===================

-Duane

_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to