Building micropython in stm32 port in windows - build

I am currently trying to build a MicroPython application on Windows 10 using the Atollic TrueSTUDIO IDE for a NUCLEO-H743ZI development board.
I get the following error.
c:/program files (x86)/gnu tools arm embedded/9 2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/thumb/v7e-m+dp/hard/libgcc.a
c:\Program Files (x86)\GNU Tools Arm Embedded\9 2019-q4-major\bin\arm-none-eabi-ld.exe: cannot find build-NUCLEO_H743ZI/lib/mbedtls/library/ssl_: No such file or directory
make: *** [Makefile:614: build-NUCLEO_H743ZI/firmware.elf] Error 1

It was command line length problem. I shortened the length of the command and so I was able to build it.
[Reference]https://github.com/micropython/micropython/issues/6031
Thanks for your comments

Related

CMake generation on a Linux remote machine from VS19 does not work

I am trying to generate a CMake project from Visual Studio 2019 to compile on a Linux remote machine. I defined the remote machine at the CMakeSettings.json. The CMake generation is going well, but just right when it is finished it rises the following error:
Extracted includes paths.
Extracted CMake variables.
Extracted source files and headers.
**Error: CMake file API parsing response files failed.**
I'm running the Visual Studio from my Windows 10 computer.
The odd thing is that when I am trying to generate the same project from another Windows 7 computer the CMake generation finishes fine.
Any Ideas?
The error you are seeing is similar to the errors mentioned in a Visual Studio 2019 bug here, related to CMake cache:
“The cache for the current configuration could not be opened. See the
Error List for details.”
[...]
1> CMake generation started for configuration: ‘MakeWin’.
1> Error: CMake file API response index file not found
This was reported in VS 2019 Version 16.0.
Microsoft released a fix for this issue, I believe in Version 16.2.1. If you upgrade your VS 2019 to the latest version, it may resolve the error you are seeing.

CXX and C Compiler identification is unknown [duplicate]

