重现步骤
按照示例将face_detection编译好后,拷贝到sd卡中:
期待结果和实际结果
执行./face_detect_image.sh进行静态推理
崩溃并报错:
msh /sdcard/face_det>./face_detect_image.sh
case ./face_detection.elf built at May 14 2025 18:10:30
kmodel_file:face_detection_320.kmodel
[E/DBG] [FATAL ERROR] Exception 13:Load Page Fault
[E/DBG] scause:0x000000000000000d,stval:0x0000003772ed370b,sepc:0x00000002003452a0
--------------Dump Registers-----------------
Function Registers:
ra(x1) = 0x00000002003453ca()
user_sp(x2) = 0x00000002ffffeed0()
gp(x3) = 0x0000000000000000()
tp(x4) = 0x0000000200b6bc00()
Temporary Registers:
t0(x5) = 0x0000000000000084()
t1(x6) = 0x0000000000000007()
t2(x7) = 0x0000000000000069()
t3(x28) = 0x000000000000005f()
t4(x29) = 0x0000000000000002()
t5(x30) = 0x0000000000000065()
t6(x31) = 0x0000000000000073()
Saved Registers:
s0/fp(x8) = 0x00000001002d0000()
s1(x9) = 0x000000010031b020()
s2(x18) = 0x00000002ffffeff8()
s3(x19) = 0x0000000200b48058()
s4(x20) = 0x0000000000000fe0()
s5(x21) = 0x00000001002d0000()
s6(x22) = 0x000000000004b000()
s7(x23) = 0x0000000000000018()
s8(x24) = 0x00000002fffff638()
s9(x25) = 0x00000000deadbeef()
s10(x26) = 0x00000000deadbeef()
s11(x27) = 0x00000000deadbeef()
Function Arguments Registers:
a0(x10) = 0x0000000200b48058()
a1(x11) = 0x000000010031b020()
a2(x12) = 0x00000001002d0000()
a3(x13) = 0x1537933437331737()
a4(x14) = 0x1537933437331ba7()
a5(x15) = 0x3a430c3772ed3703()
a6(x16) = 0x0000000000000000()
a7(x17) = 0x0000000000000000()
sstatus = 0x8000000200046620
Supervisor Interrupt Disabled
Last Time Supervisor Interrupt Enabled
Last Privilege is User Mode
Permit to Access User Page
Not Permit to Read Executable-only Page
satp = 0x80000000000047d2
Current Page Table(Physical) = 0x00000000047d2000
Current ASID = 0x0000000000000000
Mode = Page-based 39-bit Virtual Addressing Mode
-----------------Dump OK---------------------
riscv64-unknown-linux-musl-addr2line -e face_detection.elf -a -f 000000020034529c 882a14a22d14a426
[E/DBG] User Fault, killing thread: face_detection.elf
软硬件版本信息
自己编译的01版本rtt only,没有做任何配置
#############SDK VERSION######################################
SDK : v1.3-rc-20250514-153913-shusheng-D-01117KD7-1705-d66e43c
nncase: 2.9.0
##############################################################
调试内容及报错
在cmake中将编译模式改为Debug,于是CFLAG的-g3参数打开:
shusheng@D-01117KD7-1705:~/ai_module/rtos_k230/src/rtsmart/examples/face_detection/k230_bin$ riscv64-unknown-linux-musl-addr2line -e face_detection.elf -a -f 0x00000002003452a0
0x00000002003452a0
_ZN6nncase7runtime4k23013mmz_allocator12sanity_checkEv
??:?