This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Evaluator 7T: using Redboot syscalls
- From: Pierre Habraken <Pierre dot Habraken at imag dot fr>
- To: ecos-discuss at sources dot redhat dot com
- Date: Wed, 05 Mar 2003 19:29:32 +0100
- Subject: [ECOS] Re: Evaluator 7T: using Redboot syscalls
- Organization: Université Joseph Fourier
- References: <Pine.SGI.4.40.0302191233470.1037613-100000@shell01.TheWorld.com> <20030219174138.A6E4578A6D@deneb.localdomain> <1045676870.18484.6026.camel@hermes.chez-thomas.org> <3E53C60E.6000305@eCosCentric.com> <20030219192255.962AE78A6D@deneb.localdomain> <3E54E606.D1FDC422@imag.fr> <1045751610.18487.7568.camel@hermes.chez-thomas.org> <3E54ED66.FB87A318@imag.fr> <3E55DE1B.3555D49F@imag.fr> <20030221152856.4AE0A78A6D@deneb.localdomain> <3E5DE0B6.98015076@imag.fr> <20030227125456.6830378A6D@deneb.localdomain> <3E661FD0.C9E45A5E@imag.fr>
Pierre Habraken wrote:
> [...]
> Ok, I finally succeeded in re-building RedBoot configured according to
> Mark's advice (I added above three lines at the end of
> $ECOS_REPOSITORY/packages/hal/arm/e7t/current/misc/redboot_ROM.ecm
> before importing the latter).
> The program I am working on can now be uploaded to the board by gdb
> and started by issuing a cont command.
> It does its job as expected, and then, at some point, the main
> function of this program terminates. But then a sigtrap is raised:
> ==================================================================
> Program received signal SIGTRAP, Trace/breakpoint trap.
> 0x000101bc in _exit (stat=1)
> at ../../../../../newlib-1.11.0/libgloss/arm/redboot-syscalls.c:54
> 54 __syscall(SYS_exit, stat);
> ==================================================================
> Apparently, it is still the SWI 0x180001 instruction at __syscall in
> redboot-crt0.S which causes the trap.
> I checked the SWI vector: it loads the PC with address 0x0182023c. At
> that address I could find the code defined at label software_interrupt
> in $ECOS_REPOSITORY/packages/hal/arm/arch/current/src/vectors.S.
> Why could the SWI not be executed ?
Actually the execution does go on beyond the SWI call:
I added a few lines of code to function target_ins() in file
$ECOS_REPOSITORY/packages/hal/arm/arch/current/src/arm_stub.c, in order
to enable stepping in through SWI instructions.
Then, I could observe that the execution of the SWI handler goes until
the branch to label call_exception_handler. At that point gdb does not
respond anymore to stepi command: I had to type ^C twice to get back to
the prompt.
I can't conclude anything from this observation, but perhaps someone
else can explain what happens...
Pierre
--
________________________________________________________________________
Pierre HABRAKEN - mailto:Pierre dot Habraken at imag dot fr
Tél: 04 76 82 72 83 - Fax: 04 76 82 72 87
IMAG-LSR BP72 38402 SAINT MARTIN D'HERES Cedex
________________________________________________________________________
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss