update include path
This commit is contained in:
@ -1,9 +1,11 @@
|
||||
/* See LICENSE of license details. */
|
||||
|
||||
#include <unistd.h>
|
||||
#include "platform.h"
|
||||
#include "weak_under_alias.h"
|
||||
#include <unistd.h>
|
||||
#if defined(SEMIHOSTING)
|
||||
#include "semihosting.h"
|
||||
#endif
|
||||
|
||||
#if defined(BOARD_hifive1)
|
||||
static volatile uint32_t tohost;
|
||||
@ -15,21 +17,21 @@ extern volatile uint32_t fromhost;
|
||||
|
||||
void write_hex(int fd, uint32_t hex);
|
||||
|
||||
void __wrap_exit(int code)
|
||||
{
|
||||
/*#if defined(SEMIHOSTING)
|
||||
sh_exit();
|
||||
return;
|
||||
#endif*/
|
||||
//volatile uint32_t* leds = (uint32_t*) (GPIO_BASE_ADDR + GPIO_OUT_OFFSET);
|
||||
void __wrap_exit(int code) {
|
||||
/*#if defined(SEMIHOSTING)
|
||||
sh_exit();
|
||||
return;
|
||||
#endif*/
|
||||
// volatile uint32_t* leds = (uint32_t*) (GPIO_BASE_ADDR + GPIO_OUT_OFFSET);
|
||||
const char message[] = "\nProgam has exited with code:";
|
||||
//*leds = (~(code));
|
||||
//*leds = (~(code));
|
||||
|
||||
write(STDERR_FILENO, message, sizeof(message) - 1);
|
||||
write_hex(STDERR_FILENO, code);
|
||||
write(STDERR_FILENO, "\n", 1);
|
||||
tohost = code+1;
|
||||
tohost = code + 1;
|
||||
write(STDERR_FILENO, "\x04", 1);
|
||||
for (;;);
|
||||
for (;;)
|
||||
;
|
||||
}
|
||||
weak_under_alias(exit);
|
||||
|
Reference in New Issue
Block a user