Page 1 of 1

Problems of the Environment Path of esp-csi/console test

Posted: Tue Mar 07, 2023 1:45 am
by Yeqin1111
After downloading the github code from https://github.com/espressif/esp-csi/tr ... nsole_test, it always tells me the files in the CMakeLists.txt don't exist when I build the project.

Code: Select all

# The following lines of boilerplate have to be in your project's CMakeLists
# in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
add_compile_options(-fdiagnostics-color=always)

if(EXISTS ${CMAKE_CURRENT_LIST_DIR}/components/csi)
    set(CSI_PATH ${CMAKE_CURRENT_LIST_DIR}/components/csi)
elseif(EXISTS ${CMAKE_CURRENT_LIST_DIR}/components/esp-csi)
    set(CSI_PATH ${CMAKE_CURRENT_LIST_DIR}/components/esp-csi)
elseif(EXISTS $ENV{IDF_PATH}/components/csi)
    set(CSI_PATH $ENV{IDF_PATH}/components/csi)
elseif(EXISTS $ENV{IDF_PATH}/components/esp-csi)
    set(CSI_PATH $ENV{IDF_PATH}/components/esp-csi)
else()
    set(CSI_PATH ${CMAKE_CURRENT_LIST_DIR}/../..)
endif()

set(EXTRA_COMPONENT_DIRS ${CSI_PATH} $ENV{IDF_PATH}/examples/system/console/components
                         $ENV{IDF_PATH}/examples/system/console/advanced/components
                         $ENV{IDF_PATH}/examples/peripherals/rmt/led_strip/components
                         $ENV{IDF_PATH}/examples/common_components/led_strip
                         )


include($ENV{IDF_PATH}/tools/cmake/project.cmake)
string(REGEX REPLACE ".*/\(.*\)" "\\1" CURDIR ${CMAKE_CURRENT_SOURCE_DIR})
project(${CURDIR})

git_describe(PROJECT_VERSION ${COMPONENT_DIR})
message("Project commit: " ${PROJECT_VERSION})
I think the {IDF_PATH} is /Users/esp/esp-idf/ and when I click the first line in the EXTRA_COMPONENT_DIRS, there is no file called components in console, and no file in led_strip called components only main there, and no file called led_strip in common_components, so which path I should change? I use vs-code ESP-IDF to build, and it doesn't work because of the lack of files. And when I change the path like:

Code: Select all

set(EXTRA_COMPONENT_DIRS ${CSI_PATH} $ENV{IDF_PATH}/examples/system/console/advanced/components
                         $ENV{IDF_PATH}/examples/system/console/advanced/components
                         $ENV{IDF_PATH}/examples/peripherals/rmt/led_strip/main
                         $ENV{IDF_PATH}/examples/common_components
                         )
 
it doesn't work as well, and it also tells me the missing of "esp_wifi.h" if I changed it to

Code: Select all

set(EXTRA_COMPONENT_DIRS ${CSI_PATH} $ENV{IDF_PATH}/examples/system/console/advanced/components
                         $ENV{IDF_PATH}/examples/system/console/advanced/components
                         $ENV{IDF_PATH}/examples/peripherals/rmt/led_strip/main
                         $ENV{IDF_PATH}/examples/common_components/iperf/include
                         )
 
The reason of why I changed to those two forms is because only those files there. The ESP-IDF version is the latest.
So what should I do to make it build?
Thanks a lot!!