1.1K Star 6.1K Fork 4.9K

OpenHarmony / docs

 / 详情

AI算法SDK和插件 加载失败,无法正常运行

已完成
任务
创建于  
2021-06-17 09:51

【任务描述】
参照手册文档 https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/subsystems/AI%E6%A1%86%E6%9E%B6.md 实现的 AI算法SDK和插件 加载失败,无法正常运行。

  1. 1.1.0 将编译成功的源码 so 文件烧录到开发板蓝屏,无法加载算法插件
  2. 2.0 中没有 AI算法SDK和插件 相关的 so文件 和 bin文件输出

出错位置如下:
输入图片说明

【解决方案】

【任务来源】

评论 (16)

郑勇 创建了任务
郑勇 关联仓库设置为OpenHarmony/docs
duangavin123 负责人设置为PamuLee
展开全部操作日志

有日志吗
2没看懂,BUILD.gn中有添加编译依赖吗
@郑勇

如果把加解密注释掉则会出现类似以下的问题,详细日志如下:

OHOS # ./bin/edge_detection
OHOS # [Main] EdgeDetectionExecute
[EDSdk]EdSdk SetCallback
[EDSdk]The SDK Fail to SetCallback
[EDSdk]EdSdk Create
[EdSdkImpl]Create
[IAieClient]AieClientInit
[ClientFactory]Begin to call ClientInit.
[IAieClient]AieClientPrepare
[ClientFactory]Begin to call ClientPrepare.
[SaClientProxy]Begin to call LoadAlgorithmProxy.
[EDPlugin]Begin to prepare, transactionId = 4294967297
[ClientFactory][clientId:1,sessionId:1]End to call load algorithm, result code[0]
[ERR]OsVmPageFaultHandler 350
##################excFrom: User!####################
cpu0 is running.
cpu1 is in exc.
The current handling the exception is cpu1 !
data_abort fsr:0xd, far:0x6c504445
Abort caused by a read instruction. Permission fault, section
excType: data abort
processName = edge_detection
processID = 12
process aspace = 0x01000000 -> 0x3f000000
taskName = edge_detection
taskID = 68
task user stack = 0x38637000 -> 0x38737000
pc = 0x25b9deee in /lib/libc.so ---> 0x9ceee
ulr = 0x25b8fe10 in /lib/libc.so ---> 0x8ee10
usp = 0x38736818
fp = 0x17
R0 = 0x6c504445
R1 = 0x0
R2 = 0x7fffffff
R3 = 0x25ba51e8
R4 = 0x7fffffff
R5 = 0x6c504445
R6 = 0xffffffff
R7 = 0x0
R8 = 0x0
R9 = 0x8399387
R10 = 0x0
R11 = 0x17
R12 = 0xffffffff
CPSR = 0x20000030
backtrace begin
traceback error fp = 0x17

allCpu(%): 19.31 sys, 180.69 idle

PID PPID PGID UID Status CPUUSE CPUUSE10s CPUUSE1s Policy Priority MTID TaskTotal Mode PName
1 -1 1 0 Pending 0.15 0.0 0.0 RR 28 23 1 user init
2 -1 2 0 Pending 6.54 1.3 1.2 RR 0 0 24 kernel KProcess
3 1 1 2 Pending 0.3 0.2 0.10 RR 15 4 3 user shell
5 1 5 7 Pending 10.2 0.38 0.0 RR 28 25 12 user foundation
6 1 6 8 Pending 0.17 0.4 0.0 RR 28 26 4 user bundle_daemon
7 1 7 1 Pending 0.63 0.0 0.0 RR 28 27 5 user appspawn
8 1 8 5 Pending 0.19 0.0 0.0 RR 28 28 1 user media_server
9 1 9 0 Pending 0.49 0.9 0.9 RR 28 29 8 user wms_server
10 1 10 0 Pending 0.9 0.0 0.0 RR 28 30 4 user sensor_service
11 1 11 9 Pending 0.8 0.0 0.0 RR 28 31 5 user ai_server
12 3 12 2 Running 0.0 0.0 0.0 RR 15 68 3 user edge_detection

TID PID Affi CPU Status StackSize WaterLine CPUUSE CPUUSE10s CPUUSE1s StackPoint TopOfStack PendReason LockID Policy Priority MEMUSE TaskName
23 1 0x3 -1 Pending 0x3000 0xe04 0.15 0.0 0.0 0x409d53a8 0x409d2718 Signal 0xffffffff RR 31 0 init
0 2 0x3 -1 Pending 0x1000 0x324 0.1 0.0 0.0 0x409087d0 0x409079b8 Event 0xff RR 5 0 ResourcesTask
2 2 0x1 -1 Pending 0x4000 0x304 0.63 0.70 0.69 0x40920008 0x4091c210 Queue 0 RR 0 0 Swt_Task
3 2 0x3 -1 Pending 0x4000 0x1e4 0.0 0.0 0.0 0x40928bc8 0x40924da8 Event 0x1 RR 1 0 system_wq
5 2 0x2 -1 Pending 0x4000 0x4d4 0.23 0.24 0.25 0x409334d0 0x4092f6d8 Queue 0x1 RR 0 0 Swt_Task
7 2 0x3 -1 PendTime 0x4000 0x384 0.3 0.3 0.3 0x4099a1b0 0x409963e8 Event 0x1 RR 10 0 hi_vdec_thread
8 2 0x3 -1 Pending 0x3000 0x1dc 0.0 0.0 0.0 0x4093b7e0 0x409389b8 Event 0x7 RR 5 0 himci_Task
9 2 0x3 -1 Pending 0x20000 0x3c4 0.2 0.0 0.0 0x4096f820 0x4094f9f8 Event 0x1 RR 3 0 eth_irq_Task
10 2 0x3 -1 PendTime 0x6000 0x36c 0.3 0.1 0.1 0x40948408 0x40942638 Queue 0x2 RR 5 0 tcpip_thread
11 2 0x3 -1 PendTime 0x1800 0x404 1.23 0.0 0.0 0x4094c6d0 0x4094b128 Event 0x4 RR 6 0 mmc_data_thread
12 2 0x3 -1 Pending 0x3000 0x44c 0.46 0.0 0.0 0x409819c0 0x4097ebb0 Event 0xf RR 12 0 bcache_async_task
13 2 0x3 -1 PendTime 0x2000 0x214 0.0 0.0 0.0 0x409a2288 0x409a0498 Semaphore 0x13b RR 18 0 MessageDispatcher
15 2 0x3 -1 Pending 0x2710 0x38c 0.0 0.0 0.0 0x409a89c8 0x409a6498 Semaphore 0x13e RR 10 0 GPIO_IRQ_TSK_0_4
16 2 0x3 -1 Delay 0x2000 0x354 0.0 0.0 0.0 0x409aa9b0 0x409a8bb8 Delay 0 RR 18 0 hdf_sensor_test
17 2 0x3 -1 Pending 0x4000 0x21c 0.0 0.0 0.0 0x409b7c38 0x409b3e50 Event 0xf RR 5 0 USB_GIANT_Task
18 2 0x3 -1 Pending 0x4000 0x21c 0.0 0.0 0.0 0x409bbca0 0x409b7eb8 Event 0xf RR 1 0 USB_NGIAN_ISOC_Task
19 2 0x3 -1 Pending 0x4000 0x21c 0.0 0.0 0.0 0x409bfd08 0x409bbf20 Event 0xf RR 2 0 USB_NGIAN_BULK_Task
20 2 0x3 -1 Pending 0x4000 0x964 0.8 0.0 0.0 0x409c3d70 0x409bff88 Event 0xf RR 5 0 USB_EXPLR_Task
21 2 0x3 -1 Pending 0x4000 0x21c 0.0 0.0 0.0 0x409c7dd8 0x409c3ff0 Event 0xf RR 5 0 USB_CXFER_Task
22 2 0x3 -1 Pending 0x4000 0x31c 0.51 0.0 0.1 0x409d14f8 0x409cd700 Event 0x6 RR 9 0 SendToSer
39 2 0x1 -1 Pending 0x4000 0x524 0.0 0.0 0.0 0x41665818 0x41661a30 Event 0x1 RR 3 0 hisi_hcc_tx
40 2 0x1 -1 Pending 0x2000 0x84c 0.7 0.0 0.0 0x41661828 0x4165fa20 Event 0x2000 RR 4 0 hisi_frw
52 2 0x1 -1 Pending 0x4000 0x264 0.0 0.0 0.0 0x41669828 0x41665a40 Event 0x1 RR 3 0 hisi_hcc_rx
53 2 0x3 -1 Pending 0x2000 0x49c 0.0 0.0 0.0 0x4166b868 0x41669a50 Event 0x1 RR 3 0 sdio_Task
54 2 0x3 -1 Pending 0x4000 0x1e4 0.0 0.0 0.0 0x4166f880 0x4166ba60 Event 0x1 RR 1 0 wlan_pm_wq
4 3 0x3 -1 Pending 0x3000 0xe24 0.2 0.0 0.0 0x409da660 0x409d7978 Join 0x20 RR 31 0 shell
32 3 0x3 -1 Pending 0x3000 0x624 0.0 0.0 0.0 0x41017cd8 0x41015028 Futex 0x20568690 RR 31 0 ShellTask
33 3 0x3 -1 Pending 0x3000 0x694 0.1 0.2 0.10 0x4101ac40 0x41018038 Event 0x1 RR 31 0 ShellEntry
25 5 0x3 -1 Pending 0x3000 0xd3c 0.61 0.0 0.0 0x409e57e0 0x409e2b50 Signal 0xffffffff RR 31 0 foundation
41 5 0x3 -1 Pending 0x3000 0x5cc 0.0 0.0 0.0 0x4132bc18 0x41328f68 Futex 0x2684aca4 RR 15 0 thread1
42 5 0x3 -1 Pending 0x3000 0xb0c 9.33 0.37 0.0 0x41642cc0 0x41640010 Futex 0x26855ca4 RR 15 0 thread2
43 5 0x3 -1 Pending 0x3000 0x4cc 0.0 0.0 0.0 0x41645cd0 0x41643020 Futex 0x26860ca4 RR 15 0 thread3
44 5 0x3 -1 Pending 0x3000 0x5cc 0.2 0.0 0.0 0x41648ce0 0x41646030 Futex 0x2686bca4 RR 1 0 thread4
45 5 0x3 -1 Pending 0x3000 0x4d4 0.0 0.0 0.0 0x4164bcf0 0x41649040 Futex 0x26876ca4 RR 7 0 thread5
46 5 0x3 -1 Pending 0x3000 0x564 0.0 0.0 0.0 0x4164ed00 0x4164c050 Futex 0x26881ca4 RR 15 0 thread6
47 5 0x3 -1 Pending 0x3000 0x814 0.1 0.0 0.0 0x41651d10 0x4164f060 Futex 0x2688cca4 RR 15 0 thread7
48 5 0x3 -1 Pending 0x3000 0x5cc 0.0 0.0 0.0 0x41654c98 0x41652070 LiteIPC 0xffffffff RR 7 0 thread8
49 5 0x3 -1 Delay 0x3000 0x3dc 0.0 0.0 0.0 0x41657d38 0x41655080 Delay 0 RR 15 0 thread9
50 5 0x3 -1 Pending 0x3000 0x564 0.0 0.0 0.0 0x4165acb8 0x41658090 LiteIPC 0xffffffff RR 7 0 thread10
51 5 0x3 -1 Pending 0x3000 0x50c 0.0 0.0 0.0 0x4165dcc8 0x4165b0a0 LiteIPC 0xffffffff RR 7 0 thread11
26 6 0x3 -1 Pending 0x3000 0xf04 0.8 0.0 0.0 0x409eb0e0 0x409e8450 Signal 0xffffffff RR 31 0 bundle_daemon
35 6 0x3 -1 Pending 0x3000 0xa4c 0.9 0.4 0.0 0x41182cc0 0x41180010 Futex 0x24741ca4 RR 15 0 thread1
36 6 0x3 -1 Pending 0x3000 0x6fc 0.0 0.0 0.0 0x41185c48 0x41183020 LiteIPC 0xffffffff RR 7 0 thread2
66 6 0x3 -1 Pending 0x3000 0x3dc 0.0 0.0 0.0 0x416e6cf8 0x416e40d0 LiteIPC 0xffffffff RR 7 0 thread3
27 7 0x3 -1 Pending 0x3000 0xefc 0.63 0.0 0.0 0x409f09d8 0x409edd48 Signal 0xffffffff RR 31 0 appspawn
61 7 0x3 -1 Pending 0x3000 0x41c 0.0 0.0 0.0 0x416d7d30 0x416d5080 Futex 0x28006ca4 RR 7 0 thread1
62 7 0x3 -1 Pending 0x3000 0x564 0.0 0.0 0.0 0x416dad40 0x416d8090 Futex 0x28011ca4 RR 22 0 thread2
63 7 0x3 -1 Pending 0x3000 0x564 0.0 0.0 0.0 0x416ddcc8 0x416db0a0 LiteIPC 0xffffffff RR 7 0 thread3
64 7 0x3 -1 Pending 0x3000 0x3dc 0.0 0.0 0.0 0x416e0cd8 0x416de0b0 LiteIPC 0xffffffff RR 7 0 thread4
28 8 0x3 -1 Pending 0x3000 0xd54 0.19 0.0 0.0 0x409f6278 0x409f3658 Signal 0x44122 RR 31 0 media_server
14 9 0x3 -1 Pending 0x3000 0x434 0.0 0.0 0.0 0x416c2cc0 0x416c0010 Futex 0x260a1ca4 RR 7 0 thread2
29 9 0x3 -1 Delay 0x3000 0xd4c 0.48 0.9 0.9 0x409fbc20 0x409f8f68 Delay 0 RR 31 0 wms_server
55 9 0x3 -1 Pending 0x3000 0x564 0.0 0.0 0.0 0x416c5cd0 0x416c3020 Futex 0x260acca4 RR 22 0 thread3
56 9 0x3 -1 Pending 0x3000 0x564 0.0 0.0 0.0 0x416c8c58 0x416c6030 LiteIPC 0xffffffff RR 7 0 thread4
57 9 0x3 -1 Pending 0x3000 0x3dc 0.0 0.0 0.0 0x416cbc68 0x416c9040 LiteIPC 0xffffffff RR 7 0 thread5
58 9 0x3 -1 Pending 0x3000 0x40c 0.0 0.0 0.0 0x416cec48 0x416cc050 Semaphore 0x18a FIFO 30 0 thread6
59 9 0x3 -1 Pending 0x3000 0x40c 0.0 0.0 0.0 0x416d1c58 0x416cf060 Semaphore 0x18c FIFO 30 0 thread7
60 9 0x3 -1 Pending 0x3000 0x354 0.0 0.0 0.0 0x416d4d20 0x416d2070 Futex 0x26154c44 RR 31 0 thread8
24 10 0x3 -1 Pending 0x3000 0x644 0.0 0.0 0.0 0x4101dcf8 0x4101b048 Futex 0x1f9f3ca4 RR 22 0 thread1
30 10 0x3 -1 Pending 0x3000 0xf04 0.8 0.0 0.0 0x41002ca0 0x41000010 Signal 0xffffffff RR 31 0 sensor_service
34 10 0x3 -1 Pending 0x3000 0x6fc 0.0 0.0 0.0 0x41020c80 0x4101e058 LiteIPC 0xffffffff RR 7 0 thread2
65 10 0x3 -1 Pending 0x3000 0x3dc 0.0 0.0 0.0 0x416e3ce8 0x416e10c0 LiteIPC 0xffffffff RR 7 0 thread3
31 11 0x3 -1 Pending 0x3000 0xd4c 0.8 0.0 0.0 0x41006e38 0x410041a8 Signal 0xffffffff RR 31 0 ai_server
37 11 0x3 -1 Pending 0x3000 0xaf4 0.0 0.0 0.0 0x41188ce0 0x41186030 Futex 0x24445ca4 RR 15 0 thread1
38 11 0x3 -1 Pending 0x3000 0x6fc 0.0 0.0 0.0 0x4118bc68 0x41189040 LiteIPC 0xffffffff RR 7 0 thread2
67 11 0x3 -1 Pending 0x3000 0x3dc 0.0 0.0 0.0 0x416e9d08 0x416e70e0 LiteIPC 0xffffffff RR 7 0 thread3
71 11 0x3 -1 Delay 0x3000 0x494 0.0 0.0 0.0 0x41805cd8 0x41803020 Delay 0 RR 15 0 thread4
68 12 0x3 1 Running 0x3000 0xe64 0.0 0.0 0.0 0x416f2620 0x416ef9f8 Running 0 RR 31 0 edge_detection
69 12 0x3 -1 Suspended 0x3000 0x564 0.0 0.0 0.0 0x416f56c0 0x416f2a08 Suspended 0 RR 31 0 thread1
70 12 0x3 -1 Suspended 0x3000 0x3dc 0.0 0.0 0.0 0x41802c38 0x41800010 LiteIPC 0xffffffff RR 31 0 thread2

