diff --git a/port/moonlight/src/bootup.c b/port/moonlight/src/bootup.c index 69df782..17ac817 100644 --- a/port/moonlight/src/bootup.c +++ b/port/moonlight/src/bootup.c @@ -10,6 +10,7 @@ #include #include #include +#include #ifdef __cplusplus #define EXTERN_C extern "C" #else @@ -121,10 +122,9 @@ void _initialize(void) { // This should never be called. Busy loop with the CPU in idle state. void _exit(int exit_code) { (void)exit_code; - // Halt + csr_clr_bits_mie(MIE_MTI_BIT_MASK); + csr_clr_bits_mstatus(MSTATUS_MIE_BIT_MASK); while (1) { __asm__ volatile ("wfi"); - // Incase periodic interrupts are scheduled (e.g. timer), additionaly jump to self - for (;;); } } \ No newline at end of file diff --git a/test/threadx/run_threadx_test.sh b/test/threadx/run_threadx_test.sh index e728176..fa40c93 100755 --- a/test/threadx/run_threadx_test.sh +++ b/test/threadx/run_threadx_test.sh @@ -21,7 +21,6 @@ trap 'rm -f "$log_file"' EXIT "$simulator" \ --isa="$isa" \ -f "$elf" \ - -p tb.top.core.finish_condition=1 \ -m 10s \ | tee "$log_file"