mbed客户端构建错误

时间:2017-02-17 11:40:18

标签: arm mbed

我正在尝试在Windows机器上为K64F板编译mbed客户端示例。我已按照指南https://github.com/ARMmbed/mbed-client-quickstart中所述安装了所有必需的软件。

我运行的命令是以下命令:

git clone https://github.com/ARMmbed/mbed-client-quickstart
cd mbed-client-quickstart
yotta target frdm-k64f-gcc
yotta build

我收到此编译错误:

info: get versions for mbed-client
info: download mbed-client@1.18.3 from the public module registry
info: get versions for mbed-trace
info: download mbed-trace@1.2.1 from the public module registry
info: get versions for mbed-client-c
info: download mbed-client-c@3.0.3 from the public module registry
info: get versions for mbed-client-mbed-os
info: download mbed-client-mbed-os@3.0.3 from the public module registry
info: get versions for mbed-client-mbedtls
info: download mbed-client-mbedtls@3.0.3 from the public module registry
info: get versions for nanostack-libservice
info: download nanostack-libservice@3.6.0 from the public module registry
info: get versions for mbed-drivers
                                             info: download mbed-drivers@1.5.0 from the public module registry
info: get versions for sockets
info: download sockets@1.3.0 from the public module registry
info: get versions for mbed-hal
info: download mbed-hal@1.3.0 from the public module registry
info: get versions for cmsis-core
info: download cmsis-core@1.2.0 from the public module registry
info: get versions for ualloc
info: download ualloc@1.3.0 from the public module registry
info: get versions for minar
info: download minar@1.3.0 from the public module registry
info: get versions for core-util
info: download core-util@1.8.0 from the public module registry
info: get versions for compiler-polyfill
info: download compiler-polyfill@1.3.0 from the public module registry
info: get versions for greentea-client
info: download greentea-client@1.1.0 from the public module registry
info: get versions for mbed-hal-freescale
info: download mbed-hal-freescale@1.1.0 from the public module registry
info: get versions for mbed-hal-ksdk-mcu
info: download mbed-hal-ksdk-mcu@1.3.0 from the public module registry
info: get versions for uvisor-lib
info: download uvisor-lib@2.1.2 from the public module registry
info: get versions for mbed-hal-k64f
info: download mbed-hal-k64f@1.3.0 from the public module registry
info: get versions for cmsis-core-freescale
info: download cmsis-core-freescale@1.1.0 from the public module registry
info: get versions for cmsis-core-k64f
info: download cmsis-core-k64f@1.1.0 from the public module registry
info: get versions for mbed-hal-frdm-k64f
info: download mbed-hal-frdm-k64f@1.1.1 from the public module registry
info: get versions for dlmalloc
info: download dlmalloc@1.1.0 from the public module registry
info: get versions for minar-platform
info: download minar-platform@1.1.0 from the public module registry
info: get versions for minar-platform-mbed
info: download minar-platform-mbed@1.3.0 from the public module registry
info: get versions for sal
info: download sal@1.3.1 from the public module registry
info: get versions for sal-stack-lwip
info: download sal-stack-lwip@1.4.1 from the public module registry
info: get versions for sal-driver-lwip-k64f-eth
info: download sal-driver-lwip-k64f-eth@1.1.0 from the public module registry
info: get versions for sal-iface-eth
info: download sal-iface-eth@1.1.0 from the public module registry
info: get versions for mbedtls
info: download mbedtls@2.3.2 from the public module registry
info: generate for target: frdm-k64f-gcc 2.0.0 at mbed-client-quickstart\yotta_targets\frdm-k64f-gcc
-- The C compiler identification is GNU 6.2.1
-- The CXX compiler identification is GNU 6.2.1
-- Check for working C compiler: C:/Program Files (x86)/GNU Tools ARM Embedded/6.2 2016q4/bin/arm-none-eabi-gcc.exe
-- Check for working C compiler: C:/Program Files (x86)/GNU Tools ARM Embedded/6.2 2016q4/bin/arm-none-eabi-gcc.exe -- broken
CMake Error at C:/Program Files/CMake/share/cmake-3.8/Modules/CMakeTestCCompiler.cmake:51 (message):
  The C compiler "C:/Program Files (x86)/GNU Tools ARM Embedded/6.2
  2016q4/bin/arm-none-eabi-gcc.exe" is not able to compile a simple test
  program.

  It fails with the following output:

   Change Dir: mbed-client-quickstart/build/frdm-k64f-gcc/CMakeFiles/CMakeTmp



  Run Build Command:"C:/ninja/ninja.exe" "cmTC_60fb0"

  [1/2] Building C object CMakeFiles/cmTC_60fb0.dir/testCCompiler.c.o

  [2/2] Linking C executable cmTC_60fb0

  FAILED: cmd.exe /C "cd .  &&
  C:\PROGRA~2\GNUTOO~1\6E275~1.220\bin\AR19DD~1.EXE -fno-exceptions
  -fno-unwind-tables -Wl,--gc-sections -Wl,--sort-common
  -Wl,--sort-section=alignment -Wl,-wrap,main -Wl,-u,_printf_float
  -mcpu=cortex-m4 -mthumb
  -T"mbed-client-quickstart/yotta_targets/kinetis-k64-gcc/CMake/../ld/K64FN1M0xxx12.ld"
  -Wl,-Map,cmTC_60fb0.map -Wl,--start-group
  CMakeFiles/cmTC_60fb0.dir/testCCompiler.c.o -lm -lc -lgcc -lm -lc -lgcc
  -Wl,--end-group --specs=nano.specs -o cmTC_60fb0 && cd ."


  c:/progra~2/gnutoo~1/6e275~1.220/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/bin/ld.exe:
  warning: cannot find entry symbol Reset_Handler; defaulting to 00000410


  c:/progra~2/gnutoo~1/6e275~1.220/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/lib/thumb/v7e-m\libc_nano.a(lib_a-sbrkr.o):
  In function `_sbrk_r':

  sbrkr.c:(.text._sbrk_r+0xc): undefined reference to `_sbrk'

  collect2.exe: error: ld returned 1 exit status

  ninja: build stopped: subcommand failed.





  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:150 (project)


-- Configuring incomplete, errors occurred!
See also "mbed-client-quickstart/build/frdm-k64f-gcc/CMakeFiles/CMakeOutput.log".
See also "mbed-client-quickstart/build/frdm-k64f-gcc/CMakeFiles/CMakeError.log".
error: command ['cmake', '-D', 'CMAKE_BUILD_TYPE=RelWithDebInfo', '-G', 'Ninja', '.'] failed

我做错了什么?

1 个答案:

答案 0 :(得分:2)

这是基于mbed OS 3的旧示例代码。请改用the example for mbed OS 5

相关问题