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>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Wed, 05 Mar 2003 17:03:28 +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>
Mark Salter wrote:
>
> > When I launch the program gdb sigtraps:
> > [...]
> > I suppose the reason is that I am using a wrong RedBoot image and
> > thus I'll have to re-build RedBoot with the option you mention above
>
> Add:
>
> cdl_component CYGSEM_REDBOOT_BSP_SYSCALLS {
> inferred_value 1
> };
>
> to your redboot_{ROM,RAM}.ecm file.
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 ?
Is this a redboot or newlib configuration problem ?
How can I have the execution control to be given back smoothly to gdb ?
What about other syscalls ?
Thanks for any help or suggestion.
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