This is the mail archive of the ecos-discuss@sources.redhat.com 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: Evaluator 7T: using Redboot syscalls


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]