0

I am trying to build the code that is already made as examples for the Micro:bit using the recommended yotta build but after following every step I am getting this error:

    yotta build
    info: generate for target: bbc-microbit-classic-gcc 0.2.3 at /home/dragos/microbit-samples/yotta_targets/bbc-microbit-classic-gcc
CMake Deprecation Warning at CMakeLists.txt:16 (cmake_policy):
    The OLD behavior for policy CMP0017 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


CMake Deprecation Warning at /usr/share/cmake-3.16/Modules/CMakeForceCompiler.cmake:75 (message):
  The CMAKE_FORCE_C_COMPILER macro is deprecated.  Instead just set
  CMAKE_C_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
  /home/dragos/microbit-samples/yotta_targets/mbed-gcc/CMake/toolchain.cmake:78 (cmake_force_c_compiler)
  toolchain.cmake:8 (include)
  CMakeFiles/3.16.3/CMakeSystem.cmake:6 (include)
  CMakeLists.txt:76 (project)


CMake Deprecation Warning at /usr/share/cmake-3.16/Modules/CMakeForceCompiler.cmake:89 (message):
  The CMAKE_FORCE_CXX_COMPILER macro is deprecated.  Instead just set
  CMAKE_CXX_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
  /home/dragos/microbit-samples/yotta_targets/mbed-gcc/CMake/toolchain.cmake:79 (cmake_force_cxx_compiler)
  toolchain.cmake:8 (include)
  CMakeFiles/3.16.3/CMakeSystem.cmake:6 (include)
  CMakeLists.txt:76 (project)

I have to specify that I did not change any code from the initial git: lancaster-university / microbit-samples and I have done the update on my system several times. Also, I am running it on Ubuntu 20.04.1 LTS

  • What is the question? You want to get rid of the warnings (for whatever reason)? Then fix the `CMakeLists.txt` file(s) or downgrade cmake. – Artefacto Dec 16 '20 at 14:46
  • Because of all these warnings it does not build the .hex file that is supposed to be transferred on the microbit – Bogdan Dragos Dec 16 '20 at 14:54
  • Try downgrading cmake. Open `CMakeLists.txt`, check the minimum required version (should be on the top) and install that version. – Artefacto Dec 16 '20 at 14:55
  • Fixed by deleting the Cmake entirely, and installing it again, thank you – Bogdan Dragos Dec 16 '20 at 16:42

0 Answers0