next up previous contents
Next: Regression Tests Up: Retargetting uCR Previous: System Calls for Virtual

abort and _exit

What happens when a uCR application ceases to be very much depends on the target at hand. For example, on the Cyclone-911 board (i960_cyclone) is it reasonable to kick the program into the mon960 debug monitor, but on the Picture Elements ISE board (i960_ise) there is no mon960 and the CPU should just halt. (The host can reset the ISE board from the PCI bus.)

When porting uCR to a new target board, the source for abort that is appropriate for your board must be added to the libucr library. Put it in the file ``abort-$(TARGET).s'' (or .c or .cc) so that the libucr makefile can figure out how to make abort.o.

Exit is a little less obvious. The ANSI-C exit code is portable, but the part that actually stops the program is not. There are a few generic ways of doing this, and there are _exit-*.* source files that you can include in the TARGET_OBJ for your target. If none of the existing possibilities are appropriate, you will need to create a new implementation of _exit. One of the _exit implementations, _exit-abort.c, just calls abort and is a good place to start.


next up previous contents
Next: Regression Tests Up: Retargetting uCR Previous: System Calls for Virtual
Stephen Williams
9/2/1997