This program (Without the extern "C") does not show any IDE errors when written as main.c
Code: Select all
#include "esp_log.h"
#include "esp_err.h"
#include "esp_err.h"
#include "nvs_flash.h"
extern "C" {
void app_main(void) {
ESP_LOGI("XXX", "YYY");
ESP_ERROR_CHECK(nvs_flash_init());
}
}
The ESP_LOGI macro shows a simple "Syntax Error" in the IDE.
The ESP_ERROR_CHECK shows an "Invalid Argumements" error, or sometimes in a bigger program an error that "__ASSERT not found"
I don't mind re-codeing the logging macro to:
Code: Select all
esp_log_write(ESP_LOG_INF", "Blah","Blah");