cmake win10编译model compilererror



  • 。我照着model complier的readme在win10下搬运,到了cmake .. -DPROJ=kpu -DTOOLCHAIN=/opt/riscv-toolchain/bin这一步昨天死活说没有显示。于是我想到了官网提供了一个toolchain,用了这个cmake .. -DPROJ=kpu -DTOOLCHAIN=D:/kendryte-toolchain-win-amd64-8.2.0/kendryte-toolchain/bin && make(这个是地址。我不知道我cmake用的对不) 信息如下:
    PROJ = kpu
    -- Check for RISCV toolchain ...
    -- Using D:/kendryte-toolchain-win-amd64-8.2.0/kendryte-toolchain/bin RISCV toolchain
    -- The C compiler identification is GNU 8.2.0
    -- The CXX compiler identification is GNU 8.2.0
    -- Detecting C compiler ABI info
    CMake Error: Generator: execution of make failed. Make command was: "nmake" "/NOLOGO" "cmTC_1048b\fast"
    -- Detecting C compiler ABI info - failed
    -- Detecting C compile features
    CMake Error: Generator: execution of make failed. Make command was: "nmake" "/NOLOGO" "cmTC_46f73\fast"
    -- Detecting C compile features - failed
    -- Detecting CXX compiler ABI info
    CMake Error: Generator: execution of make failed. Make command was: "nmake" "/NOLOGO" "cmTC_712cd\fast"
    -- Detecting CXX compiler ABI info - failed
    -- Detecting CXX compile features
    CMake Error: Generator: execution of make failed. Make command was: "nmake" "/NOLOGO" "cmTC_5e52b\fast"
    -- Detecting CXX compile features - failed
    SOURCE_FILES=D:/kendryte-standalone-sdk-0.5.2/src/kpu/gencode_output.c;D:/kendryte-standalone-sdk-0.5.2/src/kpu/lcd.c;D:/kendryte-standalone-sdk-0.5.2/src/kpu/main.c;D:/kendryte-standalone-sdk-0.5.2/src/kpu/nt35310.c;D:/kendryte-standalone-sdk-0.5.2/src/kpu/ov5640.c;D:/kendryte-standalone-sdk-0.5.2/src/kpu/region_layer.c

    Project: kpu
    LIST_FILE=D:/kendryte-standalone-sdk-0.5.2/cmake/executable.cmake
    TOOLCHAIN=D:/kendryte-toolchain-win-amd64-8.2.0/kendryte-toolchain/bin
    KENDRYTE_IDE=
    BUILDING_SDK=yes

    CMAKE_BUILD_TYPE=Debug
    CMAKE_C_COMPILER=D:/kendryte-toolchain-win-amd64-8.2.0/kendryte-toolchain/bin/riscv64-unknown-elf-gcc.exe
    CMAKE_CXX_COMPILER=D:/kendryte-toolchain-win-amd64-8.2.0/kendryte-toolchain/bin/riscv64-unknown-elf-g++.exe
    CMAKE_LINKER=D:/kendryte-toolchain-win-amd64-8.2.0/kendryte-toolchain/bin/riscv64-unknown-elf-ld.exe
    CMAKE_OBJCOPY=D:/kendryte-toolchain-win-amd64-8.2.0/kendryte-toolchain/bin/riscv64-unknown-elf-objcopy.exe
    CMAKE_OBJDUMP=D:/kendryte-toolchain-win-amd64-8.2.0/kendryte-toolchain/bin/riscv64-unknown-elf-objdump.exe
    CMAKE_MAKE_PROGRAM=nmake

    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 -T D:/kendryte-standalone-sdk-0.5.2/lds/kendryte.ld
    CMAKE_BINARY_DIR=D:/kendryte-standalone-sdk-0.5.2/build
    我不太清楚发生了什么,想传build压缩包传不上去于是就把信息复制上来了。



  • @xiangbingj 。对cmake还是不太熟悉所以对应该怎么改我再摸索一下,,,


  • Staff

    你好,这个情况应该是cmake的问题。试这个地方的答案对你有帮助吗:https://cloud.tencent.com/developer/ask/150334