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:
Frank Voorburg 2017-07-11 13:35:56 +00:00
parent 07bb22a402
commit 2a166e42a5
1 changed files with 38 additions and 0 deletions

View File

@ -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);
}
// ----------------------------------------------------------------------------