******Current process 12 vmm regions: ******
0 -> regionBase: 0x08398000 regionSize: 0x00002000
1 -> regionBase: 0x0839a000 regionSize: 0x00003000
2 -> regionBase: 0x0839d000 regionSize: 0x00001000
3 -> regionBase: 0x0839e000 regionSize: 0x00001000
4 -> regionBase: 0x25b01000 regionSize: 0x00045000
5 -> regionBase: 0x25b46000 regionSize: 0x0005e000
6 -> regionBase: 0x25ba4000 regionSize: 0x00001000
7 -> regionBase: 0x25ba5000 regionSize: 0x00001000
8 -> regionBase: 0x25ba6000 regionSize: 0x00004000
9 -> regionBase: 0x25baa000 regionSize: 0x00002000
10 -> regionBase: 0x25bac000 regionSize: 0x00045000
11 -> regionBase: 0x25bf1000 regionSize: 0x00098000
12 -> regionBase: 0x25c89000 regionSize: 0x00005000
13 -> regionBase: 0x25c8e000 regionSize: 0x00001000
14 -> regionBase: 0x25c8f000 regionSize: 0x00001000
15 -> regionBase: 0x25c90000 regionSize: 0x00001000
16 -> regionBase: 0x25c91000 regionSize: 0x00003000
17 -> regionBase: 0x25c94000 regionSize: 0x00001000
18 -> regionBase: 0x25c95000 regionSize: 0x00001000
19 -> regionBase: 0x25c96000 regionSize: 0x00002000
20 -> regionBase: 0x25c98000 regionSize: 0x0000c000
21 -> regionBase: 0x25ca4000 regionSize: 0x00001000
22 -> regionBase: 0x25ca5000 regionSize: 0x00001000
23 -> regionBase: 0x25ca6000 regionSize: 0x00008000
24 -> regionBase: 0x25cae000 regionSize: 0x00009000
25 -> regionBase: 0x25cb7000 regionSize: 0x00001000
26 -> regionBase: 0x25cb8000 regionSize: 0x00001000
27 -> regionBase: 0x25cb9000 regionSize: 0x00003000
28 -> regionBase: 0x25cbc000 regionSize: 0x00007000
29 -> regionBase: 0x25cc3000 regionSize: 0x00001000
30 -> regionBase: 0x25cc4000 regionSize: 0x00001000
31 -> regionBase: 0x25cc5000 regionSize: 0x00002000
32 -> regionBase: 0x25cc7000 regionSize: 0x00007000
33 -> regionBase: 0x25cce000 regionSize: 0x00001000
34 -> regionBase: 0x25ccf000 regionSize: 0x00001000
35 -> regionBase: 0x25cd0000 regionSize: 0x00002000
36 -> regionBase: 0x25cd2000 regionSize: 0x00005000
37 -> regionBase: 0x25cd7000 regionSize: 0x00001000
38 -> regionBase: 0x25cd8000 regionSize: 0x00001000
39 -> regionBase: 0x25cd9000 regionSize: 0x00002000
40 -> regionBase: 0x25cdb000 regionSize: 0x00021000
41 -> regionBase: 0x25cfc000 regionSize: 0x00010000
42 -> regionBase: 0x25d0c000 regionSize: 0x00002000
43 -> regionBase: 0x25d0e000 regionSize: 0x00021000
44 -> regionBase: 0x38637000 regionSize: 0x000ff000
45 -> regionBase: 0x38736000 regionSize: 0x00001000

stack name cpu id stack addr total size used size


udf_stack 1 0x406dc000 0x28 0x0
udf_stack 0 0x406dc028 0x28 0x0
abt_stack 1 0x406dc050 0x28 0x24
abt_stack 0 0x406dc078 0x28 0x24
fiq_stack 1 0x406dc120 0x40 0x0
fiq_stack 0 0x406dc160 0x40 0x0
svc_stack 1 0x406dc1a0 0x2000 0x52c
svc_stack 0 0x406de1a0 0x2000 0xab4
irq_stack 1 0x406dc0a0 0x40 0x14
irq_stack 0 0x406dc0e0 0x40 0x14
exc_stack 1 0x406e01a0 0x1000 0x0
exc_stack 0 0x406e11a0 0x1000 0x0
system memcheck over, all passed!

BUILD.gn中是有添加编译依赖的,详细日志如下,烧录完成后,会出现蓝屏。顺便问一下,HILOGI 相关的接口的日志如何才能显示在屏幕上,需要设置什么参数吗?

============ MobaXterm log 2021.06.18 09:57:59 ============

hisilicon # setenv bootargs "console=ttyAMA0,115200n8 root=emmc fstype=vfat rootaddr=8M rootsize=16M rw";
hisilicon # setenv bootcmd "mmc read 0x0 0x80000000 0x800 0x3800; go 0x80000000";
hisilicon # saveenv
Saving Environment to MMC... Writing to MMC(0)... OK
hisilicon # reset
resetting ...

