espressif / esp-at

AT application for ESP32/ESP32-C2/ESP32-C3/ESP32-C6/ESP8266
Apache License 2.0
894 stars 809 forks source link

Compilation failed under windows #512

Open wajlh opened 3 years ago

wajlh commented 3 years ago

Compiling esp-at fails under windows, How to solve it?

PS E:\ESP32> cd esp-at PS E:\ESP32\esp-at> idf.py build Executing action: all (aliases: build) Running cmake in directory e:\esp32\esp-at\build Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -DCCACHE_ENABLE=1 e:\esp32\esp-at"... CMake Error at CMakeLists.txt:9 (string): string no output variable specified

CMake Error at CMakeLists.txt:13 (string): string begin index: 9 is out of range 0 - 0

CMake Error at CMakeLists.txt:14 (string): string sub-command STRIP requires two arguments.

CMake Error at CMakeLists.txt:15 (string): string no output variable specified

silence:0 sdkconfig:E:/ESP32/esp-at/module_config/module__default/sdkconfig.defaults CMake Error at CMakeLists.txt:49 (include): include could not find load file:

E:/ESP32/esp-at/esp-idf/tools/cmake/project.cmake

-- The C compiler identification is unknown -- The CXX compiler identification is unknown CMake Error at CMakeLists.txt:51 (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:51 (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.

-- Configuring incomplete, errors occurred! See also "E:/ESP32/esp-at/build/CMakeFiles/CMakeOutput.log". See also "E:/ESP32/esp-at/build/CMakeFiles/CMakeError.log". cmake failed with exit code 1 PS E:\ESP32\esp-at>

ustccw commented 3 years ago

@wajlh please build the esp-at project according to https://docs.espressif.com/projects/esp-at/en/latest/Compile_and_Develop/How_to_clone_project_and_compile_it.html

wajlh commented 3 years ago

@ustccw thank you for your reply . I used "ESP-IDF Tools Installer" to install the windows environment and executed step 1: install python>=3.8 step 2: install pip step 3: install the following python packages with pip: python -m pip install pyyaml xlrd The test "esp-idf\examples\ethernet\eth2ap" project compiles normally. But the ESP-AT project cannot be compiled normally, and the log is the same as before. Do I have any other issues that I need to pay attention to?

ustccw commented 3 years ago

@wajlh esp-at uses ./build.py build, other than idf.py build. please try again and provide the compile log.

riccardobritti82 commented 3 years ago

Compiling esp-at fails under windows,

How to solve it? PS E:\ESP32> cd esp-at PS E:\ESP32\esp-at> idf.py build Executing action: all (aliases: build) Running cmake in directory e:\esp32\esp-at\build Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -DCCACHE_ENABLE=1 e:\esp32\esp-at"... CMake Error at CMakeLists.txt:9 (string): string no output variable specified

CMake Error at CMakeLists.txt:13 (string): string begin index: 9 is out of range 0 - 0

CMake Error at CMakeLists.txt:14 (string): string sub-command STRIP requires two arguments.

CMake Error at CMakeLists.txt:15 (string): string no output variable specified

silence:0 sdkconfig:E:/ESP32/esp-at/module_config/module__default/sdkconfig.defaults CMake Error at CMakeLists.txt:49 (include): include could not find load file:

E:/ESP32/esp-at/esp-idf/tools/cmake/project.cmake

-- The C compiler identification is unknown -- The CXX compiler identification is unknown CMake Error at CMakeLists.txt:51 (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:51 (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.

-- Configuring incomplete, errors occurred! See also "E:/ESP32/esp-at/build/CMakeFiles/CMakeOutput.log". See also "E:/ESP32/esp-at/build/CMakeFiles/CMakeError.log". cmake failed with exit code 1 PS E:\ESP32\esp-at>

I have exactly the same problem. I think the problem is about the IDF_PATH but I don't undestand where I have the problem. the command :

build.py menuconfig work fine and i can set the platform etc...

but when I call :

build.py build the log is:

D:\Progetti\ESP32\Progetti_ESP\Progetti_ESP\ESP_AT_from_git\esp-at>build.py menuconfig module_name WROOM-32 platform_name=ESP32,module_name=WROOM-32 Usage: esp-idf\tools\idf.py [OPTIONS] COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]...

ESP-IDF CLI build management tool. For commands that are not known to idf.py an attempt to execute it as a build system target will be made.

Options: --version Show IDF version and exit. --list-targets Print list of supported targets and exit. -C, --project-dir PATH Project directory. -B, --build-dir PATH Build directory. -w, --cmake-warn-uninitialized / -n, --no-warnings Enable CMake uninitialized variable warnings for CMake files inside the project directory. (--no- warnings is now the default, and doesn't need to be specified.)

-v, --verbose Verbose build output. --ccache / --no-ccache Use ccache in build. Disabled by default, unless IDF_CCACHE_ENABLE environment variable is set to a non- zero value.

-G, --generator [Ninja|MinGW Makefiles] CMake generator. -D, --define-cache-entry TEXT Create a cmake cache entry. This option can be used at most once either globally, or for one subcommand. -b, --baud INTEGER Baud rate for flashing. The default value can be set with the ESPBAUD environment variable. This option can be used at most once either globally, or for one subcommand.

-p, --port TEXT Serial port. The default value can be set with the ESPPORT environment variable. This option can be used at most once either globally, or for one subcommand.

--help Show this message and exit.

Commands: all Aliases: build. Build the project. app Build only the app. app-flash Flash the app only. bootloader Build only bootloader. bootloader-flash Flash bootloader only. clean Delete build output files from the build directory. confserver Run JSON configuration server. efuse_common_table Generate C-source for IDF's eFuse fields. efuse_custom_table Generate C-source for user's eFuse fields. encrypted-app-flash Flash the encrypted app only. encrypted-flash Flash the encrypted project. erase_flash Erase entire flash chip. erase_otadata Erase otadata partition. flash Flash the project. fullclean Delete the entire build directory contents. gdb Run the GDB. gdbgui GDB UI in default browser. gdbtui GDB TUI mode. menuconfig Run "menuconfig" project configuration tool. monitor Display serial output. openocd Run openocd from current path partition_table Build only partition table. partition_table-flash Flash partition table only. post_debug Utility target to read the output of async debug action and stop them. python-clean Delete generated Python byte code from the IDF directory read_otadata Read otadata partition. reconfigure Re-run CMake. set-target Set the chip target to build. show_efuse_table Print eFuse table. size Print basic size information about the app. size-components Print per-component size information. size-files Print per-source-file size information. idf.py build ret: 0 [Errno 2] No such file or directory: 'build\flash_project_args'

Can you help me ?

wajlh commented 3 years ago

@riccardobritti82 I gave up the windows OS method,because using"./build.py build" method was also unsuccessful. and used Ubuntu OS is ok

riccardobritti82 commented 3 years ago

I have solved the problem on windows... The guide is not clear, but now with the correct sequence, it work correctly Thanks

MaJerle commented 3 years ago

@riccardobritti82 can you share the sequence?

moltonim commented 3 years ago

@riccardobritti82 please share the sequence- Dai Riccardo condividi!!!

ustccw commented 2 years ago

@wajlh @riccardobritti82 docs updated. esp-at release/v2.4.0.0 and master branch simplfied the compile workflow. just run python build.py install and python build.py build to build the esp-at project, could you please have a try? see this doc for more details: https://docs.espressif.com/projects/esp-at/en/latest/esp32/Compile_and_Develop/How_to_clone_project_and_compile_it.html