This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Evaluator 7t - Reboot and gdb difficulties (with some progress!) [SUCCESS 8-) ]
> >
> > The code clearly calls SWI:
> > 0xc000 <start>: mov r0, #22 ; 0x16
> > 0xc004 <start+4>: add r1, pc, #196 ; 0xc4
> > 0xc008 <start+8>: swi 0x00123456
> > 0xc00c <start+12>: ldr r0, [pc, #188] ; 0xc0d0 <start+208>
> > 0xc010 <start+16>: ldr sp, [r0, #8]
>
> RedBoot does not recognize Angel SWI calls. You built the program to
> run on Angel and run on Angel you must.
>
>
> > Why the program contains the SWI, I do not know... But I am guessing that
> > RedBoot has setup a vector to handle this and it is being caught rather
> > than ignored...?
>
> The program is trying to communicate with the Angel stub. How did you build
> it?
>
> --Mark
Thanks Mark.
I think I am starting to get the idea now...
The SWI is the Angel "OS" that allows it to communicate with the outside
world? Maybe the serial port for I/O....?
I built the program with
arm-elf-gcc -o hello hello.c -Wl,x=armelf.x
or something like that... Anyway the armelf.x file is the linker file that
moved the program to 0xC000
After understanding more of what was going on, what I did next was
ecosconfig new e7t
ecosconfig tree
make tests
Then proceeded to download the test "basic"
-------------------------------------------------------------------------------
james@jupiter [22:15:19]
~/development/evaluator7t/wedtry/install/tests/hal/common/current/tests$
arm-elf-gdb -nw basic
GNU gdb 5.1.1
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-gnu --target=arm-elf"...
(gdb) set remotebaud 38400
(gdb) target remote /dev/ttyS0
Remote debugging using /dev/ttyS0
0x0183123c in ?? ()
(gdb) load
Loading section .rom_vectors, size 0x40 lma 0x10000
Loading section .text, size 0x6870 lma 0x10040
Loading section .rodata, size 0x4bc lma 0x168b0
Loading section .data, size 0x2d4 lma 0x16d6c
Start address 0x10040, load size 28736
Transfer rate: 28736 bits/sec, 299 bytes/write.
(gdb) continue
Continuing.
PASS:<HAL_xSBIT_INDEX() basic functions>
PASS:<hal_setjmp()/hal_longjmp() basic functions>
EXIT:<HAL basic functions test>
-------------------------------------------------------------------------------
I have got a successful test coming out of the board!
Thankyou very much for your assistance... The thin end of the wedge is in!
My final question is this....
The test is built as a RAM image...
Given that Red Boot is not providing any operating system resources, from the
last email, am I correct in saying
"basic" is a standalone program that contains an eCos core that is loaded
into, and executes from, RAM and this core runs the short test code
application which then exits leaving the core in an idle loop?
Thanks very much for your help. This becoming fun again now!
Cheers,
James
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss