This commit is contained in:
Alexandre B 2024-06-19 00:49:49 -04:00
parent c62f1eeb6f
commit 1e64beed60
10 changed files with 618 additions and 2290 deletions

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -1 +1 @@
e7d3415cdb94fae1061a250d3f138c2291b8714d c62f1eeb6f515fa0c377e727390fffc38561a78a

View File

@ -108,3 +108,13 @@
81213 84652 7404745239614980 C:/Users/alex/github/ESP-Nodes/ESP32-IDF_Blink/build/bootloader/.bin_timestamp 85f99a5b3819cd04 81213 84652 7404745239614980 C:/Users/alex/github/ESP-Nodes/ESP32-IDF_Blink/build/bootloader/.bin_timestamp 85f99a5b3819cd04
84653 86101 0 esp-idf/esptool_py/CMakeFiles/bootloader_check_size 6ff4600edacd69e 84653 86101 0 esp-idf/esptool_py/CMakeFiles/bootloader_check_size 6ff4600edacd69e
84653 86101 0 C:/Users/alex/github/ESP-Nodes/ESP32-IDF_Blink/build/bootloader/esp-idf/esptool_py/CMakeFiles/bootloader_check_size 6ff4600edacd69e 84653 86101 0 C:/Users/alex/github/ESP-Nodes/ESP32-IDF_Blink/build/bootloader/esp-idf/esptool_py/CMakeFiles/bootloader_check_size 6ff4600edacd69e
51 351 0 esp-idf/esptool_py/CMakeFiles/bootloader_check_size 6ff4600edacd69e
51 351 0 C:/Users/alex/github/ESP-Nodes/ESP32-IDF_Blink/build/bootloader/esp-idf/esptool_py/CMakeFiles/bootloader_check_size 6ff4600edacd69e
62 257 0 esp-idf/esptool_py/CMakeFiles/bootloader_check_size 6ff4600edacd69e
62 257 0 C:/Users/alex/github/ESP-Nodes/ESP32-IDF_Blink/build/bootloader/esp-idf/esptool_py/CMakeFiles/bootloader_check_size 6ff4600edacd69e
61 247 0 esp-idf/esptool_py/CMakeFiles/bootloader_check_size 6ff4600edacd69e
61 247 0 C:/Users/alex/github/ESP-Nodes/ESP32-IDF_Blink/build/bootloader/esp-idf/esptool_py/CMakeFiles/bootloader_check_size 6ff4600edacd69e
52 269 0 esp-idf/esptool_py/CMakeFiles/bootloader_check_size 6ff4600edacd69e
52 269 0 C:/Users/alex/github/ESP-Nodes/ESP32-IDF_Blink/build/bootloader/esp-idf/esptool_py/CMakeFiles/bootloader_check_size 6ff4600edacd69e
57 526 0 esp-idf/esptool_py/CMakeFiles/bootloader_check_size 6ff4600edacd69e
57 526 0 C:/Users/alex/github/ESP-Nodes/ESP32-IDF_Blink/build/bootloader/esp-idf/esptool_py/CMakeFiles/bootloader_check_size 6ff4600edacd69e

File diff suppressed because one or more lines are too long

View File

