tohost is not required in hifive1 env
This commit is contained in:
parent
4c86ddd9fb
commit
619be720d3
|
@ -5,7 +5,7 @@ ENTRY( _start )
|
||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
flash (rxai!w) : ORIGIN = 0x20400000, LENGTH = 512M
|
flash (rxai!w) : ORIGIN = 0x20400000, LENGTH = 512M
|
||||||
ram (wxa!ri) : ORIGIN = 0x80000000, LENGTH = 512K
|
ram (wxa!ri) : ORIGIN = 0x80000000, LENGTH = 1M
|
||||||
}
|
}
|
||||||
|
|
||||||
PHDRS
|
PHDRS
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
// Some things missing from the official encoding.h
|
// Some things missing from the official encoding.h
|
||||||
#define MCAUSE_INT 0x80000000
|
#define MCAUSE_INT 0x80000000
|
||||||
#define MCAUSE_CAUSE 0x7FFFFFFF
|
#define MCAUSE_CAUSE 0x7FFFFFFF
|
||||||
|
#define USE_TOHOST 1
|
||||||
|
|
||||||
#include "rtl/const.h"
|
#include "rtl/const.h"
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|
|
@ -16,7 +16,9 @@ void __wrap__exit(int code)
|
||||||
write(STDERR_FILENO, message, sizeof(message) - 1);
|
write(STDERR_FILENO, message, sizeof(message) - 1);
|
||||||
write_hex(STDERR_FILENO, code);
|
write_hex(STDERR_FILENO, code);
|
||||||
write(STDERR_FILENO, "\n", 1);
|
write(STDERR_FILENO, "\n", 1);
|
||||||
|
#ifdef USE_TOHOST
|
||||||
tohost = code+1;
|
tohost = code+1;
|
||||||
|
#endif
|
||||||
write(STDERR_FILENO, "\x04", 1);
|
write(STDERR_FILENO, "\x04", 1);
|
||||||
for (;;);
|
for (;;);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue