20200227下载的SDK使用GCC ble_simple_peripheral编译不过,其他project可以编译通过



  • C:\Users\zhong\Desktop\work\FREQCHIP-SDK\0227-sdk\FR801xH-SDK\examples\dev1.0\ble_simple_peripheral\gcc>make clean
    rm -rf build

    C:\Users\zhong\Desktop\work\FREQCHIP-SDK\0227-sdk\FR801xH-SDK\examples\dev1.0\ble_simple_peripheral\gcc>make
    mkdir build
    cd build && mkdir ble_simple_peripheral
    Compiling: ../code/proj_main.c
    Compiling: ../code/ble_simple_peripheral.c
    Compiling: ../code/user_task.c
    Compiling: ../../../../components/modules/button/button.c
    Compiling: ../../../../components/ble/profiles/ble_audio_profile/speaker_service.c
    Compiling: ../../../../components/ble/profiles/ble_simple_profile/simple_gatt_service.c
    Compiling: ../../../../components/modules/peripherals/oled/lcd.c
    Compiling: ../../../../components/modules/peripherals/audio/speaker.c
    Compiling: ../../../../components/modules/adpcm_ms/adpcm_ms.c
    Compiling: ../../../../components/modules/decoder/decoder.c
    Compiling: ../../../../components/modules/peripherals/sht3x_temp_humi/sht3x.c
    Compiling: ../../../../components/modules/peripherals/sht3x_temp_humi/sht3x_sw_i2c.c
    Compiling: ../../../../components/modules/peripherals/sht3x_temp_humi/sht3x_common.c
    Compiling: ../../../../components/modules/peripherals/sht3x_temp_humi/sht3x_sw_i2c_implementation.c
    Compiling: ../../../../components/modules/peripherals/capb18_air_pressure/capb18-001.c
    Compiling: ../../../../components/modules/peripherals/gyro/gyro_driver.c
    Compiling: ../../../../components/driver/driver_iic.c
    Compiling: ../../../../components/driver/driver_pmu.c
    Compiling: ../../../../components/driver/driver_keyscan.c
    Compiling: ../../../../components/driver/driver_pmu_qdec.c
    Compiling: ../../../../components/driver/driver_rtc.c
    Compiling: ../../../../components/driver/driver_uart.c
    Compiling: ../../../../components/driver/driver_wdt.c
    Compiling: ../../../../components/driver/driver_i2s.c
    Compiling: ../../../../components/driver/driver_ssp.c
    Compiling: ../../../../components/driver/driver_codec.c
    Compiling: ../../../../components/driver/driver_exti.c
    Compiling: ../../../../components/driver/driver_timer.c
    Compiling: ../../../../components/modules/platform/source/exception_handlers.c
    Compiling: ../../../../components/modules/platform/source/app_boot_vectors.c
    Compiling: ../../../../components/modules/patch/patch.c
    c:/program files (x86)/gnu tools arm embedded/6.2 2016q4/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/bin/ld.exe: cannot find -lgyro_alg
    collect2.exe: error: ld returned 1 exit status
    make: *** [../../../../components/toolchain/gcc/Makefile.common:156: build/ble_simple_peripheral.out] Error 1

    C:\Users\zhong\Desktop\work\FREQCHIP-SDK\0227-sdk\FR801xH-SDK\examples\dev1.0\ble_simple_peripheral\gcc>pause
    请按任意键继续. . .

    修改MAKEFILE对应的 -lgyro_alg 为 -gyro_alg 还是编译不过
    C:\Users\zhong\Desktop\work\FREQCHIP-SDK\0227-sdk\FR801xH-SDK\examples\dev1.0\ble_simple_peripheral\gcc>make
    mkdir build
    cd build && mkdir ble_simple_peripheral
    Compiling: ../code/proj_main.c
    Compiling: ../code/ble_simple_peripheral.c
    Compiling: ../code/user_task.c
    Compiling: ../../../../components/modules/button/button.c
    Compiling: ../../../../components/ble/profiles/ble_audio_profile/speaker_service.c
    Compiling: ../../../../components/ble/profiles/ble_simple_profile/simple_gatt_service.c
    Compiling: ../../../../components/modules/peripherals/oled/lcd.c
    Compiling: ../../../../components/modules/peripherals/audio/speaker.c
    Compiling: ../../../../components/modules/adpcm_ms/adpcm_ms.c
    Compiling: ../../../../components/modules/decoder/decoder.c
    Compiling: ../../../../components/modules/peripherals/sht3x_temp_humi/sht3x.c
    Compiling: ../../../../components/modules/peripherals/sht3x_temp_humi/sht3x_sw_i2c.c
    Compiling: ../../../../components/modules/peripherals/sht3x_temp_humi/sht3x_common.c
    Compiling: ../../../../components/modules/peripherals/sht3x_temp_humi/sht3x_sw_i2c_implementation.c
    Compiling: ../../../../components/modules/peripherals/capb18_air_pressure/capb18-001.c
    Compiling: ../../../../components/modules/peripherals/gyro/gyro_driver.c
    Compiling: ../../../../components/driver/driver_iic.c
    Compiling: ../../../../components/driver/driver_pmu.c
    Compiling: ../../../../components/driver/driver_keyscan.c
    Compiling: ../../../../components/driver/driver_pmu_qdec.c
    Compiling: ../../../../components/driver/driver_rtc.c
    Compiling: ../../../../components/driver/driver_uart.c
    Compiling: ../../../../components/driver/driver_wdt.c
    Compiling: ../../../../components/driver/driver_i2s.c
    Compiling: ../../../../components/driver/driver_ssp.c
    Compiling: ../../../../components/driver/driver_codec.c
    Compiling: ../../../../components/driver/driver_exti.c
    Compiling: ../../../../components/driver/driver_timer.c
    Compiling: ../../../../components/modules/platform/source/exception_handlers.c
    Compiling: ../../../../components/modules/platform/source/app_boot_vectors.c
    Compiling: ../../../../components/modules/patch/patch.c
    build/ble_simple_peripheral/ble_simple_peripheral.c.o: In function timer_refresh_fun': C:\Users\zhong\Desktop\work\FREQCHIP-SDK\0227-sdk\FR801xH-SDK\examples\dev1.0\ble_simple_peripheral\gcc/../code/ble_simple_peripheral.c:290: undefined reference toget_skip_num'
    C:\Users\zhong\Desktop\work\FREQCHIP-SDK\0227-sdk\FR801xH-SDK\examples\dev1.0\ble_simple_peripheral\gcc/../code/ble_simple_peripheral.c:291: undefined reference to get_skip_num' build/ble_simple_peripheral/gyro_driver.c.o: In functiongyroscope_timer_loop':
    C:\Users\zhong\Desktop\work\FREQCHIP-SDK\0227-sdk\FR801xH-SDK\examples\dev1.0\ble_simple_peripheral\gcc/../../../../components/modules/peripherals/gyro/gyro_driver.c:48: undefined reference to gyroscope_loop' build/ble_simple_peripheral/gyro_driver.c.o: In functiongyro_dev_init':
    C:\Users\zhong\Desktop\work\FREQCHIP-SDK\0227-sdk\FR801xH-SDK\examples\dev1.0\ble_simple_peripheral\gcc/../../../../components/modules/peripherals/gyro/gyro_driver.c:143: undefined reference to gyroscope_init' c:/program files (x86)/gnu tools arm embedded/6.2 2016q4/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v7-m\libg.a(lib_a-sbrkr.o): In function_sbrk_r':
    sbrkr.c:(.text._sbrk_r+0xc): undefined reference to _sbrk' c:/program files (x86)/gnu tools arm embedded/6.2 2016q4/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v7-m\libg.a(lib_a-writer.o): In function_write_r':
    writer.c:(.text._write_r+0x12): undefined reference to _write' c:/program files (x86)/gnu tools arm embedded/6.2 2016q4/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v7-m\libg.a(lib_a-closer.o): In function_close_r':
    closer.c:(.text._close_r+0xc): undefined reference to _close' c:/program files (x86)/gnu tools arm embedded/6.2 2016q4/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v7-m\libg.a(lib_a-lseekr.o): In function_lseek_r':
    lseekr.c:(.text._lseek_r+0x12): undefined reference to _lseek' c:/program files (x86)/gnu tools arm embedded/6.2 2016q4/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v7-m\libg.a(lib_a-readr.o): In function_read_r':
    readr.c:(.text._read_r+0x12): undefined reference to _read' c:/program files (x86)/gnu tools arm embedded/6.2 2016q4/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v7-m\libg.a(lib_a-fstatr.o): In function_fstat_r':
    fstatr.c:(.text._fstat_r+0x10): undefined reference to _fstat' c:/program files (x86)/gnu tools arm embedded/6.2 2016q4/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v7-m\libg.a(lib_a-isattyr.o): In function_isatty_r':
    isattyr.c:(.text._isatty_r+0xc): undefined reference to `_isatty'
    collect2.exe: error: ld returned 1 exit status
    make: *** [../../../../components/toolchain/gcc/Makefile.common:156: build/ble_simple_peripheral.out] Error 1

    C:\Users\zhong\Desktop\work\FREQCHIP-SDK\0227-sdk\FR801xH-SDK\examples\dev1.0\ble_simple_peripheral\gcc>pause
    请按任意键继续. . .



  • 可能跟你的KEIL版本有关系



  • 你好,我用的是GNU ARM GCC,你们推荐的 6.2 版本,不是KEIL



  • 当前我再使用 dev1.0/ble_multi_role 工程做开发,这个工程是没问题的。 但我看好像只有ble_simple_peripheral支持开发板所有的 外设功能,使用GCC编译不过,也可能你们没有提供GCC的lib



  • 你好,这个工程会用到一个库文件,这个库文件目前只有keil版本,gcc版本还没有release。所以暂时编译不过