2024-10-25 17:46:21 +08:00
|
|
|
|
2024-10-28 15:51:12 +08:00
|
|
|
|
|
|
|
|
#include "custom_ops.S"
|
|
|
|
|
|
|
|
|
|
|
2024-10-28 18:01:25 +08:00
|
|
|
.extern main
|
|
|
|
|
.globl _prog_start
|
|
|
|
|
.section .text.init
|
2024-10-28 15:51:12 +08:00
|
|
|
|
|
|
|
|
|
2024-10-28 18:01:25 +08:00
|
|
|
_prog_start:
|
2025-01-15 11:44:30 +08:00
|
|
|
li sp, 0x40001000
|
2024-10-29 17:32:17 +08:00
|
|
|
|
2024-10-28 18:01:25 +08:00
|
|
|
call main
|
2024-10-28 15:51:12 +08:00
|
|
|
|
2024-10-28 18:01:25 +08:00
|
|
|
ecall
|
2024-10-28 15:51:12 +08:00
|
|
|
|
2024-10-25 17:46:21 +08:00
|
|
|
|
2024-10-28 18:01:25 +08:00
|
|
|
.balign 32
|
2024-10-29 09:33:29 +08:00
|
|
|
.section .trap_entry, "ax", %progbits
|
2024-10-25 17:46:21 +08:00
|
|
|
trap_entry:
|
2024-10-28 18:01:25 +08:00
|
|
|
|
2024-10-30 17:11:59 +08:00
|
|
|
# io.interrupt(0) := intTxError
|
|
|
|
|
# io.interrupt(1) := intRxError
|
|
|
|
|
# io.interrupt(2) := intRxStart
|
|
|
|
|
# io.interrupt(3) := intRxEnd
|
|
|
|
|
|
|
|
|
|
|
2024-10-28 18:01:25 +08:00
|
|
|
|
|
|
|
|
|