bouffalolab / bouffalo_sdk

BouffaloSDK is the IOT and MCU software development kit provided by the Bouffalo Lab Team, supports all the series of Bouffalo chips. Also it is the combination of bl_mcu_sdk and bl_iot_sdk
Apache License 2.0
349 stars 123 forks source link

CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool. #91

Closed ArpeggioP closed 1 year ago

ArpeggioP commented 1 year ago

having error with making file

what I got

toolchain_gcc_t-head_windows-master bl_mcu_sdk-master

I use windows cmd to build I chain all path, make and ninja from bl_mcu_sdk-master

so if I type make -v I got

GNU Make 4.2.1 Built for x86_64-w64-mingw32 Copyright (C) 1988-2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

but if I type riscv64-unknown-elf-gcc -v immediately I got error that it can not find the program except when I cd \toolchain_gcc_t-head_windows-master\bin

I got Using built-in specs. COLLECT_GCC=riscv64-unknown-elf-gcc COLLECT_LTO_WRAPPER=c:/users/arpeggio/desktop/ieee\ edge/toolchain_gcc_t-head_windows-master/bin/../libexec/gcc/riscv64-unknown-elf/10.2.0/lto-wrapper.exe Target: riscv64-unknown-elf Configured with: /mnt/ssd/jenkins_iotsw/slave/workspace/Toolchain/build-gnu-riscv/./source/riscv/riscv-gcc/configure --target=riscv64-unknown-elf --host=i686-w64-mingw32 --with-gmp=/mnt/ssd/jenkins_iotsw/slave/workspace/Toolchain/build-gnu-riscv/build-gcc-riscv64-unknown-elf/build-Xuantie-900-gcc-elf-newlib-mingw-V2.6.1/lib-for-gcc-mingw --with-mpfr=/mnt/ssd/jenkins_iotsw/slave/workspace/Toolchain/build-gnu-riscv/build-gcc-riscv64-unknown-elf/build-Xuantie-900-gcc-elf-newlib-mingw-V2.6.1/lib-for-gcc-mingw --with-mpc=/mnt/ssd/jenkins_iotsw/slave/workspace/Toolchain/build-gnu-riscv/build-gcc-riscv64-unknown-elf/build-Xuantie-900-gcc-elf-newlib-mingw-V2.6.1/lib-for-gcc-mingw --with-libexpat-prefix=/mnt/ssd/jenkins_iotsw/slave/workspace/Toolchain/build-gnu-riscv/build-gcc-riscv64-unknown-elf/build-Xuantie-900-gcc-elf-newlib-mingw-V2.6.1/lib-for-gcc-mingw --with-libmpfr-prefix=/mnt/ssd/jenkins_iotsw/slave/workspace/Toolchain/build-gnu-riscv/build-gcc-riscv64-unknown-elf/build-Xuantie-900-gcc-elf-newlib-mingw-V2.6.1/lib-for-gcc-mingw --with-pkgversion='Xuantie-900 elf newlib gcc Toolchain V2.6.1 B-20220906' CXXFLAGS='-g -O2 -DTHEAD_VERSION_NUMBER=2.6.1 ' --enable-libgcctf --prefix=/mnt/ssd/jenkins_iotsw/slave/workspace/Toolchain/build-gnu-riscv/build-gcc-riscv64-unknown-elf/Xuantie-900-gcc-elf-newlib-mingw-V2.6.1 --disable-shared --enable-threads=posix --enable-languages=c,c++ --without-system-zlib --enable-tls --with-newlib --with-sysroot=/mnt/ssd/jenkins_iotsw/slave/workspace/Toolchain/build-gnu-riscv/build-gcc-riscv64-unknown-elf/Xuantie-900-gcc-elf-newlib-mingw-V2.6.1/riscv64-unknown-elf --with-native-system-header-dir=/include --disable-libmudflap --disable-libssp --disable-libquadmath --disable-libgomp --disable-nls --disable-tm-clone-registry --src=/mnt/ssd/jenkins_iotsw/slave/workspace/Toolchain/build-gnu-riscv/./source/riscv/riscv-gcc --enable-multilib --with-abi=lp64d --with-arch=rv64gcxthead 'CFLAGS_FOR_TARGET=-Os -mcmodel=medany' 'CXXFLAGS_FOR_TARGET=-Os -mcmodel=medany' Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 10.2.0 (Xuantie-900 elf newlib gcc Toolchain V2.6.1 B-20220906)