We are having trouble compiling a project using CMake (v2.8.12) under Windows 7 64Bit using Visual Studio 2012. CMake gives us the following errors. We already tried starting Cmake from the Visual Studio Command Line using admin rights. There seems to have been a similar bug in CMake 2.8.11: http://www.cmake.org/Bug/view.php?id=14440
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:446 (execute_process):
execute_process given COMMAND argument with no value.
Call Stack (most recent call first):
C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:48 (CMAKE_DETERMINE_COMPILER_ID_VENDOR)
C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake:131 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:2 (project)
The C compiler identification is unknown
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:446 (execute_process):
execute_process given COMMAND argument with no value.
Call Stack (most recent call first):
C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:48 (CMAKE_DETERMINE_COMPILER_ID_VENDOR)
C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake:127 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:2 (project)
The CXX compiler identification is unknown
Could NOT find SWIG (missing: SWIG_EXECUTABLE SWIG_DIR)
CMake Warning at src/CMakeLists.txt:44 (message):
SWIG was not found. You will not be able to compile for C#.
Configuring incomplete, errors occurred!
See also "C:/Users/hci/laser_control/CMakeFiles/CMakeOutput.log".
See also "C:/Users/hci/laser_control/CMakeFiles/CMakeError.log".
I had the same issue and fixed it running cmake as Admin
Those error messages
The C compiler identification is unknown
The CXX compiler identification is unknown
means CMake did find or assume a compiler but it wasn't able to compile a simple test program.
Take a look at CMakeFiles\CMakeError.log and check the error message there to see:
which compiler path/command line CMake did use
what the error message calling the compiler was
e.g. LINK : fatal error LNK1181: cannot open input file 'kernel32.lib'
If you add --debug-trycompile to the cmake call CMake will even keep the files it has tried to test compile (so you can copy/paste/re-run the command line from the error log in your cmd shell).
The last time I had this problem ...
The last time I had this problem was when my Visual Studio 2012 Professional standard installation did not install any Windows SDK (the error log was showing an missing SDK header).
To verify your SDK installation e.g. check that you have any Resource Compiler installed. It should be in a path similar to:
C:\Program Files (x86)\Microsoft SDKs\Windows\v[some version]\bin\RC.Exe
Since I was missing this - or more accurate any SDK - I installed Windows 8.1 SDK (since Visual Studio 2012 does target Windows 8.x) and voila my CMake was able again to compile the (test) programs.
Reference
Does Visual Studio 2012 include the full Windows SDK
CMake Error at CMakeLists.txt:30 (project): No CMAKE_C_COMPILER could be found
I was getting the terminal output:
The C compiler identification is unknown
The CXX compiler identification is unknown
I checked the CMakeError.log output:
\build\CMakeFiles\CMakeError.log
It showed the error:
warning MSB8003: The WindowsSDKDir property is not defined. Some build tools may not be found.
Going back to visual Studio I needed to install the Windows 10 SDK:
After installing the SDK and running cmake it showed:
Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.18363.
The C compiler identification is MSVC 19.28.29334.0
The CXX compiler identification is MSVC 19.28.29334.0
And built successfully!
I had similar problem also, if you are using Microsoft Visual Studio 2012, that might be because of update of KB2781514 is missing.
After I installed following update, CMake start to detect Visual Studio 2012 c/c++ compilers correctly.
http://www.microsoft.com/en-us/download/details.aspx?id=36020
I faced the same problem. Building and running a project from Visual Studio didn't work for me. However following worked for me:
Open command prompt for developers from Visual Studio tools.
Goto the directory where cmake.exe is present.
Run it.
Lets hope it works for you as well.
For some reason, deleting the build folder in my machine, solved the issue.
cmake:
The cmake assume that you set g++ compiler path accurately.In case due any reason if it did't find compiler path{/usr/bin/g++} then it throw an error like:
**The CXX compiler identification is unknown**
So given step will short out this error:
Locate your compiler CXX path{for g++ path under Linux is :/usr/bin/g++}
Set the Compiler Path and export it configuration: PATH=/usr/bin:$PATH;export PATH
Export compiler like : export CXX=/usr/bin/g++-7
Here we assume that g++,cmake,build-essential install in your Linux system...!!
Same problem here with cmake 2.8.12 and visual studio 10. Cmake may not be able to find the compiler. I solved the problem by uninstalling latest version and installed cmake 2.8.10.
I just encounter with this issue, after I uninstalled some MS software.
I fixed it by repair visual studio 2012.
First go to [Control panel], then select visual studio and repair it,things will go right now.
Make sure you select the proper version of visual Studio.
For example, Visual Studio 2012 is version 11.
I had the same problem and I had to use the "File -> Delete Cache", since I accidentally configured CMake to use wrong visual studio version.
If you use CMake 3.4.0, try upgrading to a newer version. A bug concerning this was fixed relatively recently (see the bug report).
Make sure that you have installed Clang tools
open tools -> Get tools and features, select individual components, search cmake, then uninstall cmake and then re-install cmake, when complete, restart your computer.
I was seeing this on ubuntu - issue was cmake was assuming clang++ as c compiler.
CMake Error at /usr/share/cmake-3.10/Modules/CMakeTestCCompiler.cmake:52 (message):
The C compiler
"/usr/bin/clang++-9"
To fix it, export C, C++ compiler paths:
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++

Qt Windows x64 build succeeds in IDE but not on the command line

