mirror of https://github.com/FOME-Tech/openblt.git
Refs #363. Added newlib _exit.c to Nucleo-F303K8 GCC demo user program.
git-svn-id: https://svn.code.sf.net/p/openblt/code/trunk@285 5dc33758-31d5-4daf-9ae8-b24bf3d40d73
This commit is contained in:
parent
07bb22a402
commit
2a166e42a5
|
@ -0,0 +1,38 @@
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// Forward declaration
|
||||||
|
|
||||||
|
void
|
||||||
|
_exit(int code);
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// We just enter an infinite loop, to be used as landmark when halting
|
||||||
|
// the debugger.
|
||||||
|
//
|
||||||
|
// It can be redefined in the application, if more functionality
|
||||||
|
// is required.
|
||||||
|
|
||||||
|
void
|
||||||
|
__attribute__((weak))
|
||||||
|
_exit(int code __attribute__((unused)))
|
||||||
|
{
|
||||||
|
// TODO: write on trace
|
||||||
|
while (1)
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void
|
||||||
|
__attribute__((weak,noreturn))
|
||||||
|
abort(void)
|
||||||
|
{
|
||||||
|
_exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
Loading…
Reference in New Issue