This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: eCos and AT91SAM7S-EK


--- Andrew Lunn <andrew@lunn.ch> wrote:

> On Sat, Jun 30, 2007 at 11:13:16AM -0700, wavecom
> wavecom wrote:
> > 
> > --- Andrew Lunn <andrew@lunn.ch> wrote:
> > 
> > > On Sat, Jun 30, 2007 at 09:11:58AM -0700,
> wavecom
> > > wavecom wrote:
> > > > Thanks for answer,
> > > > SAM-BA is tool provided by Atmel to
> downloading
> > > code
> > > > to Atmel arm controllers via USB and others
> > > > interfaces. I've downloaded the ?hello?
> (without
> > > > extension) file at start address 0x200000.
> Make
> > > > execution on the examples produces 2 files
> > > ?hello.o?
> > > > and ?hello?. 
> > > 
> > > hello is the elf file. Does SAM-BA support elf,
> or
> > > do you need to
> > > convert it to binary using objcopy? I think your
> > > probably do.
> > 
> > I have converted elf to bin by excetuting
> > ?arm-elf-objcopy.exe -O binary hello hello.bin?
> than
> > hello.bin I've downloaded to board by SAM-BA and
> > result was the same ? no output string.
> 
> Well, this is the correct procedure....
> 
> > > > I have got wiggler-jtag interface, but I
> didn't
> > > try it
> > > > with the eCos. 
> > > 
> > > I suggest you use this with gdb for debugging
> and
> > > use it for
> > > downloading code to the device.
> > > 
> > 
> > So I'll try to use wiggler-JTAG to run eCos
> examples. 
> > At first I've started openocd ?openocd-pp.exe -f
> > at91sam7s256-wiggler.cfg?. I had been using this
> > configuration to debug and download standalone
> > programs.  
> > After that I've started gdb ?arm-elf-gdb hello?
> (hello
> > elf), in gdb setup target ?target remote
> > localhost:3333?
> > 
> > after the command the following messages appeared:
> > ?
> > (gdb) target remote localhost:3333
> > Remote debugging using localhost:3333
> > warning: (Internal error: pc 0x18 in read in
> psymtab,
> > but not in symtab.)
> 
> You probably want to search the gdb mailling list
> for this. It sounds
> like a gdb issue, not an eCos issue.
> 
> > (gdb) continue
> > Continuing.
> > warning: (Internal error: pc 0x18 in read in
> psymtab,
> > but not in symtab.?
> > ?
> > But still no ?Hello, eCos world!?.
> 
> My JTAG tool seems to do something funky with the
> RAM/FLASH
> mapping. So i tend to do 
> 
> set $pc=0x02000000
> continue
> 
> so that it runs the code in flash, not the code at
> 0x0 which could be
> the empty RAM.
> 
>     Andrew

I've just tried procedure form eCos pdf-s. First, I
have downloaded the redboot from
?\htdocs\boards\redbootbins\at91sam7s\redboot_rom.bin?
(cvs path). Now on ARM-COM1 I've got console:):
?
 RedBoot(tm) bootstrap and debug environment [ROM]
Non-certified release, version UNKNOWN - built
22:08:24, Feb 19 2006

Platform: Atmel (at91sam7s) (ARM7TDMI)
Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat,
Inc.

RAM: 0x00200000-0x00210000, [0x00206ca0-0x0020c800]
available
FLASH: 0x00100000 - 0x140000, 1024 blocks of
0x00000100 bytes each.
RedBoot>
RedBoot>
?

After that I was tried to use gdb:
?
C:\cygwin\opt\ecos\ecos-2.0\examples>"c:\Program
Files\yagarto\bin\arm-elf-gdb.e
xe" -nw hello
GNU gdb 6.5.50.20060612-cvs
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General
Public License, and you are
welcome to change it and/or distribute copies of it
under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show
warranty" for details.
This GDB was configured as "--host=i686-pc-mingw32
--target=arm-elf"...
(gdb) set remotebaud 38400
(gdb) target remote COM7
Remote debugging using COM7
0x00104954 in Cyg_StdioStreamBuffer::set_buffer
(this=0xd3, size=6,
    new_buffer=0x5
"­\237&#328;\030­\237&#328;\030­\237&#328;\030­\237&#328;&#9632;
 &#341;\030­\237&#328;\030­\237&#328;
&#9568;")
    at
/opt/ecos/ecos-2.0/packages/language/c/libc/stdio/current/src/common/stre
ambuf.cxx:84
84     
/opt/ecos/ecos-2.0/packages/language/c/libc/stdio/current/src/common/str
eambuf.cxx: No such file or directory.
        in
/opt/ecos/ecos-2.0/packages/language/c/libc/stdio/current/src/common/
streambuf.cxx
Current language:  auto; currently c++
(gdb) load
Loading section .rom_vectors, size 0x40 lma 0x100000
Loading section .text, size 0x7ba4 lma 0x100040
Loading section .rodata, size 0x238 lma 0x107be4
Loading section .data, size 0x42c lma 0x107e1c
Start address 0x100040, load size 33352
Transfer rate: 26681 bits/sec, 370 bytes/write.
(gdb) break main
Breakpoint 1 at 0x10055c: file hello.c, line 6.
(gdb) cont
Continuing.
?
Program still don't show any messages or even stop at
defined breakpoint.
There are warnings ?No such file or directory.? -
program has been compiled on cygwin but gdb was called
from DOS prompt.

Pete


> 
> -- 
> Before posting, please read the FAQ:
> http://ecos.sourceware.org/fom/ecos
> and search the list archive:
> http://ecos.sourceware.org/ml/ecos-discuss
> 
> 



 
____________________________________________________________________________________
The fish are biting. 
Get more visitors on your site using Yahoo! Search Marketing.
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]