I have a Qt project I'm trying to automate. On Windows I build for both 32-bit and 64-bit platforms. I am using Visual Studio 2013. I have the following Qt Kits installed: Desktop Qt 5.5.1 MSVC2013 32bit, and Desktop Qt 5.5.1 MSVC2013 64bit. All four versions (32-bit debug and release, and 64-bit debug and release) can be built and run without any trouble from the IDE. Unfortunately, building from the command line fails with this error:
fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
My command-line system, intended for eventual use in a batch file, and run in my project directory, is:
pushd Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin
call vcvars32.bat
popd
md build64
cd build64
G:\Qt\5.5\msvc2013_64\bin\qmake.exe -spec win32-msvc2013 -o Makefile ..\Maps.pro
G:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile.Release
I use this command in a command window (after setting up the path using vcvars32 so that the Visual Studio tools like nmake, rc and link can be found) and get the error. Note that the command-line method works perfectly for my 32-bit build.
The qmake command line I use is copied from the one recorded in a comment in the Makefile created by the IDE, which claims it is the command used to create that makefile. I know that the "-spec win32-msvc2013" option looks strange, but it works when the IDE uses it.
The jom command line I use is the one used by the IDE, as logged by the Compile Output window.
The only thing I can think of is that Qt sets up some 'magic' environmental variables which I don't know about.
[Yes, I have googled very extensively and looked at other questions and answers here, and can't find anything that fits this case.]
This code
pushd Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin
vcvars32.bat
popd
sets up environment for building for 32-bit architecture. Run vcvars32.bat from different directory (I think it should have amd64 in its name, don't have Windows computer at the moment so can't say the exact directory name, but you'll figure out).
Or do
pushd "<DRIVE>:\Program Files (x86)\Microsoft Visual Studio <Version>\Common7\Tools"
vsvars32 x64
popd
Update for VS2017:
For 64-bit architecture use this command:
"<DRIVE>:\Program Files (x86)\Microsoft Visual Studio\2017\<Version>\VC\Auxiliary\Build\vcvars64.bat"
and for 32 bits:
"<DRIVE>:\Program Files (x86)\Microsoft Visual Studio\2017\<Version>\VC\Auxiliary\Build\vcvars32.bat"

The CXX compiler identification is unknown

We are having trouble compiling a project using CMake (v2.8.12) under Windows 7 64Bit using Visual Studio 2012. CMake gives us the following errors. We already tried starting Cmake from the Visual Studio Command Line using admin rights. There seems to have been a similar bug in CMake 2.8.11: http://www.cmake.org/Bug/view.php?id=14440
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:446 (execute_process):
execute_process given COMMAND argument with no value.
Call Stack (most recent call first):
C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:48 (CMAKE_DETERMINE_COMPILER_ID_VENDOR)
C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake:131 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:2 (project)
The C compiler identification is unknown
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:446 (execute_process):
execute_process given COMMAND argument with no value.
Call Stack (most recent call first):
C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:48 (CMAKE_DETERMINE_COMPILER_ID_VENDOR)
C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake:127 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:2 (project)
The CXX compiler identification is unknown
Could NOT find SWIG (missing: SWIG_EXECUTABLE SWIG_DIR)
CMake Warning at src/CMakeLists.txt:44 (message):
SWIG was not found. You will not be able to compile for C#.
Configuring incomplete, errors occurred!
See also "C:/Users/hci/laser_control/CMakeFiles/CMakeOutput.log".
See also "C:/Users/hci/laser_control/CMakeFiles/CMakeError.log".
I had the same issue and fixed it running cmake as Admin
Those error messages
The C compiler identification is unknown
The CXX compiler identification is unknown
means CMake did find or assume a compiler but it wasn't able to compile a simple test program.
Take a look at CMakeFiles\CMakeError.log and check the error message there to see:
which compiler path/command line CMake did use
what the error message calling the compiler was
e.g. LINK : fatal error LNK1181: cannot open input file 'kernel32.lib'
If you add --debug-trycompile to the cmake call CMake will even keep the files it has tried to test compile (so you can copy/paste/re-run the command line from the error log in your cmd shell).
The last time I had this problem ...
The last time I had this problem was when my Visual Studio 2012 Professional standard installation did not install any Windows SDK (the error log was showing an missing SDK header).
To verify your SDK installation e.g. check that you have any Resource Compiler installed. It should be in a path similar to:
C:\Program Files (x86)\Microsoft SDKs\Windows\v[some version]\bin\RC.Exe
Since I was missing this - or more accurate any SDK - I installed Windows 8.1 SDK (since Visual Studio 2012 does target Windows 8.x) and voila my CMake was able again to compile the (test) programs.
Reference
Does Visual Studio 2012 include the full Windows SDK
CMake Error at CMakeLists.txt:30 (project): No CMAKE_C_COMPILER could be found
I was getting the terminal output:
The C compiler identification is unknown
The CXX compiler identification is unknown
I checked the CMakeError.log output:
\build\CMakeFiles\CMakeError.log
It showed the error:
warning MSB8003: The WindowsSDKDir property is not defined. Some build tools may not be found.
Going back to visual Studio I needed to install the Windows 10 SDK:
After installing the SDK and running cmake it showed:
Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.18363.
The C compiler identification is MSVC 19.28.29334.0
The CXX compiler identification is MSVC 19.28.29334.0
And built successfully!
I had similar problem also, if you are using Microsoft Visual Studio 2012, that might be because of update of KB2781514 is missing.
After I installed following update, CMake start to detect Visual Studio 2012 c/c++ compilers correctly.
http://www.microsoft.com/en-us/download/details.aspx?id=36020
I faced the same problem. Building and running a project from Visual Studio didn't work for me. However following worked for me:
Open command prompt for developers from Visual Studio tools.
Goto the directory where cmake.exe is present.
Run it.
Lets hope it works for you as well.
For some reason, deleting the build folder in my machine, solved the issue.
cmake:
The cmake assume that you set g++ compiler path accurately.In case due any reason if it did't find compiler path{/usr/bin/g++} then it throw an error like:
**The CXX compiler identification is unknown**
So given step will short out this error:
Locate your compiler CXX path{for g++ path under Linux is :/usr/bin/g++}
Set the Compiler Path and export it configuration: PATH=/usr/bin:$PATH;export PATH
Export compiler like : export CXX=/usr/bin/g++-7
Here we assume that g++,cmake,build-essential install in your Linux system...!!
Same problem here with cmake 2.8.12 and visual studio 10. Cmake may not be able to find the compiler. I solved the problem by uninstalling latest version and installed cmake 2.8.10.
I just encounter with this issue, after I uninstalled some MS software.
I fixed it by repair visual studio 2012.
First go to [Control panel], then select visual studio and repair it,things will go right now.
Make sure you select the proper version of visual Studio.
For example, Visual Studio 2012 is version 11.
I had the same problem and I had to use the "File -> Delete Cache", since I accidentally configured CMake to use wrong visual studio version.
If you use CMake 3.4.0, try upgrading to a newer version. A bug concerning this was fixed relatively recently (see the bug report).
Make sure that you have installed Clang tools
open tools -> Get tools and features, select individual components, search cmake, then uninstall cmake and then re-install cmake, when complete, restart your computer.
I was seeing this on ubuntu - issue was cmake was assuming clang++ as c compiler.
CMake Error at /usr/share/cmake-3.10/Modules/CMakeTestCCompiler.cmake:52 (message):
The C compiler
"/usr/bin/clang++-9"
To fix it, export C, C++ compiler paths:
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++

Running TBB code on windows 7 using code blocks

i have installed TBB setup for windows 7 and want to execute code in it.i don't have visual studio setup and i have code blocks IDE. i want to execute my TBB code in it.Pls Help to configure Code Blocks.
I have done Linker settings i.e i have included libraries from this path
C:\Program Files\Intel\Composer XE 2013\tbb\lib\ia32\
and i have set search directory to
C:\Program Files\Intel\Composer XE 2013\tbb\include\tbb
still also when i compile it gives error tbb/task_scheduler_init.h :No such file or directory.
Can anyone pls suggest how to run TBB code in windows??
I have set the search directory to
C:\Program Files\Intel\Composer XE 2013\tbb\include\tbb
Pretty clear from the error message and the location of the file you gave that you should have set the search directory to
C:\Program Files\Intel\Composer XE 2013\tbb\include