System startup

Uncompress Ok!

U-Boot 2020.01 (Mar 10 2021 - 15:44:50 +0000)hi3516dv300

DRAM: MMC:
EMMC/MMC/SD controller initialization.
scan edges:2 p2f:6 f2p:1
mix set temp-phase 3
scan elemnts: startp:5 endp:122
Tuning SampleClock. mix set phase:[03/07] ele:[15d/16]
MMC/SD Card:
MID: 0x15
Read Block: 512 Bytes
Write Block: 512 Bytes
Chip Size: 7456M Bytes (High Capacity)
Name: "8GTF4"
Chip Type: MMC
Version: 0.0
Speed: 100000000Hz
Bus Width: 4bit

EMMC/MMC/SD controller initialization.
Card did not respond to voltage select!
mmc_init failed! err:-95
No SD device found !
himci: 0 (eMMC), himci: 1
Loading Environment from MMC... OK
In: serial
Out: serial
Err: serial
Unable to use mmc for fat
Net: eth0
Error: eth0 address not set.

Hit any key to stop autoboot: 2 1 0

MMC read: dev # 0, block # 2048, count 14336 ... 14336 blocks read: OK
45.26 MB/s

Starting application at 0x80000000 ...

Welcome

Processor : Cortex-A7 * 2
Run Mode : SMP
GIC Rev : GICv2
build time : Jun 18 2021 01:35:13
Kernel : Huawei LiteOS 2.0.0.37/debug


