乐鑫技术交流
直播中

李凤津

7年用户 952经验值
私信 关注
[问答]

ESP32-S3驱动\"3线SPI + 并行RGB”接口屏幕,屏幕IC:ST7701S报错如何解决?

您好,我是ESP初学者,正在使用ESP32-S3驱动"3线SPI + 并行RGB”接口屏幕,屏幕IC:ST7701S,在使用贵司的ST7701例程时出现了报错,请问该如何解决??

CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

    project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first  
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.     

-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error in CMakeLists.txt:
  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 in CMakeLists.txt:
  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 Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.24)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred!
See also "E:/ESP-IDF/espressif_esp_lcd_st7701_1.0.0/build/CMakeFiles/CMakeOutput.log".
See also "E:/ESP-IDF/espressif_esp_lcd_st7701_1.0.0/build/CMakeFiles/CMakeError.log".
                             

回帖(1)

张勇

2024-6-6 18:16:19
您好!根据您提供的信息,您在使用ESP32-S3驱动3线SPI + 并行RGB接口屏幕时遇到了CMake报错。这个问题通常是因为CMakeLists.txt文件中缺少了project()命令。为了解决这个问题,请按照以下步骤操作:

1. 打开您的项目的CMakeLists.txt文件。

2. 在文件的顶部添加以下代码行:
   ```
   project(ProjectName)
   ```
   其中,ProjectName是您的项目名称。例如,如果您的项目名为MyProject,则应添加:
   ```
   project(MyProject)
   ```

3. 确保您的CMakeLists.txt文件中包含了其他必要的配置和依赖项。例如,您可能需要添加以下代码行来找到ESP32-S3的组件和设置组件选项:
   ```
   set(COMPONENT_REQUIRES主组件)
   set(COMPONENT_PRIV_REQUIRES 私有组件)
   ```

4. 保存CMakeLists.txt文件的更改。

5. 重新运行CMake以生成新的构建系统。这通常可以通过在命令行中运行以下命令来完成:
   ```
   idf.py reconfigure
   ```

6. 如果CMake报错已解决,请继续构建和上传您的项目:
   ```
   idf.py build
   idf.py flash
   ```

希望这些步骤能帮助您解决问题。如果您在执行这些步骤时遇到任何问题,请随时告诉我,我会尽力提供帮助。
举报

更多回帖

发帖
×
20
完善资料,
赚取积分