Copying sub folder in ESP-IDF to a local project folder

sabin.john
Posts: 7
Joined: Thu Dec 03, 2020 11:53 am

Copying sub folder in ESP-IDF to a local project folder

Postby sabin.john » Fri Mar 19, 2021 9:42 am

Hello,
I am using the ESP-IDF and for my projects I need to modify the IDF files located in my C drive. Now I do this and conditional compile the changes so that I can revert back the changes to original if needed. I was wondering if it is possible to create a copy of these changed libraries in the local project folder in say D drive and leave the installed files in C drive unchanged. This way I won't have to keep track of each change I make to the installed files.
How do I go about this? How to let the compiler know which files to use exactly.?
This is the cmake file that I use

Code: Select all

# For more information about build system see
# https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html
# The following five 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)

#esp error header
set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/components/esp_common/include) 


#gpio header
list(APPEND EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/components/driver/include/driver")
#netif header
list(APPEND EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/components/esp_netif/include")
#NVS flash
list(APPEND EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/components/nvs_flash/include")

#httpd server includes
list(APPEND EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/components/esp_http_server")
#http client includes for fota
list(APPEND EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/components/esp_http_client")
#wifi include 
list(APPEND EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/components/esp_wifi")


include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(main)

Regards,
Sabin

ESP_Minatel
Posts: 364
Joined: Mon Jan 04, 2021 2:06 pm

Re: Copying sub folder in ESP-IDF to a local project folder

Postby ESP_Minatel » Wed Mar 24, 2021 9:21 am

Hi,

The best and more usual way to do that is to fork the IDF repository on GitHub to your GitHub account and create a new branch for your changes.
Any time you can move from your branch (your changes) to the master (original copy).

You can find a lot of information around Git and GitHub on the Internet.

Who is online

Users browsing this forum: No registered users and 186 guests