EmbDev.net

Forum: ARM programming with GCC/GNU tools olimex AT91sams256 + ARM-USB-TINY Unable to debug from RAM


Author: Rohit Chandel (rohit123)
Posted on:

Rate this post
0 useful
not useful
Hi,

I am using Olimex ARM-USB-TINY for debugging. I installed the yogarto 
toolchain with the help of the .exe supplied with the ARM-USB-TINY cd. I 
am able to run the flash version of the example project given for my 
board with AT91sam7s256. But there is no project to run from RAM. So I 
followed James P. Lynch's tutorial and downloaded the example projects 
for olimex AT91sams64 and modified as mentioned by the author for 
sam256. Although the project builds with few quirks but I am unable to 
debug it.

Modifications to build-

- I use sam7flash.script instead of script.ocd as supplied with tutorial 
since I got a build error which asked for this file. I do not know how 
to specify script.ocd instead of sam7flash.script.

- I Added armusbocd_tiny.cfg and armusbocd.cfg which must be present in 
the project directory for the toolcain to work

Following Peter's tutorial I created debug launch configuration for 
debugging from RAM as:

Initialize command:
target remote localhost:3333

Run command:
monitor soft_reset_halt 
monitor armv4_5 core_state arm 
monitor mww 0xffffff60 0x00320100 
monitor mww 0xfffffd44 0xa0008000 
monitor mww 0xfffffc20 0xa0000601 
monitor wait 100 
monitor mww 0xfffffc2c 0x00480a0e 
monitor wait 200 
monitor mww 0xfffffc30 0x7 
monitor wait 100 
monitor mww 0xfffffd08 0xa5000401 
set remote memory-write-packet-size 1024 
set remote memory-write-packet-size fixed 
set remote memory-read-packet-size 1024 
set remote memory-read-packet-size fixed 
monitor mww 0xfffffd00 0xa5000004 
monitor mww 0xffffff00 0x01 
monitor reg pc 0x00000000 
monitor arm7_9 sw_bkpts enable 
load 
continue

Now when I launch debug configuration it gives following output in 
console:
target remote localhost:3333 
0x0000080c in ?? () 
Warning: /cygdrive/C/gccfd/projects/demo_at91sam7_p64_blink_ram: No such file or directory. 
monitor soft_reset_halt 
requesting target halt and executing a soft reset 
monitor armv4_5 core_state arm 
core state: ARM 
monitor mww 0xffffff60 0x00320100 
memory write caused data abort (address: 0xffffff60, size: 0x4, count: 0x1) 
monitor mww 0xfffffd44 0xa0008000 
monitor mww 0xfffffc20 0xa0000601 
monitor wait 100 
monitor mww 0xfffffc2c 0x00480a0e 
monitor wait 200 
monitor mww 0xfffffc30 0x7 
monitor wait 100 
monitor mww 0xfffffd08 0xa5000401 
set remote memory-write-packet-size 1024 
set remote memory-write-packet-size fixed 
set remote memory-read-packet-size 1024 
set remote memory-read-packet-size fixed 
monitor mww 0xfffffd00 0xa5000004 
monitor mww 0xffffff00 0x01 
monitor reg pc 0x00000000 
pc (/32): 0x00000000 
monitor arm7_9 sw_bkpts enable 
software breakpoints enabled 
load 
Loading section .text, size 0xf48 lma 0x200000 
Loading section .data, size 0x44c lma 0x200f48 
Start address 0x200000, load size 5012 
Transfer rate: 10 KB/sec, 835 bytes/write. 
continue 
It hangs after that and shows "launching<projectname> 27% progress

Can anybody suggest me how to make it work.

Regards
Rohit

Author: Michael Fischer (mifi)
Posted on:

Rate this post
0 useful
not useful
Hello Rohit,

it looks that you use a compiler which is based on Cygwin,
is this possible?

The YAGARTO toolchain do not need Cygwin. You can find a SAM7S256
example on the YAGARTO page too which comes with a example to
debug in RAM.

>Warning: /cygdrive/C/gccfd/projects/demo_at91sam7_p64_blink_ram:
Do you have YAGARTO or GCCFD?

Best regards,

Michael

Author: Rohit Chandel (rohit123)
Posted on:

Rate this post
0 useful
not useful
Hi Michael,

First of all thanks for replying to the post.
it looks that you use a compiler which is based on Cygwin,
is this possible?

I really do not have idea. I had no success with installing the 
toolchain given in Peter Lynch's tutorial because of various reasons -
1. on page-19 of the tutorial open on chip debugger has changed on 
yagarto website because of some licensing issues. I do not have much 
idea as to how to use the changed one.
2. All the versions of the other Yagarto downloads have also changed.
3. There is no mention for setup for of ARM-USB-TINY in the tutorial, 
but that one is meant for hobbyists.

The exe which came along the olimex jtag has installed in following 
directory structure:
C:\gccfd\|
         |-ARM-USB-OCD-DRIVER
         |-codesourcery-arm-2008q1
         |-eclipse
         |-openocd
         |-utils
         |-yagarto

since yagarto is listed there I think its yagarto toolchain.

openocd directory also differs from your tutorial.

I would love to do follow the tutorial since it does not add any extra 
complexity to the environment in the form of extra lines in make file, 
in different linker scripts etc. in order to support more than one 
target.

Please guide me how to build the toolchain explained in Peter Lynch's 
tutorial with current changes of Yogarto most importantly for 
ARM-USB-TINY.

Please ask me if you need any more info to understand the problem.

Thanks and Regards
Rohit

Author: Michael Fischer (mifi)
Posted on:

Rate this post
0 useful
not useful
Hello Rohit,

it looks that you have two compilers:

1. CodeSourcery
2. YAGARTO

A new CodeSourcery Lite compiler can be found here:
http://www.codesourcery.com/sgpp/lite/arm

And the YAGARTO version can be found here:
http://www.yagarto.de/

First of all you should decide which compiler you want to use.

Regards,

Michael

Author: Rohit Chandel (rohit123)
Posted on:

Rate this post
0 useful
not useful
Hi Michael,

Ok, if I can follow the Peter's tutorial by having YAGARTO compiler than 
I"ll go for it. I"ll uninstall everything and follow tutorial from 
start.

But could you please answer my other doubts:
1. on page-19 of the tutorial open on chip debugger has changed on
yagarto website because of some licensing issues. I do not have much
idea as to how to use the changed one.
2. All the versions of the other Yagarto downloads have also changed.
3. There is no mention for setup for of ARM-USB-TINY in the tutorial,
but that one is meant for hobbyists.

Regards
Rohit

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.