How to build old IDF (esp-idf-v2.0-rc2) at Windows 10 (64 bit) which do not have CMake File?

anghockleong501
Posts: 6
Joined: Thu Sep 05, 2019 2:49 am

How to build old IDF (esp-idf-v2.0-rc2) at Windows 10 (64 bit) which do not have CMake File?

Postby anghockleong501 » Thu Sep 05, 2019 3:34 am

Hi Sir and Madam,

I try to build the ESP-IDF esp-idf-v2.0-rc2 at Windows 10 (64 bit) but fail.
The error is below:

Andy@AngHockLeong-PC MINGW32 ~/esp/19-1-18_fludrive/esp-idf-v2.0-rc2/examples/get-started/hello_world
$ make menuconfig
-bash: make: command not found

The document to follow is : https://docs.espressif.com/projects/esp ... index.html

Question:
1. Does the document above correct?
2. If correct, how to fix it?

Thank you.
Attachments
ESP Build Error.PNG
ESP Build Error.PNG (9.04 KiB) Viewed 6367 times

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: How to build old IDF (esp-idf-v2.0-rc2) at Windows 10 (64 bit) which do not have CMake File?

Postby ESP_Angus » Thu Sep 05, 2019 9:44 am

Hi,

The getting started guide from ESP-IDF v4.1 ("latest") will not work to build ESP-IDF v2.0-rc2 (March 2017).

You can find the Get Started guide for ESP-IDF v2.1.1 here. If you follow this then it should work:
https://docs.espressif.com/projects/esp ... index.html

Strongly recommend upgrading to a more recent ESP-IDF release if this is possible.

anghockleong501
Posts: 6
Joined: Thu Sep 05, 2019 2:49 am

Re: How to build old IDF (esp-idf-v2.0-rc2) at Windows 10 (64 bit) which do not have CMake File?

Postby anghockleong501 » Fri Sep 06, 2019 2:42 am

Hi ESP_Angus,
I ignore the old set up version and follow the latest version (4.1) https://docs.espressif.com/projects/esp ... setup.html to set up.

1. After install the https://dl.espressif.com/dl/esp-idf-tools-setup-2.0.exe , I have the following error at ESP-IDF command prompt.
May I how to fix it?



git version 2.21.0.windows.1
IDF version does not include export.bat. Using the fallback version.
IDF version does not include tools\tools.json. Using the fallback version.
IDF version does not include tools\idf_tools.py. Using the fallback version.

Setting IDF_PATH: C:\Users\Andy\Desktop\esp-idf

Adding ESP-IDF tools to PATH...
Not using an unsupported version of tool cmake found in PATH: 3.15.2. To use it, run 'C:\Users\Andy\AppData\Local\Programs\Python\Python37\python.exe C:\Users\Andy\.espressif\idf_tools_fallback.py --tools-json C:\Users\Andy\.espressif\tools_fallback.json export --prefer-system'
C:\Users\Andy\.espressif\tools\xtensa-esp32-elf\1.22.0-80-g6c4433a5-5.2.0\xtensa-esp32-elf\bin
C:\Users\Andy\.espressif\tools\esp32ulp-elf\2.28.51.20170517\esp32ulp-elf-binutils\bin
C:\Users\Andy\.espressif\tools\cmake\3.13.4\bin
C:\Users\Andy\.espressif\tools\openocd-esp32\v0.10.0-esp32-20190313\openocd-esp32\bin
C:\Users\Andy\.espressif\tools\mconf\v4.6.0.0-idf-20190628\
C:\Users\Andy\.espressif\tools\ninja\1.9.0\
C:\Users\Andy\.espressif\tools\idf-exe\1.0\
C:\Users\Andy\.espressif\tools\ccache\3.7\
C:\Users\Andy\.espressif\python_env\idf3.3_py3.7_env\Scripts
C:\Users\Andy\Desktop\esp-idf\tools

Checking if Python packages are up to date...
Python requirements from C:\Users\Andy\Desktop\esp-idf\requirements.txt are satisfied.

Done! You can now compile ESP-IDF projects.
Go to the project directory and run:

idf.py build


2. When build it with idf.py build, the error is below:

C:\Users\Andy\Desktop\esp-idf> idf.py build
Note: You are using Python 3.7.3. Python 3 support is new, please report any problems you encounter. Search for 'Setting the Python Interpreter' in the ESP-IDF docs if you want to use Python 2.7.
Checking Python dependencies...
Python requirements from C:\Users\Andy\Desktop\esp-idf\requirements.txt are satisfied.
Running cmake in directory C:\Users\Andy\Desktop\esp-idf\build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 --warn-uninitialized C:\Users\Andy\Desktop\esp-idf"...
Warn about uninitialized values.
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- The ASM compiler identification is unknown
-- Didn't find assembler
CMake Error at CMakeLists.txt:2 (project):
No CMAKE_C_COMPILER could be found.

Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.


CMake Error at CMakeLists.txt:2 (project):
No CMAKE_CXX_COMPILER could be found.

Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.


