This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Build bootloader for mesh

I am trying to build the mesh-bootloader and the cmake build system throws some error, could You have a look at my comandline options, or say what is going wrong.

I am using the cmake to generate the makefiles, this works well. But I didn't find a complete command line call in the documetation to build the bootloader, here is that one which I try with:

>cmake BUILD_BOOTLOADER -DTOOLCHAIN=gccarmemb -DCMAKE_BUILD_TYPE=MinSizeRel .. 

I get the following error:

D:\Work\BLE\TimerAufsatz_BLtest\build>cmake BUILD_BOOTLOADER -DTOOLCHAIN=gccarme
mb -DCMAKE_BUILD_TYPE=MinSizeRel ..
-- Building for: Visual Studio 14 2015
-- Configuring CMake for nRF5 SDK for Bluetooth Mesh 1.0.1
-- Found PythonInterp: C:/Python27/python.exe (found version "2.7.8")
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- SDK_ROOT=D:/Work/BLE/TimerAufsatz_BLtest/external/nRF5_SDK_14.2.0_17b948a ---
 set with default PATH
-- Platform: nrf52832_xxAA
-- Arch: cortex-m4f
-- Extracting SoftDevice s132_5.0.0...
-- SoftDevice: s132_5.0.0
-- Board: AUFSATZTASTE
-- PC-Lint executable not found. Linting disabled.
-- The C compiler identification is unknown
-- The ASM compiler identification is GNU
-- Found assembler: arm-none-eabi-gcc
CMake Error at CMakeLists.txt:52 (enable_language):
  The CMAKE_C_COMPILER:

    arm-none-eabi-gcc

  is not a full path and was not found in the PATH.



CMake Error at CMakeLists.txt:52 (enable_language):
  The CMAKE_ASM_COMPILER:

    arm-none-eabi-gcc

  is not a full path and was not found in the PATH.



-- Configuring incomplete, errors occurred!
See also "D:/Work/BLE/TimerAufsatz_BLtest/build/CMakeFiles/CMakeOutput.log".
See also "D:/Work/BLE/TimerAufsatz_BLtest/build/CMakeFiles/CMakeError.log".

Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: arm-none-eabi-gcc 
Build flags: 
Id flags:  

The output was:
1
Microsoft (R)-Buildmodul, Version 14.0.25420.1
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

Der Buildvorgang wurde am 03.04.2018 07:46:09 gestartet.
Projekt "D:\Work\BLE\TimerAufsatz_BLtest\build\CMakeFiles\3.10.1\CompilerIdC\CompilerIdC.vcxproj" auf Knoten "1" (Standardziele).
PrepareForBuild:
  Das Verzeichnis "Debug\" wird erstellt.
  Das Verzeichnis "Debug\CompilerIdC.tlog\" wird erstellt.
InitializeBuildStatus:
  "Debug\CompilerIdC.tlog\unsuccessfulbuild" wird erstellt, da "AlwaysCreate" angegeben wurde.
ClCompile:
  CL.exe /c /nologo /W0 /WX- /Od /Oy- /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\vc140.pdb" /Gd /TC /analyze- /errorReport:queue CMakeCCompilerId.c
  TRACKER : Fehler TRK0005: Fehler beim Suchen von "CL.exe". Das System kann die angegebene Datei nicht finden.
  
  
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(356,5): error MSB6006: "CL.exe" wurde mit dem Code 5 beendet. [D:\Work\BLE\TimerAufsatz_BLtest\build\CMakeFiles\3.10.1\CompilerIdC\CompilerIdC.vcxproj]
Die Erstellung des Projekts "D:\Work\BLE\TimerAufsatz_BLtest\build\CMakeFiles\3.10.1\CompilerIdC\CompilerIdC.vcxproj" ist abgeschlossen (Standardziele) -- FEHLER.

Fehler beim Buildvorgang.

"D:\Work\BLE\TimerAufsatz_BLtest\build\CMakeFiles\3.10.1\CompilerIdC\CompilerIdC.vcxproj" (Standardziel) (1) ->
(ClCompile Ziel) -> 
  C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(356,5): error MSB6006: "CL.exe" wurde mit dem Code 5 beendet. [D:\Work\BLE\TimerAufsatz_BLtest\build\CMakeFiles\3.10.1\CompilerIdC\CompilerIdC.vcxproj]

    0 Warnung(en)
    1 Fehler

Verstrichene Zeit 00:00:00.42


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: arm-none-eabi-gcc 
Build flags: 
Id flags:  

The output was:
1
Microsoft (R)-Buildmodul, Version 14.0.25420.1
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

Der Buildvorgang wurde am 03.04.2018 07:46:10 gestartet.
Projekt "D:\Work\BLE\TimerAufsatz_BLtest\build\CMakeFiles\3.10.1\CompilerIdC\CompilerIdC.vcxproj" auf Knoten "1" (Standardziele).
PrepareForBuild:
  Das Verzeichnis "Debug\" wird erstellt.
  Das Verzeichnis "Debug\CompilerIdC.tlog\" wird erstellt.
