[ECOS] Re: Getting error in ecos/ GDB: found solution by "set endian big" but another prob

Gary Thomas gary@mlbassoc.com
Sun Aug 23 00:18:00 GMT 2009


Ajit Mittal wrote:
> I found the problem using ecos old mailing list:
> 
> Another prob:
> 
> But how to fix this problem, when loading program through redboot like
> 
> load -r -v -b %{FREEMEMLO} basic1
> and exec command give gdb protocol strings like $T050f:01000000;0d:01fc0fec;#d6
> How to make it take as big endian.

Two problems:
  * Don't use '-r' when loading an ELF image
  * Use 'go', not 'exec'

You'll find that this sequence works just as well as via GDB:
  RedBoot> lo basic1
  RedBoot> go

This is precisely why I asked you to show your commands before.  Had
you followed those instructions, you would have had working code days ago!

> Thanks
> ---------------------
> Here is the output from working gdb.
> 
> 
> 
> Remote communication error: Connection reset by peer.
> aryan@aryan-desktop:~/test2$ xscale-elf-gdb -nw
> GNU gdb xscale-030422
> Copyright 2002 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-linux-gnulibc2.2
> --target=xscale-elf".
> (gdb) set endian big
> The target is assumed to be big endian
> (gdb) target remote 192.168.5.217:9000
> Remote debugging using 192.168.5.217:9000
> 0x5002097c in ?? ()
> (gdb) load basic1
> Loading section .rom_vectors, size 0x40 lma 0x100000
> Loading section .text, size 0x13464 lma 0x100040
> Loading section .rodata, size 0x4ac lma 0x1134a4
> Loading section .data, size 0x3ec lma 0x113950
> Start address 0x100040, load size 81212
> Transfer rate: 324848 bits/sec, 303 bytes/write.
> (gdb) continue
> Continuing.
> Hello, eCos world!
> ---------------------------------------------------------------------------------
> On Sat, Aug 22, 2009 at 2:07 AM, Ajit Mittal<ajitmittal@gmail.com> wrote:
>> How to fix this problem. This is IXP425 based board with 8MB flash and
>> 32 MB RAM.
>> I am getting this error:
>> -----------------------------------------------------
>> home@home-desktop:~/test2$ xscale-elf-gdb -nw
>> GNU gdb xscale-030422
>> Copyright 2002 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-linux-gnulibc2.2
>> --target=xscale-elf".
>> (gdb) target remote 192.168.5.217:9000
>> Remote debugging using 192.168.5.217:9000
>> Cannot access memory at address 0xfc0ffc01
>> 0x7c090250 in ?? ()
>> (gdb) load basic1
>> Loading section .rom_vectors, size 0x40 lma 0x100000
>> Loading section .text, size 0x13464 lma 0x100040
>> Loading section .rodata, size 0x4ac lma 0x1134a4
>> Loading section .data, size 0x3ec lma 0x113950
>> Start address 0x100040, load size 81212
>> Transfer rate: 46406 bits/sec, 303 bytes/write.
>> (gdb) continue
>> Continuing.
>>
>> Program received signal SIGBUS, Bus error.
>> Cannot access memory at address 0xfc0ffc01
>> 0x00100040 in ?? ()
>> (gdb)
>> -------------------------
>> I also checked
>> home@home-desktop:~/test2$ xscale-elf-objdump -f basic1
>>
>> basic1:     file format elf32-bigarm
>> architecture: xscale, flags 0x00000112:
>> EXEC_P, HAS_SYMS, D_PAGED
>> start address 0x00100040
>> --------------------------------------
>>
>> Thanks
>> Ajit
>>
> 


-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

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



More information about the Ecos-discuss mailing list