little bit differnt but as I go on

when I cd \bl_mcu_sdk-master\examples\helloworld and make CHIP=bl808 CPU_ID=m0 BOARD=bl808dk I got this error

CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.

It got error about MinGW Makefiles

sorry about long message

ArpeggioP commented 1 year ago

and I also add environment path .\toolchain_gcc_t-head_windows-master\bin for riscv64-unknown-elf-gcc -v command

but still got a same error

sakumisu commented 1 year ago

Refer to https://bl-mcu-sdk.readthedocs.io/zh_CN/latest/get_started/windows_cmd.html

sakumisu commented 1 year ago

Nothing problem.

PS E:\repo\bl_mcu_sdk> make -v
GNU Make 4.2.1
Built for x86_64-w64-mingw32
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
PS E:\repo\bl_mcu_sdk> cd .\examples\helloworld\
PS E:\repo\bl_mcu_sdk\examples\helloworld> make
./../../tools/cmake/bin/cmake.exe -S . -B build -G "MinGW Makefiles" -DCROSS_COMPILE=riscv64-unknown-elf- -DCHIP=bl616 -DCPU_ID= -DBOARD=bl616dk -DBOARD_DIR= -DCONFIG_DEBUG=y -DCONFIG_ROMAPI=y -DCONFIG_USB_HS=y -DCONFIG_COMX=COM5 -DCMAKE_EXPORT_COMPILE_COMMANDS=OFF -DCONFIG_TLSF=y
-- The C compiler identification is GNU 10.2.0
-- The CXX compiler identification is GNU 10.2.0
-- The ASM compiler identification is GNU
-- Found assembler: D:/EmbddedSoftware/toolchain_gcc_t-head_windows/bin/riscv64-unknown-elf-gcc.exe
ArpeggioP commented 1 year ago

okay I will try again I think I got problem with cmake

make ninja CHIP=bl808 CPU_ID=m0 BOARD=bl808dk seems to work but got error

[53/119] Building C object build_out/components/utils/CMakeFiles/utils.dir/soft_crc/soft_crc.c.obj FAILED: build_out/components/utils/CMakeFiles/utils.dir/soft_crc/soft_crc.c.obj

thanks for the reply though

sakumisu commented 1 year ago

Refer to the doc.

sakumisu commented 1 year ago

If you build error in cmake, why cause FAILED: build_out/components/utils/CMakeFiles/utils.dir/soft_crc/soft_crc.c.obj? this is paradoxical, so solve this by yourself.

ArpeggioP commented 1 year ago

well I did reed the doc as it said https://bl-mcu-sdk.readthedocs.io/zh_CN/latest/get_started/windows_cmd.html I add path bin, make, ninja

make -v and riscv64-unknown-elf-gcc -v works

but still got the error may be I got somthing wrong with my settings and I didn't understand about build error in cmake paradoxical

I just got failed with soft_crc.c.obj, bflb_common.c.obj, bflb_ef_ctrl.c.obj well

thanks for reply

sakumisu commented 1 year ago

No error, i have tested.

sakumisu commented 1 year ago

Check by yourself

sakumisu commented 1 year ago

如果你是国人,请用中文

ArpeggioP commented 1 year ago

sorry but I don't speak chinese I will try again

sakumisu commented 1 year ago

all right, maybe your environment is bad, there is no one reporting it, and i have tested ok.

ArpeggioP commented 1 year ago

thanks for reply I found out some others got same error too It seems I have to fix my enviroment It is bit messy though I really appreciate your help

I will just close this issue

ArpeggioP commented 1 year ago

I know its closed but I got it work it was simple but still I have no clue how it got worked I just did same thing doc said but I used window 10

I used window 11 before but it didn't work window 10 seems to compile properly