main core booting up...
I 02500/hcs_blob_if: CheckHcsBlobLength: the blobLength: 44204, byteAlign: 1
releasing 1 secondary cores
cpu 0 entering scheduler
dev urandom init ...
cpu 1 entering scheduler
proc fs init ...
Mount procfs finished.
setting SDIO register ...
MMC dev init ...No console dev used.
No console dev used.
No console dev used.
No console dev used.
No console dev used.
No console dev used.
No console dev used.
No console dev used.
dev mem init ...
spi nor flash init ...
No console dev used.
No console dev used.
: error -110 initializing SDIO card
spinor_get_dev_id(56): Spi(cs0) have no device.
Cs[0] have no device!!!
spinor_get_dev_id(56): Spi(cs1) have no device.
Cs[1] have no device!!!
hifmc100_attach(130): Error:spinor scan fail!
No console dev used.
net init ...

tcpip_init start

tcpip_init end
Ethernet start.No console dev used.
No console dev used.
hisi_eth: User did not set phy mode, use default=rmii
card is not removable.
host0:Tuning SampleClock. mix set phase:[03/07] ele:[15/16]
new HS200 MMC card at address 0001
card capacity 7.288 Gib
disk_init : register /dev/mmcblk0 ok!
SDIO card vendor=0x296,device=0x5347
new high speed SDIO card at address 0001
hisi_eth: User did not set phy addr, auto scan...
No OTP data, festa PHY use default ATE parameters!
festa PHY wait autotrim done timeout!
Detected phy addr 1, phyid: 0x1cc816
No console dev used.
No console dev used.
spinor_get_dev_id(56): Spi(cs0) have no device.
Cs[0] have no device!!!
spinor_get_dev_id(56): Spi(cs1) have no device.
Cs[1] have no device!!!
hifmc100_attach(130): Error:spinor scan fail!
No console dev used.
Link is Up - 100Mbps/Full


Date:Jun 18 2021.
Time:01:36:21.
OsMountRootfs start ...
disk_init : register /dev/mmcblk0 ok!
DiskAddPart : register /dev/mmcblk0p0 ok!
DiskAddPart : register /dev/mmcblk0p1 ok!
DiskAddPart : register /dev/mmcblk0p2 ok!
[ERR]Failed to mount /storage, errno 2: No such file or directory
Format to FAT32, 64 sectors per cluster.
OsMountRootfs end ...

==========chip: hi3516dv300==========
==========sensor0: imx335==========
==========sensor1: imx335==========osal_proc_mkdir - parent is NULL! proc=0x409822f0
g_mmz_start=0x88000000, g_mmz_size=0x180
mmz param= anonymous,0,0x88000000,384M
<6>Hisilicon Media Memory Zone Manager
load sys.ko for Hi3516CV500...OK!
load region.ko for Hi3516CV500...OK!
load gdc.ko for Hi3516CV500...OK!
load vgs.ko for Hi3516CV500...OK!
load dis.ko for Hi3516CV500...OK!
load vi.ko for Hi3516CV500...OK !
load isp.ko for Hi3516CV500...OK !
load vpss.ko for Hi3516CV500...OK!
load vo.ko for Hi3516CV500...OK!
load chnl.ko for Hi3516CV500...OK!
load vedu.ko for Hi3516CV500...OK!
load rc.ko for Hi3516CV500...OK!
load venc.ko for Hi3516CV500...OK!
load h264e.ko for Hi3516CV500...OK!
load h265e.ko for Hi3516CV500...OK!
load jpege.ko for Hi3516CV500...OK!
load jpegd.ko for Hi3516CV500...OK!
load vdec.ko for Hi3516CV500...OK!
load ive.ko for Hi3516CV500...OK!
load nnie.ko for Hi3516CV500...OK!
load tde.ko for Hi3516CV500...OK!
Load hifb.ko OK!
Do not support in hmos fun[osal_register_reboot_notifier]
load hi_piris.ko for Hi3516CV500...OK!
load hdmi.ko for Hi3516CV500...OK!
load mipi_rx driver successful!
No console dev used.
usb init ...

******** usb_init in **********
usb v3.05 2019-11-20 10:40
No console dev used.
No console dev used.
No console dev used.
xhci_init (xhci0): 64 bytes context size, 32-bit DMA
No console dev used.
No console dev used.
usb_bus_attach (usbus0): 5.0Gbps Super Speed USB v3.0
No console dev used.
No console dev used.
spinor_get_dev_id(56): Spi(cs0) have no device.
Cs[0] have no device!!!
spinor_get_dev_id(56): Spi(cs1) have no device.
ugen0.1: <vendor 0x0000> at usbus0
Cs[1] have no device!!!
device_set_usb_desc (uhub0): <vendor 0x0000 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0
hifmc100_attach(130): Error:spinor scansdk init end

cat log shell end

uhub_attach (uhub0): 1 port with 1 removable, self powered
[Init] ////OpenHarmony///3/OpenHarmony 1.0/debug

