feat: fixed some bugs for running on real hardware

This commit is contained in:
2021-03-05 22:23:39 +01:00
parent e532099ea7
commit 310f3621a2
6 changed files with 43 additions and 15 deletions

View File

@@ -125,12 +125,13 @@ char *exception_messages[] = {
};
void isr_handler(isr_registers_t r) {
char msg[256];
if (r.int_no == 128) {
syscall_handle(&r);
return;
}
printf("Received interrupt: %d - %s\n", r.int_no, exception_messages[r.int_no]);
k_panic();
sprintf(msg, "Received interrupt: %d - %s\n", r.int_no, exception_messages[r.int_no]);
k_panics(msg);
}
void register_interrupt_handler(uint8_t n, isr_t handler) {