InitializeBuildStatus:
  "Debug\CompilerIdC.tlog\unsuccessfulbuild" wird erstellt, da "AlwaysCreate" angegeben wurde.
ClCompile:
  CL.exe /c /nologo /W0 /WX- /Od /Oy- /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\vc140.pdb" /Gd /TC /analyze- /errorReport:queue CMakeCCompilerId.c
  TRACKER : Fehler TRK0005: Fehler beim Suchen von "CL.exe". Das System kann die angegebene Datei nicht finden.
  
  
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(356,5): error MSB6006: "CL.exe" wurde mit dem Code 5 beendet. [D:\Work\BLE\TimerAufsatz_BLtest\build\CMakeFiles\3.10.1\CompilerIdC\CompilerIdC.vcxproj]
Die Erstellung des Projekts "D:\Work\BLE\TimerAufsatz_BLtest\build\CMakeFiles\3.10.1\CompilerIdC\CompilerIdC.vcxproj" ist abgeschlossen (Standardziele) -- FEHLER.

Fehler beim Buildvorgang.

"D:\Work\BLE\TimerAufsatz_BLtest\build\CMakeFiles\3.10.1\CompilerIdC\CompilerIdC.vcxproj" (Standardziel) (1) ->
(ClCompile Ziel) -> 
  C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(356,5): error MSB6006: "CL.exe" wurde mit dem Code 5 beendet. [D:\Work\BLE\TimerAufsatz_BLtest\build\CMakeFiles\3.10.1\CompilerIdC\CompilerIdC.vcxproj]

    0 Warnung(en)
    1 Fehler

Verstrichene Zeit 00:00:00.44


Checking whether the C compiler is IAR using "" did not match "IAR .+ Compiler":
arm-none-eabi-gcc: fatal error: no input files
compilation terminated.
Checking whether the C compiler is IAR using "" did not match "IAR .+ Compiler":
arm-none-eabi-gcc: fatal error: no input files
compilation terminated.

The target system is: Generic -  - ARM
The host system is: Windows - 6.1.7601 - AMD64
Checking whether the ASM compiler is GNU using "--version" matched "(GNU assembler)|(GCC)|(Free Software Foundation)":
arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 7-2017-q4-major) 7.2.1 20170904 (release) [ARM/embedded-7-branch revision 255204]
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

what I am doing wrong?

Parents Reply Children
  • The compiler is already in the path variable, I can call it from whereever in the system:

    Path=C:\ProgramData\Oracle\Java\javapath;C:\Python27\;C:\Python27\Scripts;C:\Win
    AVR-20100110\bin;C:\WinAVR-20100110\utils\bin;C:\Program Files (x86)\AMD APP\bin
    \x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Windows\system32;C:\Windows;C:
    \Windows\System32\Wbem;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Stat
    ic;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\
    Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\D
    TS\Binn\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\IVI Foundation\VISA\W
    in64\Bin\;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin\;C:\Program Files
     (x86)\IVI Foundation\IVI\bin;C:\Program Files\IVI Foundation\IVI\bin;C:\Program
     Files (x86)\Graphviz 2.28\bin;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Wi
    ndows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NTP\bin;C:\Program
     Files (x86)\WinSCP\;C:\Windows\system32\config\systemprofile\.dnx\bin;C:\Progra
    m Files\Microsoft DNX\Dnvm\;C:\Program Files (x86)\Windows Kits\8.1\Windows Perf
    ormance Toolkit\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Window
    s\System32\WindowsPowerShell\v1.0\;C:\Windows\Microsoft.NET\Framework\v4.0.30319
    \;C:\Program Files\CMake\bin;C:\ninja\;C:\Program Files (x86)\Nordic Semiconduct
    or\nrf5x\bin\;C:\Users\groll\AppData\Local\Programs\Python\Python36-32\Scripts\;
    C:\Users\groll\AppData\Local\Programs\Python\Python36-32\;C:\Program Files (x86)
    \GNU Tools ARM Embedded\7 2017-q4-major\bin;C:\Users\groll\AppData\Roaming\Pytho
    n\Scripts;C:\iSYSTEM\winIDEAOpen\gcc\arm\bin;C:\Program Files (x86)\GNU Tools AR
    M Embedded\Build Tools\2.10-20180103-1919\bin

    this was the first thing I've been lokking for. Is the call to cmake ok "cmake BUILD_BOOTLOADER -DTOOLCHAIN=gccarmemb -DCMAKE_BUILD_TYPE=MinSizeRel .." ?

  • Have you taken a look at these two links (link 1, link 2)? I am unsure exactly how to build the bootloader with cmake, but you could easily build the relevant segger embedded studio projects by making a build folder right under the mesh source folder (i.e. mesh_sdk_v1.0.1/build) & from there running the commands found either in link 2 or in this link. Then, you can easily build the bootloader in segger embedded studio if you want.

    If you want to only use cmake, you should be able to follow the second link I posted to get that working. Good luck!

Related