[ HELP ] unrecognized opcode `fmv.d.x f0,x0'


#1

[HELP] I’m building hello_world project from kendryte-standalone-sdk-0.5.3 and toolchain version kendryte-toolchain-ubuntu-amd64-8.2.0-20190213 and compiler throws error.

where did I mess up??

[ 88%] Building C object lib/CMakeFiles/kendryte.dir/freertos/timers.c.obj
[ 91%] Building C object lib/CMakeFiles/kendryte.dir/bsp/crt.S.obj
/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/lib/bsp/crt.S: Assembler messages:
/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/lib/bsp/crt.S:79: Error: unrecognized opcode `fmv.d.x f0,x0'
/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/lib/bsp/crt.S:80: Error: unrecognized opcode `fmv.d.x f1,x0'
/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/lib/bsp/crt.S:81: Error: unrecognized opcode `fmv.d.x f2,x0'
/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/lib/bsp/crt.S:82: Error: unrecognized opcode `fmv.d.x f3,x0'
/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/lib/bsp/crt.S:83: Error: unrecognized opcode `fmv.d.x f4,x0'
/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/lib/bsp/crt.S:84: Error: unrecognized opcode `fmv.d.x f5,x0'
/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/lib/bsp/crt.S:85: Error: unrecognized opcode `fmv.d.x f6,x0'
/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/lib/bsp/crt.S:86: Error: unrecognized opcode `fmv.d.x f7,x0'
/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/lib/bsp/crt.S:87: Error: unrecognized opcode `fmv.d.x f8,x0'
/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/lib/bsp/crt.S:88: Error: unrecognized opcode `fmv.d.x f9,x0'
/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/lib/bsp/crt.S:89: Error: unrecognized opcode `fmv.d.x f10,x0'
/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/lib/bsp/crt.S:90: Error: unrecognized opcode `fmv.d.x f11,x0'
/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/lib/bsp/crt.S:91: Error: unrecognized opcode `fmv.d.x f12,x0'
/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/lib/bsp/crt.S:92: Error: unrecognized opcode `fmv.d.x f13,x0'
/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/lib/bsp/crt.S:93: Error: unrecognized opcode `fmv.d.x f14,x0'
/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/lib/bsp/crt.S:94: Error: unrecognized opcode `fmv.d.x f15,x0'
/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/lib/bsp/crt.S:95: Error: unrecognized opcode `fmv.d.x f16,x0'
/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/lib/bsp/crt.S:96: Error: unrecognized opcode `fmv.d.x f17,x0'
/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/lib/bsp/crt.S:97: Error: unrecognized opcode `fmv.d.x f18,x0'
/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/lib/bsp/crt.S:98: Error: unrecognized opcode `fmv.d.x f19,x0'
/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/lib/bsp/crt.S:99: Error: unrecognized opcode `fmv.d.x f20,x0'
/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/lib/bsp/crt.S:100: Error: unrecognized opcode `fmv.d.x f21,x0'
/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/lib/bsp/crt.S:101: Error: unrecognized opcode `fmv.d.x f22,x0'
/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/lib/bsp/crt.S:102: Error: unrecognized opcode `fmv.d.x f23,x0'
/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/lib/bsp/crt.S:103: Error: unrecognized opcode `fmv.d.x f24,x0'
/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/lib/bsp/crt.S:104: Error: unrecognized opcode `fmv.d.x f25,x0'
/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/lib/bsp/crt.S:105: Error: unrecognized opcode `fmv.d.x f26,x0'
/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/lib/bsp/crt.S:106: Error: unrecognized opcode `fmv.d.x f27,x0'
/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/lib/bsp/crt.S:107: Error: unrecognized opcode `fmv.d.x f28,x0'
/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/lib/bsp/crt.S:108: Error: unrecognized opcode `fmv.d.x f29,x0'
/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/lib/bsp/crt.S:109: Error: unrecognized opcode `fmv.d.x f30,x0'
/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/lib/bsp/crt.S:110: Error: unrecognized opcode `fmv.d.x f31,x0'
lib/CMakeFiles/kendryte.dir/build.make:1022: recipe for target 'lib/CMakeFiles/kendryte.dir/bsp/crt.S.obj' failed
make[2]: *** [lib/CMakeFiles/kendryte.dir/bsp/crt.S.obj] Error 1
CMakeFiles/Makefile2:122: recipe for target 'lib/CMakeFiles/kendryte.dir/all' failed
make[1]: *** [lib/CMakeFiles/kendryte.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

detailed log is here(pastebin) : HERE


#2

Hi, I noticed you use the newest toolchain upload on 20190213.
It is buggy on D-extend.
Please use the toolchain in here: https://kendryte.com/downloads/


#3

Still Getting Error(another)
Now using kendryte toolchain 8.2.0(from kendryte download page)!

punit@punit-VirtualBox:~/Documents/sipeed/kendryte-standalone-sdk-0.5.3/build$ cmake .. -DPROJ=hello_world -DTOOLCHAIN=/opt/kendryte-toolchain720/bin && make
PROJ = hello_world
-- Check for RISCV toolchain ...
-- Using /opt/kendryte-toolchain720/bin RISCV toolchain
SOURCE_FILES=/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/src/hello_world/main.c

Project: hello_world
  LIST_FILE=/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/cmake/executable.cmake
  TOOLCHAIN=/opt/kendryte-toolchain720/bin
  KENDRYTE_IDE=
  BUILDING_SDK=yes

  CMAKE_BUILD_TYPE=Debug
  CMAKE_C_COMPILER=/opt/kendryte-toolchain/bin/riscv64-unknown-elf-gcc
  CMAKE_CXX_COMPILER=/opt/kendryte-toolchain/bin/riscv64-unknown-elf-g++
  CMAKE_LINKER=/opt/kendryte-toolchain/bin/riscv64-unknown-elf-ld
  CMAKE_OBJCOPY=/opt/kendryte-toolchain720/bin/riscv64-unknown-elf-objcopy
  CMAKE_OBJDUMP=/opt/kendryte-toolchain720/bin/riscv64-unknown-elf-objdump
  CMAKE_MAKE_PROGRAM=/usr/bin/make

  CMAKE_C_FLAGS= -mcmodel=medany -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -fno-zero-initialized-in-bss -Os -ggdb -std=gnu11 -Wno-pointer-to-int-cast -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Werror=frame-larger-than=65536 -Wno-unused-parameter -Wno-sign-compare -Wno-error=missing-braces -Wno-error=return-type -Wno-error=pointer-sign -Wno-missing-braces -Wno-strict-aliasing -Wno-implicit-fallthrough -Wno-missing-field-initializers -Wno-old-style-declaration
  CMAKE_CXX_FLAGS= -mcmodel=medany -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -fno-zero-initialized-in-bss -Os -ggdb -std=gnu++17 -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Werror=frame-larger-than=65536 -Wno-unused-parameter -Wno-sign-compare -Wno-error=missing-braces -Wno-error=return-type -Wno-error=pointer-sign -Wno-missing-braces -Wno-strict-aliasing -Wno-implicit-fallthrough -Wno-missing-field-initializers
  LDFLAGS= -nostartfiles -static -Wl,--gc-sections -Wl,-static -Wl,--start-group -Wl,--whole-archive -Wl,--no-whole-archive -Wl,--end-group -Wl,-EL -Wl,--no-relax -T /home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/lds/kendryte.ld
  CMAKE_BINARY_DIR=/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/build
Makefile created.


-- Configuring done
You have changed variables that require your cache to be deleted.
Configure will be re-run and you may have to reset some variables.
The following variables have changed:
CMAKE_C_COMPILER= /opt/kendryte-toolchain720/bin/riscv64-unknown-elf-gcc
CMAKE_CXX_COMPILER= /opt/kendryte-toolchain720/bin/riscv64-unknown-elf-g++

-- PROJ not set, use kendryte-standalone-sdk-0.5.3 as PROJ. Also, you can set it manually. e.g. -DPROJ=hello_world
-- Check for RISCV toolchain ...
CMake Error at cmake/toolchain.cmake:16 (message):
  TOOLCHAIN must be set, to absolute path of kendryte-toolchain dist/bin
  folder.
Call Stack (most recent call first):
  cmake/common.cmake:30 (include)
  CMakeLists.txt:16 (include)


-- Configuring incomplete, errors occurred!
punit@punit-VirtualBox:~/Documents/sipeed/kendryte-standalone-sdk-0.5.3/build$ cmake .. -DPROJ=hello_world -DTOOLCHAIN=/opt/kendryte-toolchain/bin && make
PROJ = hello_world
-- Check for RISCV toolchain ...
-- Using /opt/kendryte-toolchain/bin RISCV toolchain
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- The ASM compiler identification is GNU
-- Found assembler: /opt/kendryte-toolchain/bin/riscv64-unknown-elf-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
SOURCE_FILES=/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/src/hello_world/main.c

Project: hello_world
  LIST_FILE=/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/cmake/executable.cmake
  TOOLCHAIN=/opt/kendryte-toolchain/bin
  KENDRYTE_IDE=
  BUILDING_SDK=yes

  CMAKE_BUILD_TYPE=Debug
  CMAKE_C_COMPILER=/opt/kendryte-toolchain/bin/riscv64-unknown-elf-gcc
  CMAKE_CXX_COMPILER=/opt/kendryte-toolchain/bin/riscv64-unknown-elf-g++
  CMAKE_LINKER=/opt/kendryte-toolchain/bin/riscv64-unknown-elf-ld
  CMAKE_OBJCOPY=/opt/kendryte-toolchain/bin/riscv64-unknown-elf-objcopy
  CMAKE_OBJDUMP=/opt/kendryte-toolchain/bin/riscv64-unknown-elf-objdump
  CMAKE_MAKE_PROGRAM=/usr/bin/make

  CMAKE_C_FLAGS= -mcmodel=medany -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -fno-zero-initialized-in-bss -Os -ggdb -std=gnu11 -Wno-pointer-to-int-cast -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Werror=frame-larger-than=65536 -Wno-unused-parameter -Wno-sign-compare -Wno-error=missing-braces -Wno-error=return-type -Wno-error=pointer-sign -Wno-missing-braces -Wno-strict-aliasing -Wno-implicit-fallthrough -Wno-missing-field-initializers -Wno-old-style-declaration
  CMAKE_CXX_FLAGS= -mcmodel=medany -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -fno-zero-initialized-in-bss -Os -ggdb -std=gnu++17 -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Werror=frame-larger-than=65536 -Wno-unused-parameter -Wno-sign-compare -Wno-error=missing-braces -Wno-error=return-type -Wno-error=pointer-sign -Wno-missing-braces -Wno-strict-aliasing -Wno-implicit-fallthrough -Wno-missing-field-initializers
  LDFLAGS= -nostartfiles -static -Wl,--gc-sections -Wl,-static -Wl,--start-group -Wl,--whole-archive -Wl,--no-whole-archive -Wl,--end-group -Wl,-EL -Wl,--no-relax -T /home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/lds/kendryte.ld
  CMAKE_BINARY_DIR=/home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/build
Makefile created.


-- Configuring done
-- Generating done
-- Build files have been written to: /home/punit/Documents/sipeed/kendryte-standalone-sdk-0.5.3/build
[  2%] Building C object lib/CMakeFiles/kendryte.dir/bsp/entry.c.obj
/opt/kendryte-toolchain/libexec/gcc/riscv64-unknown-elf/8.2.0/cc1: error while loading shared libraries: libmpfr.so.4: cannot open shared object file: No such file or directory
lib/CMakeFiles/kendryte.dir/build.make:62: recipe for target 'lib/CMakeFiles/kendryte.dir/bsp/entry.c.obj' failed
make[2]: *** [lib/CMakeFiles/kendryte.dir/bsp/entry.c.obj] Error 1
CMakeFiles/Makefile2:122: recipe for target 'lib/CMakeFiles/kendryte.dir/all' failed
make[1]: *** [lib/CMakeFiles/kendryte.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

#4

oh, it is simple error, you didn’t install libmpfr, you can install it first.


#5

Thanks Solved the issue.
I’m on ubuntu 18.04 so it has libmpfr6 and toolchain is looking for libmpfr4 so made workaround by doing this.

sudo ln -s /usr/lib/x86_64-linux-gnu/libmpfr.so.6 /usr/lib/x86_64-linux-gnu/libmpfr.so.4


#6

The fix punee995 proposed was to use the 7.2.0 toolchain, currently only kendryte-toolchain-ubuntu-amd64-8.2.0-20190213 is available on https://kendryte.com/downloads/ => getting the unrecognized opcode error. Can you fix this?


#7

try our mirror image: http://dl.sipeed.com/MAIX/SDK/ToolChain/


tiny-yolo on MAIX
#8

thanks! I was able to build the maixpy binary sucessfully :slight_smile: