Skip to content

Remove static declaration of TAG in file esp_crt_bundle.c to be able to use IDF LOG (USE_ESP_IDF_LOG) #6893

Closed
@salmon-charles

Description

@salmon-charles

Board

ESP32 Dev module

Device Description

custom board

Hardware Configuration

I2C

Version

v2.0.3

IDE Name

PlatformIO

Operating System

macOS Catalina

Flash frequency

40Mhz

PSRAM enabled

yes

Upload speed

115200

Description

When using -DUSE_ESP_IDF_LOG=1, the following error appears:

compiling .pio/build/esp32dev/lib4be/WiFiClientSecure/ssl_client.cpp.o
<command-line>: error: expected identifier or '(' before string constant
/Users/ces/.platformio/packages/framework-arduinoespressif32/libraries/WiFiClientSecure/src/esp_crt_bundle.c:25:20: note: in expansion of macro 'TAG'
 static const char *TAG = "esp-x509-crt-bundle";

Commenting the TAG definition resolve the bug.

Sketch

#include <Arduino.h>

void setup() {
  // put your setup code here, to run once:
}

void loop() {
  // put your main code here, to run repeatedly:
}

Debug Message

compiling .pio/build/esp32dev/lib4be/WiFiClientSecure/ssl_client.cpp.o
<command-line>: error: expected identifier or '(' before string constant
/Users/ces/.platformio/packages/framework-arduinoespressif32/libraries/WiFiClientSecure/src/esp_crt_bundle.c:25:20: note: in expansion of macro 'TAG'
 static const char *TAG = "esp-x509-crt-bundle";


### Other Steps to Reproduce

_No response_

### I have checked existing issues, online documentation and the Troubleshooting Guide

- [X] I confirm I have checked existing issues, online documentation and Troubleshooting guide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions