Evaluator 7T: using syscalls with RedBoot
Thu Mar 6 12:59:00 GMT 2003
>>>>> Pierre Habraken writes:
> I have some trouble in getting a newlib based program working together
> with redboot on an Arm Evaluator7T board.
> I am using newlib 1.11.0 on a linux box running RH 7.3.
> I re-built redboot (from eCos cvs repository) configured according to
> Mark Salter's advice (added CYGSEM_REDBOOT_BSP_SYSCALLS to
> The program I am working on is compiled with arm-elf-gcc 3.2.2. It is
> linked with option -specs=redboot.specs. It can be uploaded to the board
> by gdb and then started by issuing a cont command.
> The program does its job as expected, and afterwards, at some point, its
> main function terminates, making crt0.S to call exit(). 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);
> Could it be a newlib configuration problem ?
No. This is expected behavior.
> How can I have the execution control to be given back smoothly to gdb ?
Does GDB not have control at this point? The decision was made to trap
on exit because that usually indicates a problem for an embedded app.
In any case, when the program stops at exit, you can use the gdb 'kill'
command to release the target and get back to RedBoot. You could also
reissue the 'load' command and restart the program.
> What about other syscalls ?
What about them? For the definitive list of syscalls, look in
More information about the Newlib