1 /* OTA Tool example 2 3 This example code is in the Public Domain (or CC0 licensed, at your option.) 4 5 Unless required by applicable law or agreed to in writing, this 6 software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 7 CONDITIONS OF ANY KIND, either express or implied. 8 */ 9 #include "esp_system.h" 10 #include "esp_log.h" 11 #include "esp_ota_ops.h" 12 #include "esp_partition.h" 13 14 static const char *TAG = "example"; 15 app_main(void)16void app_main(void) 17 { 18 ESP_LOGI(TAG, "OTA Tool Example"); 19 20 const esp_partition_t *running = esp_ota_get_running_partition(); 21 22 // Display the running partition 23 ESP_LOGI(TAG, "Running partition: %s", running->label); 24 25 ESP_LOGI(TAG, "Example end"); 26 } 27