From 11107a3d321e6d69b85cf6889d11ce9961446ed3 Mon Sep 17 00:00:00 2001 From: Georges Palauqui Date: Tue, 11 Jun 2024 10:14:30 +0200 Subject: [PATCH] fix dependancies --- .gitignore | 3 ++- components/bm1397/CMakeLists.txt | 12 +++++++----- components/connect/CMakeLists.txt | 7 ++++++- components/dns_server/CMakeLists.txt | 13 ++++++++++--- components/stratum/CMakeLists.txt | 17 +++++++++-------- main/CMakeLists.txt | 24 +++++++++++++++++++++--- main/self_test/self_test.c | 1 + main/tasks/asic_result_task.c | 2 +- 8 files changed, 57 insertions(+), 22 deletions(-) diff --git a/.gitignore b/.gitignore index c65a7f4..046a838 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,5 @@ html_doc/ components/components/* config.bin -config.cvs \ No newline at end of file +config.cvs +managed_components/* diff --git a/components/bm1397/CMakeLists.txt b/components/bm1397/CMakeLists.txt index b68955c..7706555 100644 --- a/components/bm1397/CMakeLists.txt +++ b/components/bm1397/CMakeLists.txt @@ -2,15 +2,17 @@ idf_component_register( SRCS "bm1368.c" "bm1366.c" - "bm1397.c" - "serial.c" + "bm1397.c" + "serial.c" "crc.c" + INCLUDE_DIRS "include" + REQUIRES - freertos - driver - stratum + "freertos" + "driver" + "stratum" ) diff --git a/components/connect/CMakeLists.txt b/components/connect/CMakeLists.txt index 323ca30..ca106e3 100644 --- a/components/connect/CMakeLists.txt +++ b/components/connect/CMakeLists.txt @@ -1,8 +1,13 @@ idf_component_register( SRCS "connect.c" + INCLUDE_DIRS "include" "../../main" -REQUIRES nvs_flash esp_wifi esp_event + +REQUIRES + "nvs_flash" + "esp_wifi" + "esp_event" ) \ No newline at end of file diff --git a/components/dns_server/CMakeLists.txt b/components/dns_server/CMakeLists.txt index 4230585..b8e3d8f 100644 --- a/components/dns_server/CMakeLists.txt +++ b/components/dns_server/CMakeLists.txt @@ -1,3 +1,10 @@ -idf_component_register(SRCS dns_server.c - INCLUDE_DIRS include - PRIV_REQUIRES esp_netif) +idf_component_register( +SRCS + "dns_server.c" + +INCLUDE_DIRS + "include" + +PRIV_REQUIRES + "esp_netif" +) diff --git a/components/stratum/CMakeLists.txt b/components/stratum/CMakeLists.txt index 0f01fa4..dc8069e 100644 --- a/components/stratum/CMakeLists.txt +++ b/components/stratum/CMakeLists.txt @@ -1,13 +1,14 @@ idf_component_register( -SRCS - "utils.c" - "mining.c" +SRCS + "utils.c" + "mining.c" "stratum_api.c" -INCLUDE_DIRS +INCLUDE_DIRS "include" -REQUIRES - json - mbedtls - app_update + +REQUIRES + "json" + "mbedtls" + "app_update" ) \ No newline at end of file diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index e7e8d28..84bef2d 100755 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -1,10 +1,10 @@ idf_component_register( SRCS "adc.c" - "i2c_master.c" "DS4432U.c" "EMC2101.c" "fonts.c" + "i2c_master.c" "INA260.c" "led_controller.c" "main.c" @@ -13,20 +13,38 @@ SRCS "system.c" "vcore.c" "work_queue.c" + "./http_server/http_server.c" + "./self_test/self_test.c" "./tasks/stratum_task.c" "./tasks/create_jobs_task.c" "./tasks/asic_task.c" "./tasks/asic_result_task.c" "./tasks/user_input_task.c" "./tasks/power_management_task.c" - "./http_server/http_server.c" - "./self_test/self_test.c" INCLUDE_DIRS "." "tasks" "http_server" + "../components/bm1397/include" "../components/connect/include" + "../components/dns_server/include" + "../components/stratum/include" + +PRIV_REQUIRES + "app_update" + "driver" + "esp_adc" + "esp_app_format" + "esp_event" + "esp_http_server" + "esp_netif" + "esp_timer" + "esp_wifi" + "json" + "nvs_flash" + "spiffs" + "vfs" ) set(WEB_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/http_server/axe-os") diff --git a/main/self_test/self_test.c b/main/self_test/self_test.c index b9814d4..d7de139 100644 --- a/main/self_test/self_test.c +++ b/main/self_test/self_test.c @@ -10,6 +10,7 @@ #include "oled.h" #include "vcore.h" #include "utils.h" +#include "string.h" static const char * TAG = "self_test"; diff --git a/main/tasks/asic_result_task.c b/main/tasks/asic_result_task.c index 3f3a012..c061730 100644 --- a/main/tasks/asic_result_task.c +++ b/main/tasks/asic_result_task.c @@ -7,7 +7,7 @@ #include "nvs_config.h" #include "utils.h" -const char *TAG = "asic_result"; +static const char *TAG = "asic_result"; void ASIC_result_task(void *pvParameters) {