From 5d018594d83d90f4ecea22eb99def75dc20587cb Mon Sep 17 00:00:00 2001 From: Renz Bagaporo Date: Sat, 8 Jan 2022 15:27:37 +0800 Subject: [PATCH] Remove need to copy protocomm_priv.h --- docs/Linux_based_host/Linux_based_readme.md | 5 +---- docs/MCU_based_host/MCU_based_readme.md | 5 +---- esp/esp_driver/network_adapter/main/CMakeLists.txt | 4 ++++ 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/docs/Linux_based_host/Linux_based_readme.md b/docs/Linux_based_host/Linux_based_readme.md index 18e0369186..104330daea 100644 --- a/docs/Linux_based_host/Linux_based_readme.md +++ b/docs/Linux_based_host/Linux_based_readme.md @@ -209,10 +209,7 @@ ESP-IDF release version to be used for ESP peripherals are | ESP32-C3 | release v4.3 | | ESP32-C3 (HCI over UART)| release v4.4 (beta)| -Clone appropriate ESP-IDF version as per your ESP peripheral. The control path between Linux host and ESP peripheral is based on `protobuf`. For that, corresponding stack layer, `protocomm` from ESP-IDF is used. Run following command in ESP-IDF directory to make `protocomm_priv.h` available for control path. -``` -$ git mv components/protocomm/src/common/protocomm_priv.h components/protocomm/include/common/ -``` +Clone appropriate ESP-IDF version as per your ESP peripheral. The control path between Linux host and ESP peripheral is based on `protobuf`. For that, corresponding stack layer, `protocomm` from ESP-IDF is used. ### 2.3 ESP-Hosted Code Repository Clone esp-hosted repository on Linux host. diff --git a/docs/MCU_based_host/MCU_based_readme.md b/docs/MCU_based_host/MCU_based_readme.md index 6b358f43ae..75d2342f3f 100644 --- a/docs/MCU_based_host/MCU_based_readme.md +++ b/docs/MCU_based_host/MCU_based_readme.md @@ -121,10 +121,7 @@ For windows user, you can also program the binaries using ESP Flash Programming #### 2.2.2 Compilation using source Please use above mentioned ESP-IDF repository release branch for your ESP peripheral. -The control path between host and ESP peripheral is based on `protobuf`. For that `protocomm` layer from ESP-IDF is used. Run following command to make `protocomm_priv.h` available for control path. -``` -$ git mv components/protocomm/src/common/protocomm_priv.h components/protocomm/include/common/ -``` +The control path between host and ESP peripheral is based on `protobuf`. For that `protocomm` layer from ESP-IDF is used. Navigate to `esp/esp_driver/network_adapter` directory ##### Using make diff --git a/esp/esp_driver/network_adapter/main/CMakeLists.txt b/esp/esp_driver/network_adapter/main/CMakeLists.txt index 4c7a6ae0d4..dc7cdecac5 100644 --- a/esp/esp_driver/network_adapter/main/CMakeLists.txt +++ b/esp/esp_driver/network_adapter/main/CMakeLists.txt @@ -11,3 +11,7 @@ endif() register_component() set(PROJECT_VERSION "-DPROJECT_VERSION=0.3") target_compile_definitions(${COMPONENT_LIB} PRIVATE ${PROJECT_VERSION}) + +# Add directory of protocomm_priv.h to include paths +idf_component_get_property(protocomm_dir protocomm COMPONENT_DIR) +target_include_directories(${COMPONENT_LIB} PRIVATE "${protocomm_dir}/src/common") \ No newline at end of file