esp-idf icon indicating copy to clipboard operation
esp-idf copied to clipboard

mbedtls error logging crippled by nano formatting option (IDFGH-12606)

Open kriegste opened this issue 1 year ago • 1 comments

Answers checklist.

  • [X] I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • [X] I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • [X] I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

Enabling the nano formatting option in sdkconfig should have no negative effect on the error logging anywhere in ESP-IDF.

For example, mbedtls should display this:

esp-tls-mbedtls: read error :-0x7100: esp-tls-mbedtls: read error :-0x7100: esp_https_ota: Connection closed, errno = 0 esp_https_ota: Complete headers were not received

But actually this is displayed after enabling the nano formatting option:

esp-tls-mbedtls: read error :-0x000zX: esp-tls-mbedtls: read error :-0x000zX: esp_https_ota: Connection closed, errno = 0 esp_https_ota: Complete headers were not received

The problem is in this line: https://github.com/espressif/esp-idf/blob/master/components/esp-tls/esp_tls_mbedtls.c#L269

The formatting "zX" can be replaced by just "X". It works fine here. I am sure there are many more occurrences.

kriegste avatar Apr 13 '24 19:04 kriegste

Enabling the nano formatting option in sdkconfig should have no negative effect on the error logging anywhere in ESP-IDF.

Uh, yes it should? Otherwise what's the point of the option if the non-nano part will be linked anyway?

KaeLL avatar Apr 15 '24 17:04 KaeLL