sipeed / RV-Debugger-BL702

RV-Debugger-BL702 Project, an opensource debugger implement
168 stars 60 forks source link

reent.h: No such file or directory #16

Open lhmax2010 opened 1 year ago

lhmax2010 commented 1 year ago

我们依照这个方法在LicheePi4A的板子上面进行编译的

apt install git make cmake binutils-riscv64-unknown-elf gcc-riscv64-unknown-elf picolibc-riscv64-unknown-elf git clone https://github.com/sipeed/RV-Debugger-BL702 git submodule update --init cd RV-Debugger-BL702/firmware/bl_mcu_sdk echo "add_compile_options(-specs=picolibc.specs)" >> tools/cmake/compiler_flags.cmake echo "add_link_options(-specs=picolibc.specs)" >> tools/cmake/compiler_flags.cmake make

结果报错了 [ 97%] Building C object samples/usb2uartjtag/CMakeFiles/usb2uartjtag_bl702.elf.dir/home/debian/RV-Debugger-BL702/firmware/bl_mcu_sdk/bsp/bsp_common/platform/syscalls.c.obj /home/debian/RV-Debugger-BL702/firmware/bl_mcu_sdk/bsp/bsp_common/platform/syscalls.c:1:10: fatal error: reent.h: No such file or directory 1 | #include | ^~~~~ compilation terminated. make[3]: [samples/usb2uartjtag/CMakeFiles/usb2uartjtag_bl702.elf.dir/build.make:174: samples/usb2uartjtag/CMakeFiles/usb2uartjtag_bl702.elf.dir/home/debian/RV-Debugger-BL702/firmware/bl_mcu_sdk/bsp/bsp_common/platform/syscalls.c.obj] Error 1 make[3]: Waiting for unfinished jobs.... make[3]: Leaving directory '/home/debian/RV-Debugger-BL702/firmware/bl_mcu_sdk/build' make[2]: [CMakeFiles/Makefile2:153: samples/usb2uartjtag/CMakeFiles/usb2uartjtag_bl702.elf.dir/all] Error 2 make[2]: Leaving directory '/home/debian/RV-Debugger-BL702/firmware/bl_mcu_sdk/build' make[1]: [Makefile:91: all] Error 2 make[1]: Leaving directory '/home/debian/RV-Debugger-BL702/firmware/bl_mcu_sdk/build' make: *** [Makefile:52: build] Error 2

能看下是什么原因么?

lhmax2010 commented 1 year ago

After remove the echo "add_compile_options(-specs=picolibc.specs)" >> tools/cmake/compiler_flags.cmake echo "add_link_options(-specs=picolibc.specs)" >> tools/cmake/compiler_flags.cmake And then we move to compile with the latest riscv64 toolchain, it compile success. But we met the new issue with link

/home/linhao/RISC-V/Codes/GNU_Tool/toolchain/lib/gcc/riscv64-unknown-elf/12.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/linhao/RISC-V/Codes/GNU_Tool/toolchain/lib/gcc/riscv64-unknown-elf/12.2.0/../../../../riscv64-unknown-elf/lib/libc_nano.a(lib_a-malloc.o): ABI is incompatible with that of the selected emulation: target emulation elf64-littleriscv' does not matchelf32-littleriscv' /home/linhao/RISC-V/Codes/GNU_Tool/toolchain/lib/gcc/riscv64-unknown-elf/12.2.0/../../../../riscv64-unknown-elf/bin/ld: failed to merge target specific data of file /home/linhao/RISC-V/Codes/GNU_Tool/toolchain/lib/gcc/riscv64-unknown-elf/12.2.0/../../../../riscv64-unknown-elf/lib/libc_nano.a(lib_a-malloc.o) /home/linhao/RISC-V/Codes/GNU_Tool/toolchain/lib/gcc/riscv64-unknown-elf/12.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/linhao/RISC-V/Codes/GNU_Tool/toolchain/lib/gcc/riscv64-unknown-elf/12.2.0/../../../../riscv64-unknown-elf/lib/libc_nano.a(lib_a-memcpy-asm.o): ABI is incompatible with that of the selected emulation: target emulation elf64-littleriscv' does not matchelf32-littleriscv' /home/linhao/RISC-V/Codes/GNU_Tool/toolchain/lib/gcc/riscv64-unknown-elf/12.2.0/../../../../riscv64-unknown-elf/bin/ld: failed to merge target specific data of file /home/linhao/RISC-V/Codes/GNU_Tool/toolchain/lib/gcc/riscv64-unknown-elf/12.2.0/../../../../riscv64-unknown-elf/lib/libc_nano.a(lib_a-memcpy-asm.o) /home/linhao/RISC-V/Codes/GNU_Tool/toolchain/lib/gcc/riscv64-unknown-elf/12.2.0/../../../../riscv64-unknown-elf/bin/ld: /home/linhao/RISC-V/Codes/GNU_Tool/toolchain/lib/gcc/riscv64-unknown-elf/12.2.0/../../../../riscv64-unknown-elf/lib/libc_nano.a(lib_a-memset.o): ABI is incompatible with that of the selected emulation: target emulation elf64-littleriscv' does not matchelf32-littleriscv'

It seemed that the project has something conflict with the 64bits riscv toolchain.

Bestoa commented 6 days ago

换编译器,装的版本不能用,下个FreedomStudio