我遵循了build_and_run_inception_hexagon.sh并生成了hexagon_graph_execution可执行文件。现在,我不想使用真实的设备,而是要使用SDK 3.0中提供的hexagon-sim测试初始模型。因此,无需使用adb push命令,因为SDK可以使用hexagon-sim模拟HVX设备。
我将运行时库和初始模型以及映像放在同一文件夹中。执行后,它给我这个错误:

~/Qualcomm/HEXAGON_Tools/7.2.12/Tools/bin/hexagon-sim ./hexagon_graph_execution "/home/aashouri/Qualcomm/Hexagon_SDK/3.0/test/common/inception"
Error: Unsupported machine type 0x0 in ELF image "./hexagon_graph_execution" - exiting.


有人可以对此发表评论吗?

Hexagon-readelf

ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              DYN (Shared object file)
  Machine:                           ARM
  Version:                           0x1
  Entry point address:               0xc8c9c
  Start of program headers:          52 (bytes into file)
  Start of section headers:          39944896 (bytes into file)
  Flags:                             0x5000000, Version5 EABI
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         8
  Size of section headers:           40 (bytes)
  Number of section headers:         36
  Section header string table index: 35


XXD info

0000000: 7f45 4c46 0101 0100 0000 0000 0000 0000  .ELF............
0000010: 0300 2800 0100 0000 9c8c 0c00 3400 0000  ..(.........4...
0000020: c082 6102 0000 0005 3400 2000 0800 2800  ..a.....4. ...(.
0000030: 2400 2300 0600 0000 3400 0000 3400 0000  $.#.....4...4...
0000040: 3400 0000 0001 0000 0001 0000 0400 0000  4...............
0000050: 0400 0000 0300 0000 3401 0000 3401 0000  ........4...4...
0000060: 3401 0000 1300 0000 1300 0000 0400 0000  4...............
0000070: 0100 0000 0100 0000 0000 0000 0000 0000  ................
0000080: 0000 0000 ece6 2a01 ece6 2a01 0500 0000  ......*...*.....
0000090: 0010 0000 0100 0000 20eb 2a01 20fb 2a01  ........ .*. .*.

最佳答案

ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              DYN (Shared object file)
  Machine:                           ARM
  Version:                           0x1


此二进制文件不是由hexagon-clang构建的。您必须使用ARM工具链意外地构建了它-如果“ Machine”字段是为六角形DSP构建的,则“ Machine”字段将显示“ Qualcomm Hexagon”。

10-05 22:53
查看更多