David Brownell | 1 Apr 05:32 2010
Picon

Re: arm mcr

On Wednesday 31 March 2010, Alexei Babich wrote:
> From: 
> Alexei Babich <a.babich@...>  (Rezonans plc.)
>   To: 
> openocd-development@...
>   Date: 
> Today 1:14:51 am
>    
> Hello everyone.
> Sorry for the stupid question.
> When I run the Open On-Chip Debugger 0.5.0-dev-00141-g33e5dd1 and connect via telnet to it, I run the
command 'help arm', which shows, in particular:
> ---
> arm mcr cpnum op1 CRn op2 CRm value
>         write coprocessor register
> ---
> 
> In the OpenOCD manual written otherwise, as I understand it:
> ---
> arm mcr pX op1 CRn CRm op2 value
> ---
> 
> The order of arguments is different?

There *should* be a single order, matching the ARM Architecture Reference Manual,
which says (v7A/AR edition)
MCR<c> <coproc>,<opc1>,<Rt>,<CRn>,<CRm>{,<opc2>}

However, the OpenOCD code has suffered confusion on that point.  At on point I
counted no less then three different orders for those parameters, some of which
(Continue reading)

x_openocd | 1 Apr 11:14 2010
Picon

Command line programming

Hi,

I'm trying to flash an image using OpenOCD via the command line...

It works with commands issued through telnet, but fails with the same
commands supplied via -f file.cfg on the command line.  I also tried
-c options and it fails in the same way.

The error is: Runtime error ... invalid command name "reset"

Ultimately what I am trying to acheive is a non-interactive flash
programming session that can be scripted.

I am using OpenOCD 0.4.0 pre-compiled binaries from
http://www.freddiechopin.info/

I'm new to OpenOCD, and copied the commands from a HowTo I found.  Can
anyone tell me if the error is a bug or do I have wrong expectations?

I also posted to http://forum.sparkfun.com/viewtopic.php?f=18&t=20992
but no responses so far.  I am following both the Sparkfun forum and
this list.

Thanks!

--------------------------------------------------------------------------------
Cut-n-paste from DOS command line :-

D:\tmp>type arm-usb-ocd.cfg
#
(Continue reading)

freddie_chopin | 1 Apr 12:03 2010
Picon

Re: Command line programming

x_openocd-dev_x@... napisał:
>It works with commands issued through telnet, but fails with the same
>commands supplied via -f file.cfg on the command line.  I also tried
>-c options and it fails in the same way.
>
>The error is: Runtime error ... invalid command name "reset"

You need to add another command before any non-configuration command - "init". It works through telnet,
because "init" is executed automatically after processing and executing ALL command line parameteres,
so if you want to do something this way, add "-c "init"" before your file or add "init" command before
commands like "reset halt".

4\/3!!
Maximilian Odendahl | 2 Apr 01:01 2010
Picon

Re: GSOC: JTAG

Hi,

 >Well, that's a start.  Please send around what you come up with, so we 
 >can
 >give you some review before you dive in too deeply.

thanks again for the great introduction.

After meeting with my supervisor, we decided that I'll be working on 
another project for my thesis, so I won't be able to apply for google 
summer of code this year.

It is still related to OMAP though, and I guess I'll might need JTAG as 
well, so I'll at least get the wiki up to date once I'm at that point.

Best,
Max
Dirk Behme | 2 Apr 11:44 2010

OMAP3 BeagleBoard (was: GSOC: JTAG)

On 02.04.2010 01:01, Maximilian Odendahl wrote:
> It is still related to OMAP though, and I guess I'll might need JTAG as
> well, so I'll at least get the wiki up to date once I'm at that point.

I just tried recent version of OpenOCD with Beagle (OMAP3).

Using recent git

Open On-Chip Debugger 0.5.0-dev-00141-g33e5dd1 (2010-04-02-11:14)

the basic build, start and example instruction on

http://elinux.org/BeagleBoardOpenOCD#Starting_OpenOCD

seem to be still correct. Well, as mentioned by Dave, I replaced some 
"svn" by "git" and updated some additional minor stuff.

Best regards

Dirk
Alexei Babich | 2 Apr 12:51 2010
Picon

Re: arm mcr

> DO you know if the bug is just in documentation, or also in code?
I think, there is a mistake (a typo) the output of 'help arm" command.
For example, a typical step for initializing PPMRR in iMX35 microcontroller, the code from the bootloader:
---
ldr r0, 0x40000015
mcr p15, 0, r0, c15, c2, 4
---
So, op1 = 0; CRn = c15; CRm = c2; op2 = 4

