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: arm-eabi-gdb


Graham wrote:
> Sergei Gavrikov wrote:
> > 
> > grahamlab wrote:
> > 
> > [cut the wars with minicom]
> > 
> >> Hi Sergei
> >> 
> >> I have tried downloading various random images as suggested and all
> >> download successfully Typing the $ seems to lock the display - is this
> >> what you expected?
> >> 
> >> Graham
> > 
> > Yep. It seems for me, your RedBoot supports GDB.
> > 
> > Now (you work with some built elf binary), fulfil
> > 
> > i) invoke
> > 
> > $ file DevBoard_install/tests/kernel/v3_0/tests/bin_sem0
> > 
> > <copy and paste an output just the below for us>
> > DevBoard_install/tests/kernel/v3_0/tests/bin_sem0: ELF 32-bit LSB
> > executable, ARM, version 1 (SYSV), statically linked, not stripped

Excellent! It's not stripped elf.

> > ii) invoke
> > 
> > $ arm-eabi-size -Ax DevBoard_install/tests/kernel/v3_0/tests/bin_sem0
> > 
> > <copy and paste an output the below for us>
> > 
> > section              size         addr
> > .debug_aranges     0x1440          0x0
> > .debug_pubnames    0x377d          0x0
> > .debug_info       0x4de43          0x0
> > .debug_abbrev      0xab3f          0x0
> > .debug_line        0xad87          0x0
> > .debug_frame       0x31f8          0x0
> > .debug_str         0x8482          0x0
> > .debug_loc         0xd8c1          0x0
> > .rom_vectors          0x8   0x68008000
> > .ARM.exidx           0x10   0x68008008
> > .text              0x4330   0x68008018
> > .rodata             0x38c   0x6800c348
> > .eh_frame             0x8   0x6800c6d8
> > .data               0x180   0x6800c6e0
> > .bss               0x32f8   0x6800c860
> > .ARM.attributes      0x2f          0x0
> > .debug_ranges      0x44c0          0x0
> > .comment            0x8f7          0x0
> > Total             0x8db3b

I see nothinig illegal the above: .text, .*data, .bss do seat silent in
the RAM its total size about 40K.

> > iii)
> > 
> > We need to look on a startup screen your RedBoot
> > 
> > <copy and paste a starup-screen the below>
> > 
> > RedBoot(tm) bootstrap and debug environment [ROM]           
> > Non-certified release, version v3_0 - built 09:17:39, Apr  7 2009
> >                                                             
> > Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
> > Free Software Foundation, Inc.                              
> > RedBoot is free software, covered by the eCos license, derived from the
> > GNU General Public License. You are welcome to change it and/or distribute
> > copies of it under certain conditions. Under the license terms, RedBoot's
> > source code and full license terms must have been made available to you.
> > Redboot comes with ABSOLUTELY NO WARRANTY.                  
> > 
> > Platform: ST STM3210E EVAL (Cortex-M3) 
> > RAM: 0x68000000-0x68100000 [0x68003188-0x68100000 available]
> >      0x20000000-0x2000f000 [0x20000000-0x2000f000 available]                    
What's a nice board! IMHO, it's very suitable for eCos. You have ~1M of
a volatile memory.

> > Note: I want to know a bit more about your RAM location and its size.
> > RedBoot talks about.
> > 
> > 
> > Sergei

Graham, let's resume what you've got:

1) You have arm-eabi GNU toolchain with it you are able to build eCos
   applications.

2) You have a nice bootstrap environment with GDB support -- RedBoot.

3) You are able using X-modem protocol and minicom to upload the images
   into RAM. IMHO, if you can to load a test image in a few hundreds of
   Kb into the RAM, your GDB must do it too.

Before to start debug GDB protocol, dance with packet's sizes, etc. My
the first guess: you misconfigured eCos build. I do not know how you
configured eCos build. I do not know what you check/uncheck using eCos
`configtool'.

So, can you reproduce the below just in Linux bash?

i. Build a minimal eCos stuff as

echo $ECOS_REPOSITORY >> report.txt
echo $PATH >> report.txt
cd /tmp
mkdir lab1
cd lab1
ecosconfig new stm3210e minimal
ecosconfig tree
make -s
make -s -C hal/common/current tests
ls -R install/tests >> report.txt

Note: attach the report.txt then.


ii. Leave minicom if it runs!

lsof /dev/ttyS0 ;# you must see no output


iii. Reset the board and invoke arm-eabi-gdb as

arm-eabi-gdb -q -nx install/tests/hal/common/current/tests/basic


iv. GDB

Now on GDB prompt type a line by a line (see the below)

(gdb) set logging on
(gdb) set remotebaud 38400
(gdb) target remote /dev/ttyS0

Here you can to see that board connected, if gdb wait here, reset the
board and try `target' command again.

(gdb) load

I very hope that will be done. If it will, continue:

(gdb) b cyg_test_init
(gdb) b cyg_test_exit
(gdb) c
(gdb) c


Please, repeat the above lab1 exactly! And the report about the results:
attach report.txt, gdb.txt. The files should be in that /tmp/lab1
directory.

Sergei

-- 
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]