From 39ab188e5d2c7e25182a28b246f3d5851b10bb08 Mon Sep 17 00:00:00 2001 From: Sebastien Date: Thu, 3 Oct 2019 14:40:24 -0400 Subject: [PATCH] Resolve Jenkins build issues --- .cproject | 114 ++++++++++++++++++++++++ .settings/language.settings.xml | 24 +++++ .settings/org.eclipse.cdt.core.prefs | 18 +++- components/raop/raop_sink.c | 5 +- components/squeezelite-ota/component.mk | 4 +- components/wifi-manager/wifi_manager.c | 4 +- main/esp_app_main.c | 2 +- main/nvs_utilities.c | 2 +- main/nvs_utilities.h | 1 + main/platform_esp32.h | 2 +- 10 files changed, 166 insertions(+), 10 deletions(-) diff --git a/.cproject b/.cproject index ab1ea27f..cfd41452 100644 --- a/.cproject +++ b/.cproject @@ -290,6 +290,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -305,6 +401,12 @@ + + + + + + @@ -387,6 +489,12 @@ + + + + + + @@ -411,6 +519,12 @@ + + + + + + diff --git a/.settings/language.settings.xml b/.settings/language.settings.xml index 3a36f712..57c5215e 100644 --- a/.settings/language.settings.xml +++ b/.settings/language.settings.xml @@ -72,5 +72,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.settings/org.eclipse.cdt.core.prefs b/.settings/org.eclipse.cdt.core.prefs index f7f85a48..3fe18a9d 100644 --- a/.settings/org.eclipse.cdt.core.prefs +++ b/.settings/org.eclipse.cdt.core.prefs @@ -1,4 +1,3 @@ - eclipse.preferences.version=1 environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1476804786.212420495/BATCH_BUILD/delimiter=\: environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1476804786.212420495/BATCH_BUILD/operation=append @@ -25,6 +24,23 @@ environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1476804786/PATH/op environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1476804786/PATH/value=C\:/msys2/opt/xtensa-esp32-elf/bin;C\:/jdk-12.0.2/bin/server;C\:/jdk-12.0.2/bin;C\:\\Windows\\system32;C\:\\Windows;C\:\\Windows\\System32\\Wbem;C\:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C\:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;C\:\\jdk-12.0.2\\bin;C\:\\Program Files\\PuTTY\\;C\:\\Program Files (x86)\\HP\\IdrsOCR_15.2.10.1114\\;C\:\\eclipse environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1476804786/append=true environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1476804786/appendContributed=true +environment/project/cdt.managedbuild.toolchain.gnu.cross.base.293933348.1603996291.395881736/BATCH_BUILD/delimiter=\: +environment/project/cdt.managedbuild.toolchain.gnu.cross.base.293933348.1603996291.395881736/BATCH_BUILD/operation=append +environment/project/cdt.managedbuild.toolchain.gnu.cross.base.293933348.1603996291.395881736/BATCH_BUILD/value=1 +environment/project/cdt.managedbuild.toolchain.gnu.cross.base.293933348.1603996291.395881736/IDF_PATH/delimiter=\: +environment/project/cdt.managedbuild.toolchain.gnu.cross.base.293933348.1603996291.395881736/IDF_PATH/operation=replace +environment/project/cdt.managedbuild.toolchain.gnu.cross.base.293933348.1603996291.395881736/IDF_PATH/value=C\:/msys32/opt/esp-idf +environment/project/cdt.managedbuild.toolchain.gnu.cross.base.293933348.1603996291.395881736/PATH/delimiter=\: +environment/project/cdt.managedbuild.toolchain.gnu.cross.base.293933348.1603996291.395881736/PATH/operation=replace +environment/project/cdt.managedbuild.toolchain.gnu.cross.base.293933348.1603996291.395881736/PATH/value=C\:\\msys32\\usr\\bin;C\:\\msys32\\mingw32\\bin;C\:\\msys32\\opt\\xtensa-esp32-elf\\bin\\ +environment/project/cdt.managedbuild.toolchain.gnu.cross.base.293933348.1603996291.395881736/PROJECT_NAME/delimiter=\: +environment/project/cdt.managedbuild.toolchain.gnu.cross.base.293933348.1603996291.395881736/PROJECT_NAME/operation=replace +environment/project/cdt.managedbuild.toolchain.gnu.cross.base.293933348.1603996291.395881736/PROJECT_NAME/value=recovery.custom +environment/project/cdt.managedbuild.toolchain.gnu.cross.base.293933348.1603996291.395881736/PROJECT_VER/delimiter=\: +environment/project/cdt.managedbuild.toolchain.gnu.cross.base.293933348.1603996291.395881736/PROJECT_VER/operation=append +environment/project/cdt.managedbuild.toolchain.gnu.cross.base.293933348.1603996291.395881736/PROJECT_VER/value=custom +environment/project/cdt.managedbuild.toolchain.gnu.cross.base.293933348.1603996291.395881736/append=true +environment/project/cdt.managedbuild.toolchain.gnu.cross.base.293933348.1603996291.395881736/appendContributed=true environment/project/cdt.managedbuild.toolchain.gnu.cross.base.293933348.1603996291/BATCH_BUILD/delimiter=\: environment/project/cdt.managedbuild.toolchain.gnu.cross.base.293933348.1603996291/BATCH_BUILD/operation=append environment/project/cdt.managedbuild.toolchain.gnu.cross.base.293933348.1603996291/BATCH_BUILD/value=1 diff --git a/components/raop/raop_sink.c b/components/raop/raop_sink.c index c2cfcb0b..57fb69e8 100644 --- a/components/raop/raop_sink.c +++ b/components/raop/raop_sink.c @@ -44,7 +44,6 @@ void raop_sink_deinit(void) { void raop_sink_init(raop_cmd_cb_t cmd_cb, raop_data_cb_t data_cb) { const char *hostname; char sink_name[64-6] = CONFIG_AIRPLAY_NAME; - nvs_handle nvs; tcpip_adapter_ip_info_t ipInfo; struct in_addr host; @@ -57,10 +56,10 @@ void raop_sink_init(raop_cmd_cb_t cmd_cb, raop_data_cb_t data_cb) { ESP_ERROR_CHECK( mdns_init() ); ESP_ERROR_CHECK( mdns_hostname_set(hostname) ); - char * sink_name_buffer= get_nvs_value_alloc(NVS_TYPE_STR, "airplay_name"); + char * sink_name_buffer= (char *)get_nvs_value_alloc(NVS_TYPE_STR, "airplay_name"); if(sink_name_buffer != NULL){ memset(sink_name, 0x00, sizeof(sink_name)); - strncpy(sink_name,sizeof(sink_name)-1, sink_name_buffer ); + strncpy(sink_name,sink_name_buffer,sizeof(sink_name)-1 ); free(sink_name_buffer); } diff --git a/components/squeezelite-ota/component.mk b/components/squeezelite-ota/component.mk index d933aeb8..15f57e95 100644 --- a/components/squeezelite-ota/component.mk +++ b/components/squeezelite-ota/component.mk @@ -7,5 +7,7 @@ COMPONENT_ADD_INCLUDEDIRS := . COMPONENT_ADD_INCLUDEDIRS += include COMPONENT_EXTRA_INCLUDES += $(PROJECT_PATH)/main/ +COMPONENT_EXTRA_INCLUDES += $(PROJECT_PATH)/components/tools + CFLAGS += -DLOG_LOCAL_LEVEL=ESP_LOG_DEBUG -DCONFIG_OTA_ALLOW_HTTP=1 -COMPONENT_EMBED_TXTFILES := ${PROJECT_PATH}/server_certs/github.pem \ No newline at end of file +COMPONENT_EMBED_TXTFILES := ${PROJECT_PATH}/server_certs/github.pem diff --git a/components/wifi-manager/wifi_manager.c b/components/wifi-manager/wifi_manager.c index 4463f324..9033bb02 100644 --- a/components/wifi-manager/wifi_manager.c +++ b/components/wifi-manager/wifi_manager.c @@ -66,7 +66,7 @@ Contains the freeRTOS task and all necessary support #endif #ifndef SQUEEZELITE_ESP32_RELEASE_URL -#define SQUEEZELITE_ESP32_RELEASE_URL "https://github.com/sle118/squeezelite-esp32/releases" +#define SQUEEZELITE_ESP32_RELEASE_URL https://github.com/sle118/squeezelite-esp32/releases #endif #ifdef TAS575x #define JACK_GPIO 34 @@ -187,7 +187,7 @@ void wifi_manager_start(){ wifi_manager_safe_update_sta_ip_string((uint32_t)0); host_name = (char * )get_nvs_value_alloc_default(NVS_TYPE_STR, "host_name", "squeezelite-esp32", 0); - char * release_url = (char * )get_nvs_value_alloc_default(NVS_TYPE_STR, "release_url", SQUEEZELITE_ESP32_RELEASE_URL, 0); + char * release_url = (char * )get_nvs_value_alloc_default(NVS_TYPE_STR, "release_url", QUOTE(SQUEEZELITE_ESP32_RELEASE_URL), 0); if(release_url == NULL){ ESP_LOGE(TAG,"Unable to retrieve the release url from nvs"); } diff --git a/main/esp_app_main.c b/main/esp_app_main.c index d9533fad..b45e33f5 100644 --- a/main/esp_app_main.c +++ b/main/esp_app_main.c @@ -150,7 +150,7 @@ void register_default_nvs(){ nvs_value_set_default(NVS_TYPE_STR, "bt_sink_name", CONFIG_BT_NAME, 0); nvs_value_set_default(NVS_TYPE_STR, "bt_sink_pin", QUOTE(CONFIG_BT_SINK_PIN), 0); nvs_value_set_default(NVS_TYPE_STR, "host_name", "squeezelite-esp32", 0); - nvs_value_set_default(NVS_TYPE_STR, "release_url", SQUEEZELITE_ESP32_RELEASE_URL, 0); + nvs_value_set_default(NVS_TYPE_STR, "release_url", QUOTE(SQUEEZELITE_ESP32_RELEASE_URL), 0); nvs_value_set_default(NVS_TYPE_STR, "ap_ip_address",CONFIG_DEFAULT_AP_IP , 0); nvs_value_set_default(NVS_TYPE_STR, "ap_ip_gateway",CONFIG_DEFAULT_AP_GATEWAY , 0); nvs_value_set_default(NVS_TYPE_STR, "ap_ip_netmask",CONFIG_DEFAULT_AP_NETMASK , 0); diff --git a/main/nvs_utilities.c b/main/nvs_utilities.c index 061b2305..3ba48c00 100644 --- a/main/nvs_utilities.c +++ b/main/nvs_utilities.c @@ -114,7 +114,7 @@ void * get_nvs_value_alloc_default(nvs_type_t type, const char *key, void * defa else { esp_err_t err = store_nvs_value_len(type, key, default_value, blob_size); if(err!=ESP_OK){ - ESP_LOGE(TAG,"Unable to store default nvs value. Error: %s",esp_err_to_name(err)); + ESP_LOGE(TAG,"Unable to store default nvs value for key %s. Error: %s", key,esp_err_to_name(err)); return NULL; } else{ diff --git a/main/nvs_utilities.h b/main/nvs_utilities.h index a9331227..ad1a06c7 100644 --- a/main/nvs_utilities.h +++ b/main/nvs_utilities.h @@ -1,6 +1,7 @@ #pragma once #include "esp_err.h" #include "nvs.h" +#include "trace.h" #ifdef __cplusplus extern "C" { #endif diff --git a/main/platform_esp32.h b/main/platform_esp32.h index 3443e069..554ce79f 100644 --- a/main/platform_esp32.h +++ b/main/platform_esp32.h @@ -23,7 +23,7 @@ #include "esp_pthread.h" #ifndef SQUEEZELITE_ESP32_RELEASE_URL -#define SQUEEZELITE_ESP32_RELEASE_URL "https://github.com/sle118/squeezelite-esp32/releases" +#define SQUEEZELITE_ESP32_RELEASE_URL https://github.com/sle118/squeezelite-esp32/releases #endif extern void run_command(char * line);