Eclipse front-end and CMake Questions

berlinetta
Posts: 41
Joined: Tue May 21, 2019 8:33 pm

Eclipse front-end and CMake Questions

Postby berlinetta » Fri Jun 21, 2019 1:58 pm

Hello All,

I am interested in developing within the Eclipse environment and I would like to utilize the CMake build process since it is becoming the defacto standard. I have a few questions about executing projects with this combination...

1) I have been developing my first project which built upon one of the examples. My initial project configuration was set up according to the Eclipse instructions available on the Espressif site and a very helpful video by Neil Kolban. After making the necessary modifications to utilize CMake, including changing the build command within my project properties to "ninja -C build -j5". I noticed that the execution of the build within Eclipse would only work if I had first executed "idf.py build" on the command line to create the build directory and makefiles. I am certain I am doing something wrong as a newbie to all this. Is there a way to configure the build process within Eclipse such that it operates just the same as if executing the command-line syntax?

2) We have a formal coding practice within our company which places modular code which we refer to as "GEMS" within a hierarchical structure. The source code directory structure within the project follows this hierarchy such that any programmer can determine the origin of the code from a shared repository. In order to successfully build my project, it must be "flattened"... all source files are contained within a single source directory - which violates our coding standard. I could be wrong, but I do not believe this is the same as attempting to build individual "components". How can I configure the CMakeLists.txt file(s) to successfully find all source files within the subdirectory structure of the source folder?
As an example, the project directory structure may look like the following:

Code: Select all

    .settings
    build
    src
        GEMS
            Application
                Project_Modules
            Control
                LED_Control
                Project_Modules
                Utilities
            Hardware
                EEPROM
                Security
                SerialFlash
           Processor
                ESP32
Best Regards,
Mark

Who is online

Users browsing this forum: No registered users and 131 guests