[Init] DoMkDir, failed for /storage/data/log, err 22.

[Init] DoChmod, failed for 0755 /storage/data/log, err 2.

[Init] DoChown, failed for 4 4 /storage/data/log, err 2.

[Init] DoMkDir, failed for /storage/data/softbus, err 22.

[Init] DoChmod, failed for 0700 /storage/data/softbus, err 2.

[Init] DoChown, failed for 7 7 /storage/data/softbus, err 2.

[Init] DoMount, failed for vfat /dev/mmcblk0 /sdcard rw,umask=000, err 16.

[ERR]Failed to find block driver /dev/mmcblk1

[Init] DoMount, failed for vfat /dev/mmcblk1 /sdcard rw,umask=000, err 15.

[Init] start service shell succeed, pid 3.

[Init] start service apphilogcat succeed, pid 4.

[Init] start service foundation succeed, pid 5.

[Init] start service bundle_daemon succeed, pid 6.

[Init] start service appspawn succeed, pid 7.

[Init] start service media_server succeed, pid 8.

[Init] start service wms_server succeed, pid 9.

[Init] start service hiview invalid, please check /bin/hiview.

[Init] StartServiceByName, service hiview start failed!

[Init] start service sensor_service succeed, pid 10.

[Init] start service ai_server succeed, pid 11.

[Init] DoChown, failed for 0 99 /dev/gpio, err 2.

[Init] main, time used: sigInfo 8 ms, rcs 0 ms, cfg 51 ms.

[Init] main, entering wait.

OHOS # open err fp1=0

[Init] SigHandler, SIGCHLD received, sigPID = 4.

[ERR]ServiceManager not set!

[ERR]ServiceManager not set!

[ERR]ServiceManager not set!

iniparser: cannot open /storage/data/cameradev.ini

Media server initialize succeed.

[DISCOVERY] ReadFile get deviceid open file fail

[DISCOVERY] WriteDeviceId open file fail

[DISCOVERY] write device fail

[DISCOVERY] Get device fail

[DISCOVERY] InitCommonManager fail

[DISCOVERY] InitService InitCommonManager fail

[DISCOVERY] PublishService InitService fail

[DISCOVERY] PublishCallback publishId=1, result=255

hisi_sdio_rescan:1963: card status error in slot 2, remove card.
SDIO card vendor=0x296,device=0x5347
new high speed SDIO card at address 0001
[VERSION]:Hi3881V100R001C00SPC020 2020-08-20 17:10:00
oam_main_init SUCCESSFULLY!

wal_customize_init SUCCESSFULLY!

oal_main_init SUCCESSFULLY

frw_main_init SUCCESSFULLY!

hi_wifi_plat_init SUCCESSFULLY

hcc_hmac_init SUCCESSFULLY

[12474][W:1517]Hi3881 VERSION:: [Hi3881V100]

plat_firmware_init SUCCESSFULLY

[12476][W:209]sdio max transmit size is [32768]

[12481][W:580]HI_SUCCESS: Device Version=[Hi3881V100], CfgVersion=[Hi3881V100].

[12555][W:116]wlan_power_on:: firmware download success

Device is Ready!

wlan_pm_open SUCCESSFULLY!!

[12563][W:63]{hmac_wow_set_host_state::state[0]->[1]!}

get rates from device
[12566][W:1009]hmac_wow_set_dmac_cfg, flag[0], wow_event[0x1F]

hmac_main_init SUCCESSULLY

wal_main_init SUCCESSFULLY

hi_wifi_host_init SUCCESSFULLY

WiFi driver init SUCCESSFULLY!

[12585][W:367]{mac_user_set_key::keytpe==1, ciphertype==3, keyid==0, usridx==0}

