KL630 EVK 執行 Generic Image Inference的錯誤訊息

您好,我在KL630_V01 96board上用 windows PC 上面執行 ./kl630_demo_generic_image_inference_post_yolo

請問何種原因出現以下錯誤訊息,謝謝:

=====================

$ ./kl630_demo_generic_image_inference_post_yolo

connect device ... OK

upload firmware ... OK

upload model ... OK

read image ... OK

starting inference loop 10 times:

inference failed, error = -7 (USB: Operation timed out)

=====================

另外在telnet連線上也會看到以下訊息

[_get_model_info] get model info send fw_info response failed, sts 0

...

[kdp2_usb_companion_image_thread] error !! inf image size (739468) is bigger than buffer size (20480)

Comments

  • Hi RayYu,

    請問您有做了哪些改動呢?

  • 收到Kneron 的96 board(KL630_V01_20230313)之後就按照KL630 96board User Manual以及Getting started的流程來操作(https://doc.kneron.com/docs/#plus_c/getting_started/),簡列操作流程如下供參考:

    1.power on reset 96board

    2.telnet 192.168.3.10

    3. switch to Kneron PLUS(companion)

    4.用Kneron DFUT update to "USB boot " and RUN

    5.在windows 打開MYSYS2上執行./kl630_demo_generic_image_inference_post_yolo

  • Hi RayYu,

    請問您PLUS是使用哪個版本呢?

    也請幫忙提供KL630這端完整的log做查看,感謝!

  • Hi Nick,

    您好,Kneron PLUS用的是kneron_plus_v3.1.1, 在windows上編譯用General example時 cmake 4.0.0(自動安裝)

    另外後續更新了96 board firmware SDK 2.5.5後,error code 卻變成102

    執行時的LOG如下(MYSYS2+ Telnet (CMD prompt)):

    ===

    renyu@user MINGW64 /e/Prolific_2025/Kneron_tmp/kneron_plus/build/bin

    $ ./scan_devices.exe


    scanning kneron devices ...

    number of Kneron devices found: 1


    listing devices infomation as follows:


    [0] scan_index: '0'

    [0] port ID: '526'

    [0] product_id: '0x630' (KL630)

    [0] USB link speed: 'High-Speed'

    [0] USB port path: '2-3-4'

    [0] kn_number: '0x1A0710BC'

    [0] Connectable: 'True'

    [0] Firmware: 'KDP2 Loader/L'


    renyu@user MINGW64 /e/Prolific_2025/Kneron_tmp/kneron_plus/build/bin

    $ ./kl630_demo_generic_data_inference.exe

    connect device ... OK

    upload firmware ... OK

    upload model ... OK

    read image ... OK


    starting inference loop 10 times:



    inference failed, error = 102 (Device is not able to allocate DDR memory)


    renyu@user MINGW64 /e/Prolific_2025/Kneron_tmp/kneron_plus/build/bin

    $ ./kl630_demo_generic_image_inference_post_yolo.exe

    connect device ... OK

    upload firmware ... OK

    upload model ... OK

    read image ... OK


    starting inference loop 10 times:



    inference failed, error = 102 (Device is not able to allocate DDR memory)

    ===

    windows command prompt

    ====

    # [debug - control transfer]

    bRequestType = 0x40

    bRequest   = 0x80

    wValue    = 0x0(0)

    wIndex    = 0x0

    wLength   = 0


    control bRequest = 0x80 (do fifoq reset)

    Unable to get usb fifo for endpoint


    [debug - control transfer]

    bRequestType = 0x1c

    bRequest   = 0xd

    wValue    = 0xb634(46644)

    wIndex    = 0x0

    wLength   = 0


    Not a PLUS control cmd

    bRequestType = 0x1c

    bRequest   = 0xd

    wValue    = 0xb634(46644)

    wIndex    = 0x0

    wLength   = 0


    [debug - control transfer]

    bRequestType = 0x40

    bRequest   = 0xff

    wValue    = 0x0(0)

    wIndex    = 0x0

    wLength   = 0


    control bRequest = 0xff (do reboot)

    receive SIGNAL: 15

    sig_kill end

    Unable to get usb fifo for endpoint


    Unable to get usb fifo for endpoint


    Unable to get usb fifo for endpoint


    receive SIGNAL: 2

    sig_kill end

    VMF_NNM_Usbd_Close pthread_join ok


    main end

    [run] waitpid loader_status: 0 ret: 121

    [run] exited, status: 0

    [if_exit_call_back_kp_fw] kp_firmware exit status 0

    [if_exit_call_back_kp_fw] boot_mode: USB-Boot

    [if_exit_call_back_kp_fw] boot_kp_firmware_partition_idx: 0

    [if_exit_call_back_kp_fw] boot_from_flash_failure_count: 0



    **********************************************************

    Kneron Daemon (Active)

    Ver. 1.0.0.1212

    Build Time: Dec 12 2023 13:39:01

    **********************************************************

    [main] boot_kp_loader_partition_idx: 0

    [main] boot_kp_loader_failure_count: 0

    [run] child_pid: 655



    **********************************************************

    Kneron Loader

    Ver. 1.0.0.1212

    Build Time: Dec 12 2023 13:39:02

    **********************************************************

    [main] boot_mode: USB-Boot

    [main] boot_kp_firmware_partition_idx: 0

    [main] boot_from_flash_failure_count: 0

    [kdp2_usb_loader_init] KDP2 FW is running in loader mode

    [debug - control transfer]

    bRequestType = 0x0

    bRequest   = 0x0

    wValue    = 0x0(0)

    wIndex    = 0x0

    wLength   = 0


    [debug - control transfer]

    bRequestType = 0x0

    bRequest   = 0x0

    wValue    = 0x0(0)

    wIndex    = 0x0

    wLength   = 0


    USB device is ready

    USB is connected

    [usb_boot_process] start receiving fw through usb ...

    [usb_boot_process][untar_cmd] tar -xf /tmp/kp_firmware.tar --directory /tmp/plus && sync

    [usb_boot_process][rm_cmd] rm /tmp/kp_firmware.tar

    [usb_boot_process] received fw is done !

    [run] waitpid loader_status: 0 ret: 121

    [run] exited, status: 0

    [if_exit_call_back_loader] kp_loader exit status 0

    [if_exit_call_back_loader] boot_kp_loader_partition_idx: 0

    [if_exit_call_back_loader] boot_kp_loader_failure_count: 0

    [run] child_pid: 671

    [MemMgr][Info]: Start to use memory manager library version 4.2.0.0 !!

    [MemMgr][Info]: Open EDMC device driver version 6.3.0.2 successful !!



    **********************************************************

    Kneron Firmware

    Ver. 1.3.0.314

    Build Time: Mar 14 2025 16:26:39

    **********************************************************

    [main] app_initialize

    >> Start running KL630 KDP2 companion mode ...


    starting KDP2 middleware ...

    KDP2 FW is running in usb-boot mode

    write descriptors1

    [debug - control transfer]

    bRequestType = 0x0

    bRequest   = 0x0

    wValue    = 0x0(0)

    wIndex    = 0x0

    wLength   = 0


    [debug - control transfer]

    bRequestType = 0x0

    bRequest   = 0x0

    wValue    = 0x0(0)

    wIndex    = 0x0

    wLength   = 0


    USB device is ready

    USB is connected

    [debug - control transfer]

    bRequestType = 0x40

    bRequest   = 0x80

    wValue    = 0x0(0)

    wIndex    = 0x0

    wLength   = 0


    control bRequest = 0x80 (do fifoq reset)

    [debug - control transfer]

    bRequestType = 0x1c

    bRequest   = 0xcd

    wValue    = 0xb637(46647)

    wIndex    = 0x0

    wLength   = 0


    Not a PLUS control cmd

    bRequestType = 0x1c

    bRequest   = 0xcd

    wValue    = 0xb637(46647)

    wIndex    = 0x0

    wLength   = 0


    [_get_model_info] get model info send fw_info response failed, sts 0

    mdl_parser_open(): fw parser hdl=0x0x2c948

    =================== Parser NEF info ===================

    Model Amount : 1

    [0] Models ID : 211

    [0] Models Version: 0x22FA

    [0] Command.bin Length : 516088

    [0] Command.bin Buffer Virtual Address : 0x50001cc0

    [0] Weight.bin Length : 9017440

    [0] Weight.bin Buffer Virtual Address : 0x5007fcc0

    [0] Setup.bin Length : 776

    [0] Setup.bin Buffer Virtual Address : 0x50919520

    [0] Working Buffer Length : 4915200

    [0] Working Buffer Virtual Address : 0x5091aa00

    [0] Output Buffer Length : 2284800

    [0] Input Buffer Length : 1638400

    [0] [dim] Input 0 Row: 640

    [0] [dim] Input 0 Col: 640

    [0] [dim] Input 0 Channel: 3

    [0] [postproc] Output num: 3

    ========================================================

    VMTK_IE_Init(): IE Version. 0x0001

    VMTK_NPU_Init(): NPU Version. 0x0001

    Set NPU timeout failed

    physical memory size: 268435456 bytes

    edmc start address: 0x3e00000

    edmc end address: 0x2fe8

    edmc available size: 268423192 bytes

    [debug - control transfer]

    bRequestType = 0x40

    bRequest   = 0x84

    wValue    = 0x0(0)

    wIndex    = 0x0

    wLength   = 0


    control bRequest = 0x84 (do DDR help boundary adjust - NOT support)

    [debug - control transfer]

    bRequestType = 0x1c

    bRequest   = 0xcd

    wValue    = 0xb637(46647)

    wIndex    = 0x0

    wLength   = 0


    Not a PLUS control cmd

    bRequestType = 0x1c

    bRequest   = 0xcd

    wValue    = 0xb637(46647)

    wIndex    = 0x0

    wLength   = 0


    [debug - control transfer]

    bRequestType = 0x40

    bRequest   = 0x82

    wValue    = 0x32a2(12962)

    wIndex    = 0x6fa

    wLength   = 0


    control bRequest = 0x82 (do fifoq configure)

    allocating memory for fifoq: image 3 x 16599040, result 3 x 2293760, total 56678400 bytes

    [debug - control transfer]

    bRequestType = 0x1c

    bRequest   = 0xcd

    wValue    = 0xb637(46647)

    wIndex    = 0x0

    wLength   = 0


    Not a PLUS control cmd

    bRequestType = 0x1c

    bRequest   = 0xcd

    wValue    = 0xb637(46647)

    wIndex    = 0x0

    wLength   = 0


    [Error] Allocate memory space for inproc input failed

    [VMF_NNM_Inference_App_Execute] Request ncpu_package failed


    ===

    感謝~~

  • Hi RayYu,

    error log是記憶體不足,請幫忙在KL630 user space 下指令"fw_printenv"並貼給我檢查一下,也幫忙確認KL630開機後是否有跑其他程式,可以下指令"ps"查看,記憶體不足推測是跑了多個程式造成。

  • 您好,請參考以下資訊,謝謝~~

    LOG of "fw_printenv" command

    ==========

    # fw_printenv

    baudrate=115200

    bootcmd=run setargs;nand read 0xa00000 0x1e0000 0x400000;nand read 0x1400000 0x180000 0x60000;bootz 0xa00000 - 0x1400000

    bootdelay=3

    ethact=dweqos

    ethaddr=02:00:DC:01:10:AE

    fdt_high=0xffffffff

    gatewayip=172.23.0.1

    ipaddr=192.168.3.10

    modelname=Schubert

    netmask=255.255.0.0

    phy_mode=rmii

    root=/dev/mtdblock4

    serverip=172.17.0.12

    setargs=setenv bootargs;setenv bootargs root=${root} mem=16M@0x00000000 mem=45M@0x1100000 console=0,${baudrate} phy_mode=${phy_mode} ${mtdparts}

    stderr=serial

    stdin=serial

    stdout=serial

    #

    ==========

    Log of "PS" command

    =========

    # ps

    PID  USER   COMMAND

      1 root   init

      2 root   [kthreadd]

      3 root   [ksoftirqd/0]

      5 root   [kworker/0:0H]

      6 root   [kworker/u2:0]

      7 root   [lru-add-drain]

      8 root   [kdevtmpfs]

      9 root   [oom_reaper]

      10 root   [writeback]

      11 root   [kcompactd0]

      12 root   [crypto]

      13 root   [bioset]

      14 root   [kblockd]

      15 root   [cfg80211]

      16 root   [kworker/0:1]

      17 root   [watchdogd]

      18 root   [rpciod]

      19 root   [xprtiod]

      20 root   [kswapd0]

      21 root   [nfsiod]

      47 root   [bioset]

      48 root   [spi0]

      49 root   [kworker/u2:1]

      51 root   [bioset]

      52 root   [bioset]

      53 root   [bioset]

      54 root   [bioset]

      55 root   [bioset]

      56 root   [bioset]

      57 root   [spi1]

      59 root   [ipv6_addrconf]

      60 root   [kworker/0:2]

      61 root   [kworker/0:1H]

      75 root   /sbin/syslogd -n

      76 root   /sbin/klogd -n

     105 root   /usr/sbin/xinetd -pidfile /var/run/xinetd.pid

     111 root   [ubi_bgt0d]

     115 root   [ubifs_bgt0_0]

     197 root   ./rtsps -c stream_server_config.ini

     198 root   ./kp_firmware_host_stream

     199 root   -/bin/sh

     215 root   [sensor_queue]

     216 root   [sensor_queue]

     230 root   telnetd

     231 root   -sh

     234 root   /sbin/watchdog -T 3 -t 2 /dev/watchdog

     247 root   /mnt/flash//plus/kp_daemon/bin/kp_daemon

     332 root   [kp_firmware]

     377 root   ps

    #

    ======

  • Hi RayYu,

    在KL630上使用"ps"指令可以看到系統已經啟動了"rtsps"和"hos_stream"(分別為 PID 197 和 198),這些是 IPCAM 的範例程式。這些程序會在開機時自動啟動,是因為系統執行了/mnt/flash/etc/rc.local 這支script。您可以參考 rc.local 的內容,進一步了解 KL630 開機時的執行流程。

    針對您目前的需求,如果不需要這些範例程式自動執行,只需要將 rc.local 中的 ./start.sh 這一行註解掉即可。

  • 謝謝Nick 協助,中止 rtsps 與 hos_stream程序,或修改rc.local 後可以執行推論了

Sign In or Register to comment.