Linking problem with the 'blufi' example

Yes because I thought unflags would be applied first and then build_flags applied on top of that. That should avoid double-definition of the macro and spamming warnings.

But that actually doesn’t work. I had it compile successfully because in blufi_security.c, above #include "mbedtls/aes.h" I added

#include "mbedtls/esp_config.h"
1 Like

Okay that makes more sense to me.
I did the same as you with #include "mbedtls/esp_config.h" and it compile successfully!

Can we conclude that this update to the example is needed because of the “porting” of esp-idf to platformio?

1 Like

No something is wrong on the PlatformIO side because the mbedtls config macro isn’t there (when compiling sources in the src/ of the project).

I’ve raised the issue

Okay, thanks again for the exquisite support! :+1:

I will go back and see if I can remember what I really wanted to tryout with this example. :grinning:

Thank you so much for posting the solution, I experienced the same in esphome, solved mine like this.

 esphome:
   includes: 
    - include.h

esp32:
  board: esp32doit-devkit-v1
  framework:
    type: esp-idf

Then the include file

#include "mbedtls/esp_config.h"
#include "mbedtls/aes.h"