[12592][W:1148]{hmac_config_add_vap::add vap [1] success! vap_id is 1

[ERR]Unsupported API sysconf

OHOS # ./bin/edge_detection
OHOS # [Main] EdgeDetectionExecute
[EDSdk]EdSdk SetCallback
[EDSdk]The SDK Fail to SetCallback
[EDSdk]EdSdk Create
[EdSdkImpl]Create
[IAieClient]AieClientInit
[ClientFactory]Begin to call ClientInit.
[IAieClient]AieClientPrepare
[ClientFactory]Begin to call ClientPrepare.
[SaClientProxy]Begin to call LoadAlgorithmProxy.
[EDPlugin]Begin to prepare, transactionId = 4294967297
[ClientFactory][clientId:1,sessionId:1]End to call load algorithm, result code[0]
[Encdec]The size of decode data does not equal to the original one.
[EdSdkImpl]Failed to UnSerializeHandle
EdgeDetectionExecute: EdSdk Create failed.
[EdSdkImpl] Destroy
[EdSdkImpl] Destroy
edge detection failed.

OHOS #

加解密实际上是对数据进行序列化,这个需要针对自己的数据编写对应的序列化实现,具体可以参考encdec_test中的测试用例。需要实现的接口是DataEncoder::EncodeOneParameter和DataDecoder::DecodeOneParameter
具体可参考
https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/subsystems/%E6%8E%A5%E5%8F%A3%E5%BC%80%E5%8F%91%E8%A7%84%E8%8C%83.md#section93139389171
规则:SDK与plugin需要使用编解码模块,将特定算法数据转换成AI引擎的通用数据类型

##################excFrom: User!####################
这个是程序crash了

一般情况下log会默认打在屏幕上,
若无,请检查task命令是否输出有hilogcat的进程
若无,可手动执行bin目录下的hilogcat程序

[Encdec]The size of decode data does not equal to the original one.
说明编解码部分有问题,建议仿照encdec_test.cpp写一个自测试用例

非常感谢解答,但还是有两个问题不明白

  1. 烧录成功后,一直蓝屏,我仅修改了 BUILD.gn 中的 output_dir 值
    【会出现蓝屏】
    output_dir = "$root_out_dir/dev_tools"

    【注释掉 output_dir 使用默认值,则不会出现蓝屏】
    # output_dir = "$root_out_dir/dev_tools"

  2. 如何在 2.0 上运行这个程序呢,2.0 中我无法找到生成的可执行文件目录 output_dir

不客气的。
1,这个目前不好判断
2,$root_out_dir实际上会被替换为out/XXXX/XXX目录,编译成功后你可以确认下

  1. 蓝屏的问题可以通过比对启动日志文件来查看嘛,我比对了蓝屏和不会蓝屏的启动日志文件发现,第一次出现不同的地方在初始化时,蓝屏的日志文件创建目录和权限赋予失败,是不是这个原因导致的。 详细日志参考下面的对比,日志左边是不会蓝屏的日志,右边的是会蓝屏的日志
    输入图片说明
    输入图片说明
    输入图片说明
    输入图片说明

  2. 2.0 相对于 1.0,烧录到板子上的目录结构已经完全变了。1.0 中可执行文件默认是放在 /bin 目录下的,2.0 中我暂时还没有找到可执行文件的输出目录,能否告知一下

1.启动过程中的东西比较多 我也不好说到底哪一部分是有问题的。hiai不用跟界面交互,只要串口还可以响应就可以了。
2.你可以试试用这个命令找一下
find . -name 文件名

如果没有进一步问题的话我们就先把issue关了哈

  1. 仅仅是将可执行文件的输出目录由 自定义目录 更改到了 默认输出目录 就导致了 蓝屏,这个感觉还是很奇怪的
  2. 通过 find 方式在 2.0 中无法找到输出的可执行文件以及 so 库文件,在 1.0 中是可以找到的。
  3. 能否问一下 2.0 中编译输出的 out 目录文件是 什么样的目录结构来存放不同的输出文件的呢,编译输出目录是否与烧录后板子上运行的文件目录结构存在什么对应关系

1.所以我觉得还是代码逻辑可能有问题,hiai属于应用层的,系统启动过程不会依赖hiai
2.那就可以确定没有加入编译了,可以使用下面的命令查看依赖关系是否正确带上你自己的组件,具体可以看gn的官方文档。
gn desc --root=. --dotfile=build/lite/.gn out/hispark_taurus/ipcamera_hispark_taurus //foundation/ai/engine/services:ai --tree
3.out目录下的/bin、/libs/、/etc等目录会打包到镜像里面,但是没有特别明显的规则。这个只能烧好之后去板子上去看。

  1. 系统初始化的时候出现类似下面的错误,但hiai部分运行正常
[Init] DoChmod, failed for 0755 /storage/data/log, err 2.
[Init] DoChown, failed for 4 4 /storage/data/log, err 2.
[Init] DoMkDir, failed for /storage/data/softbus, err 22.
[Init] DoChmod, failed for 0700 /storage/data/softbus, err 2.
[Init] DoChown, failed for 7 7 /storage/data/softbus, err 2.
[Init] DoMount, failed for vfat /dev/mmcblk0 /sdcard rw,umask=000, err 16.
  1. 1.0 代码可以正常编译也能查询到输出的相关 so库文件, 2.0 中看不到编译输出的so库文件,2.0 相对 1.0 AI框架这部分是改了什么依赖配置项嘛?

1.这个建议另提issue吧
2.改动都体现在release note里面了,没有架构方面的变化,都是功能增强。

NEEN 任务状态待办的 修改为进行中
PamuLee 任务状态进行中 修改为已完成

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(2)
其他
1
https://gitee.com/openharmony/docs.git
git@gitee.com:openharmony/docs.git
openharmony
docs
docs

搜索帮助