Add custom class in Arduino project.

Sysprogs forums Forums VisualGDB Add custom class in Arduino project.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #28255
    Badang
    Participant

    Hello. Im pretty new in ESP32\arduino programming, but i have some experience in barebone mcu firmware design.

    Usually, when i need to divide my project in separate source files, i just make “module name” folder and put *.c and *.h files in there. But when reading documentation of ESP-IDF i have found, what ESP-IDF suggest some different system, what called “components”.  As per my understand, it is same as “C way” with *.c and *h files in they own directory, but also requests makefile and component description file to be inside.

    Ok this is clear for me.
    But for now, i work with arduino visualGDB project and seems there is no components folder, only “referenced libraries”. Also i can just create folder in solution explorer and include files in it.

    So i have next questions:
    1. In generic ESP-IDF VisualGDB project, can i just make folders and put my own source\header files in them? (like in other C oriented IDEs).
    2. (if previous is false) In generic ESP-IDF VisualGDB project, all of the code not included in “main.c” file must be created as “IDF component”?
    3. In Arduino ESP-IDF VisualGDB project, what is the correct way to extract usercode from main? Make arduino-like libraries?

    Thank for your the attention.

    • This topic was modified 3 years, 10 months ago by Badang.
    #28257
    Badang
    Participant

    Also i can just create folder in solution explorer and include files in it.

    Cant*

    #28280
    support
    Keymaster

    Please see the following tutorials for examples on adding extra files to ESP-IDF and Arduino projects:

    You can also add existing files directly to the project by right-clicking on it in Solution Explorer and selecting Add->Existing Item.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.