rework structure
This commit is contained in:
16
hifive1-vp/hello/bsp/libwrap/sys/_exit.c
Normal file
16
hifive1-vp/hello/bsp/libwrap/sys/_exit.c
Normal file
@ -0,0 +1,16 @@
|
||||
/* See LICENSE of license details. */
|
||||
|
||||
#include <unistd.h>
|
||||
#include "platform.h"
|
||||
|
||||
void __wrap__exit(int code)
|
||||
{
|
||||
//volatile uint32_t* leds = (uint32_t*) (GPIO_BASE_ADDR + GPIO_OUT_OFFSET);
|
||||
const char message[] = "\nProgam has exited with code:";
|
||||
//*leds = (~(code));
|
||||
|
||||
write(STDERR_FILENO, message, sizeof(message) - 1);
|
||||
write(STDERR_FILENO, "\n", 1);
|
||||
|
||||
for (;;);
|
||||
}
|
Reference in New Issue
Block a user