@ -1066,7 +1066,7 @@
}, },
{ {
"directory": "C:/Users/alex/github/ESP-Nodes/ESP32-IDF_Blink/build", "directory": "C:/Users/alex/github/ESP-Nodes/ESP32-IDF_Blink/build",
"command": "C:\\Users\\alex\\.espressif\\tools\\tools\\xtensa-esp-elf\\esp-13.2.0_20230928\\xtensa-esp-elf\\bin\\xtensa-esp32-elf-gcc.exe -DESP_PLATFORM -DIDF_VER=\\\"v5.2.2\\\" -DSOC_MMU_PAGE_SIZE=CONFIG_MMU_PAGE_SIZE -DSOC_XTAL_FREQ_MHZ=CONFIG_XTAL_FREQ -D_GLIBCXX_HAVE_POSIX_SEMAPHORE -D_GLIBCXX_USE_POSIX_SEMAPHORE -D_GNU_SOURCE -D_POSIX_READER_WRITER_LOCKS -D PROJECT_NAME=\\\"ESP32-IDF_Blink\\\" -DPROJECT_VER=\\\"e7d3415\\\" -IC:/Users/alex/github/ESP-Nodes/ESP32-IDF_Blink/build/config -IC:/Users/alex/esp/v5.2.2/esp-idf/components/esp_app_format/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/newlib/platform_include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/freertos/config/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/freertos/config/include/freertos -IC:/Users/alex/esp/v5.2.2/esp-idf/components/freertos/config/xtensa/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/freertos/FreeRTOS-Kernel/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos -IC:/Users/alex/esp/v5.2.2/esp-idf/components/freertos/esp_additions/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/esp_hw_support/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/esp_hw_support/include/soc -IC:/Users/alex/esp/v5.2.2/esp-idf/components/esp_hw_support/include/soc/esp32 -IC:/Users/alex/esp/v5.2.2/esp-idf/components/esp_hw_support/port/esp32/. -IC:/Users/alex/esp/v5.2.2/esp-idf/components/heap/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/log/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/soc/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/soc/esp32 -IC:/Users/alex/esp/v5.2.2/esp-idf/components/soc/esp32/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/hal/platform_port/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/hal/esp32/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/hal/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/esp_rom/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/esp_rom/include/esp32 -IC:/Users/alex/esp/v5.2.2/esp-idf/components/esp_rom/esp32 -IC:/Users/alex/esp/v5.2.2/esp-idf/components/esp_common/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/esp_system/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/esp_system/port/soc -IC:/Users/alex/esp/v5.2.2/esp-idf/components/esp_system/port/include/private -IC:/Users/alex/esp/v5.2.2/esp-idf/components/xtensa/esp32/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/xtensa/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/xtensa/deprecated_include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/lwip/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/lwip/include/apps -IC:/Users/alex/esp/v5.2.2/esp-idf/components/lwip/include/apps/sntp -IC:/Users/alex/esp/v5.2.2/esp-idf/components/lwip/lwip/src/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/lwip/port/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/lwip/port/freertos/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/lwip/port/esp32xx/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/lwip/port/esp32xx/include/arch -IC:/Users/alex/esp/v5.2.2/esp-idf/components/lwip/port/esp32xx/include/sys -mlongcalls -Wno-frame-address -fno-builtin-memcpy -fno-builtin-memset -fno-builtin-bzero -fno-builtin-stpcpy -fno-builtin-strncpy -fdiagnostics-color=always -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=unused-but-set-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-enum-conversion -gdwarf-4 -ggdb -Og -fno-shrink-wrap -fmacro-prefix-map=C:/Users/alex/github/ESP-Nodes/ESP32-IDF_Blink=. -fmacro-prefix-map=C:/Users/alex/esp/v5.2.2/esp-idf=/IDF -fstrict-volatile-bitfields -fno-jump-tables -fno-tree-switch-conversion -std=gnu17 -Wno-old-style-declaration -o esp-idf\\esp_app_format\\CMakeFiles\\__idf_esp_app_format.dir\\esp_app_desc.c.obj -c C:\\Users\\alex\\esp\\v5.2.2\\esp-idf\\components\\esp_app_format\\esp_app_desc.c", "command": "C:\\Users\\alex\\.espressif\\tools\\tools\\xtensa-esp-elf\\esp-13.2.0_20230928\\xtensa-esp-elf\\bin\\xtensa-esp32-elf-gcc.exe -DESP_PLATFORM -DIDF_VER=\\\"v5.2.2\\\" -DSOC_MMU_PAGE_SIZE=CONFIG_MMU_PAGE_SIZE -DSOC_XTAL_FREQ_MHZ=CONFIG_XTAL_FREQ -D_GLIBCXX_HAVE_POSIX_SEMAPHORE -D_GLIBCXX_USE_POSIX_SEMAPHORE -D_GNU_SOURCE -D_POSIX_READER_WRITER_LOCKS -D PROJECT_NAME=\\\"ESP32-IDF_Blink\\\" -DPROJECT_VER=\\\"c62f1ee-dirty\\\" -IC:/Users/alex/github/ESP-Nodes/ESP32-IDF_Blink/build/config -IC:/Users/alex/esp/v5.2.2/esp-idf/components/esp_app_format/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/newlib/platform_include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/freertos/config/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/freertos/config/include/freertos -IC:/Users/alex/esp/v5.2.2/esp-idf/components/freertos/config/xtensa/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/freertos/FreeRTOS-Kernel/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos -IC:/Users/alex/esp/v5.2.2/esp-idf/components/freertos/esp_additions/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/esp_hw_support/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/esp_hw_support/include/soc -IC:/Users/alex/esp/v5.2.2/esp-idf/components/esp_hw_support/include/soc/esp32 -IC:/Users/alex/esp/v5.2.2/esp-idf/components/esp_hw_support/port/esp32/. -IC:/Users/alex/esp/v5.2.2/esp-idf/components/heap/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/log/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/soc/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/soc/esp32 -IC:/Users/alex/esp/v5.2.2/esp-idf/components/soc/esp32/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/hal/platform_port/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/hal/esp32/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/hal/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/esp_rom/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/esp_rom/include/esp32 -IC:/Users/alex/esp/v5.2.2/esp-idf/components/esp_rom/esp32 -IC:/Users/alex/esp/v5.2.2/esp-idf/components/esp_common/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/esp_system/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/esp_system/port/soc -IC:/Users/alex/esp/v5.2.2/esp-idf/components/esp_system/port/include/private -IC:/Users/alex/esp/v5.2.2/esp-idf/components/xtensa/esp32/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/xtensa/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/xtensa/deprecated_include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/lwip/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/lwip/include/apps -IC:/Users/alex/esp/v5.2.2/esp-idf/components/lwip/include/apps/sntp -IC:/Users/alex/esp/v5.2.2/esp-idf/components/lwip/lwip/src/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/lwip/port/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/lwip/port/freertos/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/lwip/port/esp32xx/include -IC:/Users/alex/esp/v5.2.2/esp-idf/components/lwip/port/esp32xx/include/arch -IC:/Users/alex/esp/v5.2.2/esp-idf/components/lwip/port/esp32xx/include/sys -mlongcalls -Wno-frame-address -fno-builtin-memcpy -fno-builtin-memset -fno-builtin-bzero -fno-builtin-stpcpy -fno-builtin-strncpy -fdiagnostics-color=always -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=unused-but-set-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-enum-conversion -gdwarf-4 -ggdb -Og -fno-shrink-wrap -fmacro-prefix-map=C:/Users/alex/github/ESP-Nodes/ESP32-IDF_Blink=. -fmacro-prefix-map=C:/Users/alex/esp/v5.2.2/esp-idf=/IDF -fstrict-volatile-bitfields -fno-jump-tables -fno-tree-switch-conversion -std=gnu17 -Wno-old-style-declaration -o esp-idf\\esp_app_format\\CMakeFiles\\__idf_esp_app_format.dir\\esp_app_desc.c.obj -c C:\\Users\\alex\\esp\\v5.2.2\\esp-idf\\components\\esp_app_format\\esp_app_desc.c",
"file": "C:\\Users\\alex\\esp\\v5.2.2\\esp-idf\\components\\esp_app_format\\esp_app_desc.c" "file": "C:\\Users\\alex\\esp\\v5.2.2\\esp-idf\\components\\esp_app_format\\esp_app_desc.c"
}, },
{ {

View File

@ -1,7 +1,7 @@
{ {
"version": "1.1", "version": "1.1",
"project_name": "ESP32-IDF_Blink", "project_name": "ESP32-IDF_Blink",
"project_version": "e7d3415", "project_version": "c62f1ee-dirty",
"project_path": "C:/Users/alex/github/ESP-Nodes/ESP32-IDF_Blink", "project_path": "C:/Users/alex/github/ESP-Nodes/ESP32-IDF_Blink",
"idf_path": "C:/Users/alex/esp/v5.2.2/esp-idf", "idf_path": "C:/Users/alex/esp/v5.2.2/esp-idf",
"build_dir": "C:/Users/alex/github/ESP-Nodes/ESP32-IDF_Blink/build", "build_dir": "C:/Users/alex/github/ESP-Nodes/ESP32-IDF_Blink/build",

View File

@ -7,14 +7,19 @@
CONDITIONS OF ANY KIND, either express or implied. CONDITIONS OF ANY KIND, either express or implied.
*/ */
#include <stdio.h> #include <stdio.h>
#include <sys/param.h>
#include "freertos/FreeRTOS.h" #include "freertos/FreeRTOS.h"
#include "freertos/task.h" #include "freertos/task.h"
#include "driver/gpio.h" #include "driver/gpio.h"
#include "esp_log.h" #include "esp_log.h"
#include "led_strip.h" #include "led_strip.h"
#include "sdkconfig.h" #include "sdkconfig.h"
#include "mqtt_client.h"
#include "esp_event.h"
static const char *TAG = "example"; static const char *TAG = "ESP32 MQTT SSL node";
static const uint8_t mqtt_eclipseprojects_io_pem_start[] = "";
/* Use project configuration menu (idf.py menuconfig) to choose the GPIO to blink, /* Use project configuration menu (idf.py menuconfig) to choose the GPIO to blink,
or you can edit the following line and set a number here. or you can edit the following line and set a number here.
@ -88,12 +93,34 @@ static void configure_led(void)
#error "unsupported LED type" #error "unsupported LED type"
#endif #endif
static void mqtt_event_handler(void *handler_args, esp_event_base_t base, init32_t event_id, void *event_data)
{
esp_mqtt_event_handle_t event = event_data;
esp_mqtt_client_handle_t client = event->client;
int msg_id;
}
static void mqtt_app_start(void) {
const esp_mqtt_client_config_t mqtt_cfg = {
.broker = {
.address.uri = "10.100.50.16",
.verification.certificate = (const char *)mqtt_eclipseprojects_io_pem_start
},
};
ESP_LOGI(TAG, "[APP] Free memory: %" PRIu32 " bytes", esp_get_free_heap_size());
esp_mqtt_client_handle_t client = esp_mqtt_client_init(&mqtt_cfg);
esp_mqtt_client_register_event(client, ESP_EVENT_ANY_ID, mqtt_event_handler, NULL);
esp_mqtt_client_start(client);
}
void app_main(void) void app_main(void)
{ {
ESP_LOGI(TAG, "[APP] Startup ..."); ESP_LOGI(TAG, "[APP] Startup ...");
ESP_LOGI(TAG, "[APP] Free memory: %" PRIu32 " bytes ", esp_get_free_heap_size()); ESP_LOGI(TAG, "[APP] Free memory: %" PRIu32 " bytes ", esp_get_free_heap_size());
ESP_LOGI(TAG, "[APP] IDF version: %s", esp_); ESP_LOGI(TAG, "[APP] IDF version: %s", esp_get_idf_version());
/* Configure the peripheral according to the LED type */ /* Configure the peripheral according to the LED type */
configure_led(); configure_led();
@ -104,4 +131,5 @@ void app_main(void)
s_led_state = !s_led_state; s_led_state = !s_led_state;
vTaskDelay(CONFIG_BLINK_PERIOD / portTICK_PERIOD_MS); vTaskDelay(CONFIG_BLINK_PERIOD / portTICK_PERIOD_MS);
} }
mqtt_app_start();
} }