编译官方提供的i2s_play_freertos实例程序出错,求大神解救



  • [ INFO] [ 95%] Building CXX object kendryte-freertos-sdk/CMakeFiles/kendryte-freertos-sdk.dir/lib/drivers/src/misc/ws2812b/ws2812b.cpp.obj
    [ INFO] [ 97%] Linking C static library libkendryte-freertos-sdk.a
    [ INFO] [ 97%] Built target kendryte-freertos-sdk
    [ INFO] Scanning dependencies of target i2s_play_freertos
    [ INFO] [100%] Building C object CMakeFiles/i2s_play_freertos.dir/src/main.c.obj
    [ INFO] [100%] Linking CXX executable i2s_play_freertos
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: kendryte-freertos-sdk/libkendryte-freertos-sdk.a(devices.cpp.obj): in function __static_initialization_and_destruction_0': [ INFO] E:/kendryte/demo/i2s_play_freertos_2/kendryte_libraries/kendryte-freertos-sdk/lib/freertos/kernel/devices.cpp:61: undefined reference to__dso_handle'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: kendryte-freertos-sdk/libkendryte-freertos-sdk.a(filesystem.cpp.obj): in function k_filesystem_file::flush()': [ INFO] E:/kendryte/demo/i2s_play_freertos_2/kendryte_libraries/kendryte-freertos-sdk/lib/freertos/kernel/storage/filesystem.cpp:61: undefined reference tof_sync'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: kendryte-freertos-sdk/libkendryte-freertos-sdk.a(filesystem.cpp.obj): in function k_filesystem_file::set_position(long)': [ INFO] E:/kendryte/demo/i2s_play_freertos_2/kendryte_libraries/kendryte-freertos-sdk/lib/freertos/kernel/storage/filesystem.cpp:169: undefined reference tof_lseek'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: kendryte-freertos-sdk/libkendryte-freertos-sdk.a(filesystem.cpp.obj): in function k_filesystem_file::write(gsl::span<unsigned char const, -1l>)': [ INFO] E:/kendryte/demo/i2s_play_freertos_2/kendryte_libraries/kendryte-freertos-sdk/lib/freertos/kernel/storage/filesystem.cpp:156: undefined reference tof_write'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: kendryte-freertos-sdk/libkendryte-freertos-sdk.a(filesystem.cpp.obj): in function k_filesystem_file::read(gsl::span<unsigned char, -1l>)': [ INFO] E:/kendryte/demo/i2s_play_freertos_2/kendryte_libraries/kendryte-freertos-sdk/lib/freertos/kernel/storage/filesystem.cpp:160: undefined reference tof_read'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: kendryte-freertos-sdk/libkendryte-freertos-sdk.a(filesystem.cpp.obj): in function k_filesystem_file': [ INFO] E:/kendryte/demo/i2s_play_freertos_2/kendryte_libraries/kendryte-freertos-sdk/lib/freertos/kernel/storage/filesystem.cpp:126: undefined reference tof_open'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: E:/kendryte/demo/i2s_play_freertos_2/kendryte_libraries/kendryte-freertos-sdk/lib/freertos/kernel/storage/filesystem.cpp:130: undefined reference to f_truncate' [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: E:/kendryte/demo/i2s_play_freertos_2/kendryte_libraries/kendryte-freertos-sdk/lib/freertos/kernel/storage/filesystem.cpp:132: undefined reference tof_close'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: kendryte-freertos-sdk/libkendryte-freertos-sdk.a(filesystem.cpp.obj): in function ~k_filesystem_file': [ INFO] E:/kendryte/demo/i2s_play_freertos_2/kendryte_libraries/kendryte-freertos-sdk/lib/freertos/kernel/storage/filesystem.cpp:143: undefined reference tof_close'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: kendryte-freertos-sdk/libkendryte-freertos-sdk.a(filesystem.cpp.obj): in function .LVL182': [ INFO] E:/kendryte/demo/i2s_play_freertos_2/kendryte_libraries/kendryte-freertos-sdk/lib/freertos/kernel/storage/filesystem.cpp:191: undefined reference tof_findfirst'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: kendryte-freertos-sdk/libkendryte-freertos-sdk.a(filesystem.cpp.obj): in function .LVL200': [ INFO] E:/kendryte/demo/i2s_play_freertos_2/kendryte_libraries/kendryte-freertos-sdk/lib/freertos/kernel/storage/filesystem.cpp:191: undefined reference tof_findfirst'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: kendryte-freertos-sdk/libkendryte-freertos-sdk.a(filesystem.cpp.obj): in function .L0 ': [ INFO] E:/kendryte/demo/i2s_play_freertos_2/kendryte_libraries/kendryte-freertos-sdk/lib/freertos/kernel/storage/filesystem.cpp:201: undefined reference tof_findnext'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: kendryte-freertos-sdk/libkendryte-freertos-sdk.a(filesystem.cpp.obj): in function .L0 ': [ INFO] E:/kendryte/demo/i2s_play_freertos_2/kendryte_libraries/kendryte-freertos-sdk/lib/freertos/include/kernel/driver.hpp:143: undefined reference tof_mount'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: kendryte-freertos-sdk/libkendryte-freertos-sdk.a(filesystem.cpp.obj): in function _GLOBAL__sub_I__ZN12k_filesystem12filesystems_E': [ INFO] E:/kendryte/demo/i2s_play_freertos_2/kendryte_libraries/kendryte-freertos-sdk/lib/freertos/kernel/storage/filesystem.cpp:107: undefined reference to__dso_handle'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: kendryte-freertos-sdk/libkendryte-freertos-sdk.a(registry.cpp.obj): in function __static_initialization_and_destruction_0': [ INFO] E:/kendryte/demo/i2s_play_freertos_2/kendryte_libraries/kendryte-freertos-sdk/lib/bsp/device/registry.cpp:75: undefined reference to__dso_handle'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: E:/kendryte/demo/i2s_play_freertos_2/kendryte_libraries/kendryte-freertos-sdk/lib/bsp/device/registry.cpp:140: undefined reference to __dso_handle' [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: E:/kendryte/demo/i2s_play_freertos_2/kendryte_libraries/kendryte-freertos-sdk/lib/bsp/device/registry.cpp:158: undefined reference to__dso_handle'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: kendryte-freertos-sdk/libkendryte-freertos-sdk.a(spi.cpp.obj): in function __static_initialization_and_destruction_0': [ INFO] E:/kendryte/demo/i2s_play_freertos_2/kendryte_libraries/kendryte-freertos-sdk/lib/bsp/device/spi.cpp:992: undefined reference to__dso_handle'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: kendryte-freertos-sdk/libkendryte-freertos-sdk.a(spi.cpp.obj):E:/kendryte/demo/i2s_play_freertos_2/kendryte_libraries/kendryte-freertos-sdk/lib/bsp/device/spi.cpp:993: more undefined references to __dso_handle' follow [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/lib\libc.a(lib_a-mlock.o): in function__malloc_lock':
    [ INFO] mlock.c:(.text.__malloc_lock+0x4): undefined reference to _lock_acquire_recursive' [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/lib\libc.a(lib_a-mlock.o): in function__malloc_unlock':
    [ INFO] mlock.c:(.text.__malloc_unlock+0x4): undefined reference to _lock_release_recursive' [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/lib\libc.a(lib_a-puts.o): in function.L0 ':
    [ INFO] puts.c:(.text._puts_r+0x42): undefined reference to pthread_setcancelstate' [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/lib\libc.a(lib_a-puts.o): in function.L2':
    [ INFO] puts.c:(.text._puts_r+0x60): undefined reference to _lock_acquire_recursive' [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/lib\libc.a(lib_a-puts.o): in function.L5':
    [ INFO] puts.c:(.text._puts_r+0xb0): undefined reference to _lock_release_recursive' [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: puts.c:(.text._puts_r+0xbc): undefined reference topthread_setcancelstate'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/lib\libc.a(lib_a-vfiprintf.o): in function .L13': [ INFO] vfprintf.c:(.text._vfiprintf_r+0x32): undefined reference topthread_setcancelstate'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: vfprintf.c:(.text._vfiprintf_r+0x50): undefined reference to _lock_acquire_recursive' [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/lib\libc.a(lib_a-vfiprintf.o): in function.L16':
    [ INFO] vfprintf.c:(.text._vfiprintf_r+0xa6): undefined reference to _lock_release_recursive' [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: vfprintf.c:(.text._vfiprintf_r+0xb2): undefined reference topthread_setcancelstate'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/lib\libc.a(lib_a-vfiprintf.o): in function .L17': [ INFO] vfprintf.c:(.text._vfiprintf_r+0xe6): undefined reference to_lock_release_recursive'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: vfprintf.c:(.text._vfiprintf_r+0xf2): undefined reference to pthread_setcancelstate' [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/lib\libc.a(lib_a-vfiprintf.o): in function.L128':
    [ INFO] vfprintf.c:(.text._vfiprintf_r+0x8c2): undefined reference to _lock_release_recursive' [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/lib\libc.a(lib_a-vfiprintf.o): in function.L132':
    [ INFO] vfprintf.c:(.text._vfiprintf_r+0x8ce): undefined reference to pthread_setcancelstate' [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/lib\libc.a(lib_a-vfiprintf.o): in function__sbprintf':
    [ INFO] vfprintf.c:(.text.__sbprintf+0x4e): undefined reference to _lock_init_recursive' [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: vfprintf.c:(.text.__sbprintf+0x8c): undefined reference to_lock_close_recursive'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/lib\libc.a(lib_a-vfprintf.o): in function _vfprintf_r': [ INFO] vfprintf.c:(.text._vfprintf_r+0x62): undefined reference topthread_setcancelstate'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: vfprintf.c:(.text._vfprintf_r+0x80): undefined reference to _lock_acquire_recursive' [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: vfprintf.c:(.text._vfprintf_r+0xd6): undefined reference to_lock_release_recursive'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: vfprintf.c:(.text._vfprintf_r+0xe2): undefined reference to pthread_setcancelstate' [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: vfprintf.c:(.text._vfprintf_r+0x118): undefined reference to_lock_release_recursive'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: vfprintf.c:(.text._vfprintf_r+0x124): undefined reference to pthread_setcancelstate' [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: vfprintf.c:(.text._vfprintf_r+0x6f0): undefined reference to_lock_release_recursive'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: vfprintf.c:(.text._vfprintf_r+0x6fc): undefined reference to pthread_setcancelstate' [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/lib\libc.a(lib_a-vfprintf.o): in function__sbprintf':
    [ INFO] vfprintf.c:(.text.__sbprintf+0x4e): undefined reference to _lock_init_recursive' [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: vfprintf.c:(.text.__sbprintf+0x8c): undefined reference to_lock_close_recursive'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/lib\libc.a(lib_a-__atexit.o): in function .L0 ': [ INFO] __atexit.c:(.text.__register_exitproc+0x12): undefined reference to_lock_acquire_recursive'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: __atexit.c:(.text.__register_exitproc+0x44): undefined reference to _lock_release_recursive' [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/lib\libc.a(lib_a-__atexit.o): in function.L6':
    [ INFO] __atexit.c:(.text.__register_exitproc+0x9a): undefined reference to _lock_release_recursive' [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/lib\libc.a(lib_a-__call_atexit.o): in function.L0 ':
    [ INFO] __call_atexit.c:(.text.__call_exitprocs+0x1c): undefined reference to _lock_acquire_recursive' [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: __call_atexit.c:(.text.__call_exitprocs+0x50): undefined reference to_lock_release_recursive'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/lib\libc.a(lib_a-fflush.o): in function .L47': [ INFO] fflush.c:(.text._fflush_r+0x24): undefined reference topthread_setcancelstate'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: fflush.c:(.text._fflush_r+0x42): undefined reference to _lock_acquire_recursive' [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/lib\libc.a(lib_a-fflush.o): in function.L49':
    [ INFO] fflush.c:(.text._fflush_r+0x6a): undefined reference to _lock_release_recursive' [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: fflush.c:(.text._fflush_r+0x76): undefined reference topthread_setcancelstate'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/lib\libc.a(lib_a-findfp.o): in function .L0 ': [ INFO] findfp.c:(.text.std+0x68): undefined reference to_lock_init_recursive'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/lib\libc.a(lib_a-findfp.o): in function __sfp_lock_acquire': [ INFO] findfp.c:(.text.__sfp_lock_acquire+0x4): undefined reference to_lock_acquire_recursive'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/lib\libc.a(lib_a-findfp.o): in function __sfp_lock_release': [ INFO] findfp.c:(.text.__sfp_lock_release+0x4): undefined reference to_lock_release_recursive'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/lib\libc.a(lib_a-findfp.o): in function __sinit_lock_acquire': [ INFO] findfp.c:(.text.__sinit_lock_acquire+0x4): undefined reference to_lock_acquire_recursive'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/lib\libc.a(lib_a-findfp.o): in function __sinit_lock_release': [ INFO] findfp.c:(.text.__sinit_lock_release+0x4): undefined reference to_lock_release_recursive'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/lib\libc.a(lib_a-fputwc.o): in function _fputwc_r': [ INFO] fputwc.c:(.text._fputwc_r+0x14): undefined reference topthread_setcancelstate'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: fputwc.c:(.text._fputwc_r+0x32): undefined reference to _lock_acquire_recursive' [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: fputwc.c:(.text._fputwc_r+0x7e): undefined reference to_lock_release_recursive'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: fputwc.c:(.text._fputwc_r+0x8a): undefined reference to pthread_setcancelstate' [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/lib\libc.a(lib_a-fclose.o): in function.L3':
    [ INFO] fclose.c:(.text._fclose_r+0x1e): undefined reference to pthread_setcancelstate' [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: fclose.c:(.text._fclose_r+0x3c): undefined reference to_lock_acquire_recursive'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/lib\libc.a(lib_a-fclose.o): in function .L4': [ INFO] fclose.c:(.text._fclose_r+0x56): undefined reference to_lock_release_recursive'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/lib\libc.a(lib_a-fclose.o): in function .L6': [ INFO] fclose.c:(.text._fclose_r+0x62): undefined reference topthread_setcancelstate'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/lib\libc.a(lib_a-fclose.o): in function .L11': [ INFO] fclose.c:(.text._fclose_r+0xd4): undefined reference to_lock_release_recursive'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: fclose.c:(.text._fclose_r+0xde): undefined reference to _lock_close_recursive' [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: fclose.c:(.text._fclose_r+0xee): undefined reference topthread_setcancelstate'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/lib\libc.a(lib_a-fputc.o): in function .L2': [ INFO] fputc.c:(.text._fputc_r+0x1e): undefined reference topthread_setcancelstate'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: fputc.c:(.text._fputc_r+0x3c): undefined reference to _lock_acquire_recursive' [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/lib\libc.a(lib_a-fputc.o): in function.L3':
    [ INFO] fputc.c:(.text._fputc_r+0x66): undefined reference to _lock_release_recursive' [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: fputc.c:(.text._fputc_r+0x72): undefined reference topthread_setcancelstate'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/lib\libc.a(lib_a-fputs.o): in function _fputs_r': [ INFO] fputs.c:(.text._fputs_r+0x30): undefined reference topthread_setcancelstate'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: fputs.c:(.text._fputs_r+0x4e): undefined reference to _lock_acquire_recursive' [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: fputs.c:(.text._fputs_r+0x9a): undefined reference to_lock_release_recursive'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: fputs.c:(.text._fputs_r+0xa6): undefined reference to pthread_setcancelstate' [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/lib\libc.a(lib_a-putc.o): in function.L2':
    [ INFO] putc.c:(.text._putc_r+0x1e): undefined reference to pthread_setcancelstate' [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: putc.c:(.text._putc_r+0x3c): undefined reference to_lock_acquire_recursive'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/lib\libc.a(lib_a-putc.o): in function .L6': [ INFO] putc.c:(.text._putc_r+0x86): undefined reference to_lock_release_recursive'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/lib\libc.a(lib_a-putc.o): in function .L7': [ INFO] putc.c:(.text._putc_r+0x92): undefined reference topthread_setcancelstate'
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: i2s_play_freertos: hidden symbol `__dso_handle' isn't defined
    [ INFO] e:/kendryte/kendryteide/localpackage/toolchain/bin/../lib/gcc/riscv64-unknown-elf/8.2.0/../../../../riscv64-unknown-elf/bin/ld.exe: final link failed: bad value
    [ INFO] collect2.exe: error: ld returned 1 exit status
    [ INFO] mingw32-make.exe[2]: *** [CMakeFiles/i2s_play_freertos.dir/build.make:84: i2s_play_freertos] Error 1
    [ INFO] mingw32-make.exe[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/i2s_play_freertos.dir/all] Error 2
    [ INFO] mingw32-make.exe: *** [Makefile:84: all] Error 2
    [ INFO]
    [ INFO] Build Error: E:/kendryte/KendryteIDE/LocalPackage/cmake/bin/cmake.exe exited with code 2.

    [ERROR] Build failed.



  • 在W10下用IDE的怎么操作 所有的例程都是差不多类似的报错,没有一个能正常编译,下载的。很急!


  • Global Moderator |  Mod

    你好,看起来是编译链接有问题,某些源文件没有编译进去。 请检查一下:

    1. 下载最新代码和编译器;
    2. kendryte-freertos-sdk/src# cp -rf ../../kendryte-freertos-demo/i2s_play/ .
    3. kendryte-freertos-sdk# mkdir build
    4. 进入到build目录进行cmake和编译
      谢谢!