And now a piece of script tcl/target/imx.cfg, which does the same thing:
---
proc setc15 (regs value) (
  arm mcr 15 [expr ($ regs>> 12) & 0x7] [expr ($ regs>> 0) & 0xf] [expr ($ regs>> 4) & 0xf] [expr ($ regs>> 8) & 0x7] $ value
)
setc15 0x042f 0x40000015
---
The order of arguments corresponds to the documentation.

--

-- 
Regards,
Alexei Babich, circuit design engineer, Rezonans plc., Chelyabinsk, Russia
http://www.rez.ru
Jabber ID: impatt@...
x_openocd | 2 Apr 19:06 2010
Picon

Re: Command line programming

On Thu, Apr 01, 2010 at 12:03:42PM +0200, freddie_chopin <at> op.pl wrote:
> x_openocd-dev_x <at> nospam.pz.podzone.net napisał:
> >It works with commands issued through telnet, but fails with the same
> >commands supplied via -f file.cfg on the command line.  I also tried
> >-c options and it fails in the same way.
> >
> >The error is: Runtime error ... invalid command name "reset"
> 
> You need to add another command before any non-configuration command
> - "init". It works through telnet, because "init" is executed
> automatically after processing and executing ALL command line
> parameteres, so if you want to do something this way, add "-c
> "init"" before your file or add "init" command before commands like
> "reset halt".

Thanks a lot Freddie!

This also directed me to the relevant sections of the manual where I
discovered the "shutdown" command to complete my script:

init
reset halt
stm32x mass_erase 0
flash write_bank 0 Executable_1.bin 0
reset
shutdown

Cheers. ;-)
_______________________________________________
Openocd-development mailing list
(Continue reading)

Anton Fedotov | 2 Apr 22:59 2010
Picon

[PATCH] <Cortex A8> MMU Support

Hello,

This patch adds MMU support for Cortex A8:
+ virt2phys() can now convert virtual address to real
+ read_memory() and write_memory() are renamed to read_phys_memory()
and write_phys_memory()
+ new read_memory() and write_memory() try to resolve real address if
mmu is enambled than perform real address reading/writing
   + if address is bellow 0xc000000 than TTB0 is used for page table
dereference, if above - than TTB1. Linux style of user/kernel address
separation
   + if above fails (i.e address is unspecified) than mode is checked
whether it is Supervisor (than TTB1) or User (than TTB0)
- Software breakpoints doesn't work. You should invoke
"gdb_breakpoint_override hard" before you start debugging
+ cortex_a8_mmu(), cortex_a8_enable_mmu_caches(),
cortex_a8_disable_mmu_caches() are implemented

This patch is not perfect. It needs at least some cleaning. And it
shouldn't be commited in current state.
But it works. I've tested it on DevKit8000 with Olimex ARM-USB-TINY.
Both MMU disabled u-boot and MMU enabled Linux can be debugged without
a problem.
Maybe it will help someone.

Signed-off-by: Anton Fedotov <AD.Fedotov at gmail.com>
Attachment (openocd_a8_mmu.diff): application/octet-stream, 24 KiB
_______________________________________________
(Continue reading)

Øyvind Harboe | 3 Apr 09:16 2010

Re: [PATCH] <Cortex A8> MMU Support

Hi Anton,

I can't look until after easter, but it is great to see some work
done in this area!

Hopefully you'll get some good feedback before then and it will
be ready to merge soon, so we can get it tested more widely!

--

-- 
Meet us in Paris at rts EMBEDDED SYSTEMS 2010 - March 30. and April 1.
http://www.zylin.com/events_rts.html

Øyvind Harboe
US toll free 1-866-980-3434 / International +47 51 63 25 00
http://www.zylin.com/zy1000.html
ARM7 ARM9 ARM11 XScale Cortex
JTAG debugger and flash programmer
_______________________________________________
Openocd-development mailing list
Openocd-development <at> lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development
Dirk Behme | 3 Apr 10:12 2010

Re: [PATCH] <Cortex A8> MMU Support

Hi Anton,

On 03.04.2010 09:16, Øyvind Harboe wrote:
> Hi Anton,
>
> I can't look until after easter, but it is great to see some work
> done in this area!

Yes, great! :)

> Hopefully you'll get some good feedback before then and it will
> be ready to merge soon, so we can get it tested more widely!

It would be nice if you could give some short examples how you tested 
it. E.g. how to load U-Boot and Linux debugging symbols, how you 
initialized OpenOCD, where you set breakpoints etc. Maybe you like to 
just copy & paste the log of an example debugging session?

Many thanks for the great work and best regards

Dirk

_______________________________________________
Openocd-development mailing list
Openocd-development <at> lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Gmane