CMake Error at CMakeLists.txt:2 (project):
No CMAKE_ASM_COMPILER could be found.

Tell CMake where to find the compiler by setting either the environment
variable "ASM" or the CMake cache entry CMAKE_ASM_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.


-- Warning: Did not find file Compiler/-ASM
-- Configuring incomplete, errors occurred!
See also "C:/Users/Andy/Desktop/esp-idf/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Andy/Desktop/esp-idf/build/CMakeFiles/CMakeError.log".
cmake failed with exit code 1

C:\Users\Andy\Desktop\esp-idf>

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: How to build old IDF (esp-idf-v2.0-rc2) at Windows 10 (64 bit) which do not have CMake File?

Postby ESP_Angus » Fri Sep 06, 2019 5:58 am

anghockleong501 wrote:
Fri Sep 06, 2019 2:42 am
Hi ESP_Angus,
I ignore the old set up version and follow the latest version (4.1) https://docs.espressif.com/projects/esp ... setup.html to set up.
What version of the IDF source code do you have? You need to follow the documentation that matches the IDF source code version you have.

Code: Select all

C:\Users\Andy\Desktop\esp-idf> idf.py build
Note: You are using Python 3.7.3. Python 3 support is new, please report any problems you encounter. Search for 'Setting the Python Interpreter' in the ESP-IDF docs if you want to use Python 2.7.
ESP-IDF v4.x doesn't print this message so you don't seem to have ESP-IDF v4.1 source code. First find the version of ESP-IDF you have, and then find the documentation that matches the version you have (on the docs pages there is a link in the bottom left corner that lets you change version number).

anghockleong501
Posts: 6
Joined: Thu Sep 05, 2019 2:49 am

Re: How to build old IDF (esp-idf-v2.0-rc2) at Windows 10 (64 bit) which do not have CMake File?

Postby anghockleong501 » Fri Sep 06, 2019 7:23 am

Hi ESP_Angus,
For "What version of the IDF source code do you have? You need to follow the documentation that matches the IDF source code version you have.", the IDF version I used is 3.3.

After I use ver 4.0, the error disappear but new error is appear as below:
Using Python in C:\Users\Andy\AppData\Local\Programs\Python\Python37\
Python 3.7.3
Using Git in C:\Program Files\Git\cmd\
git version 2.21.0.windows.1
Setting IDF_PATH: C:\Users\Andy\Desktop\esp-idf

Adding ESP-IDF tools to PATH...
Not using an unsupported version of tool cmake found in PATH: 3.15.2.
fatal: not a git repository (or any of the parent directories): .git
Traceback (most recent call last):
File "C:\Users\Andy\Desktop\esp-idf\tools\idf_tools.py", line 1317, in <module>
main(sys.argv[1:])
File "C:\Users\Andy\Desktop\esp-idf\tools\idf_tools.py", line 1313, in main
action_func(args)
File "C:\Users\Andy\Desktop\esp-idf\tools\idf_tools.py", line 953, in action_export
idf_python_env_path, idf_python_export_path, virtualenv_python = get_python_env_path()
File "C:\Users\Andy\Desktop\esp-idf\tools\idf_tools.py", line 813, in get_python_env_path
idf_version_str = subprocess.check_output(['git', '-C', global_idf_path, 'describe', '--tags'], cwd=global_idf_path, env=os.environ).decode()
File "C:\Users\Andy\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 395, in check_output
**kwargs).stdout
File "C:\Users\Andy\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 487, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['git', '-C', 'C:\\Users\\Andy\\Desktop\\esp-idf', 'describe', '--tags']' returned non-zero exit status 128.

C:\Users\Andy\Desktop\esp-idf>
May I know how to fix it?
Thank you.

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: How to build old IDF (esp-idf-v2.0-rc2) at Windows 10 (64 bit) which do not have CMake File?

Postby ESP_Angus » Fri Sep 06, 2019 8:15 am

anghockleong501 wrote:
Fri Sep 06, 2019 7:23 am
fatal: not a git repository (or any of the parent directories): .git
This error means that the IDF_PATH directory is not a git directory. You need to clone the repository from GitHub in order to get the .git directory, the "Download" feature in GitHub will not work.

If downloading a stable release, there are also zip files you can use. But there is no stable v4.0 or v4.1 release, yet.

anghockleong501
Posts: 6
Joined: Thu Sep 05, 2019 2:49 am

Re: How to build old IDF (esp-idf-v2.0-rc2) at Windows 10 (64 bit) which do not have CMake File?

Postby anghockleong501 » Wed Sep 11, 2019 6:19 am

Hi,

I have set up a linux OS's PC and compile at linux OS.

1. The hello world example is compiled successfully for ESP-IDF version 2.0-rc2 using Get Started guide for ESP-IDF v2.1.1
https://docs.espressif.com/projects/esp ... index.html

2. The hello world example is compiled successfully for stable ESP-IDF version 3.3 using stable version at https://docs.espressif.com/projects/esp ... index.html .

Thank you very much.

Who is online

Users browsing this forum: No registered users and 142 guests