I can successfully build the blink example for the ESP32 IDF SDK and flash it to an ESP32-C6. Great!
During the build, I'm seeing a few warnings from the Swift compiler that it cannot handle defines of the form -DABC=XYZ:
Output:
…
[530/540] Building Swift Module '__idf_main' with 2 sources
warning: conditional compilation flags do not have values in Swift; they are either present or absent (rather than 'IDF_VER="60720790"')
warning: conditional compilation flags do not have values in Swift; they are either present or absent (rather than 'MBEDTLS_CONFIG_FILE="mbedtls/esp_config.h"')
warning: conditional compilation flags do not have values in Swift; they are either present or absent (rather than 'MBEDTLS_MAJOR_VERSION=4')
warning: conditional compilation flags do not have values in Swift; they are either present or absent (rather than 'SOC_MMU_PAGE_SIZE=CONFIG_MMU_PAGE_SIZE')
warning: conditional compilation flags do not have values in Swift; they are either present or absent (rather than 'SOC_XTAL_FREQ_MHZ=CONFIG_XTAL_FREQ')
warning: conditional compilation flags do not have values in Swift; they are either present or absent (rather than 'TF_PSA_CRYPTO_USER_CONFIG_FILE="mbedtls/esp_config.h"')
[532/540] Performing configure step for 'bootloader'
…
It's not a big deal, but ideally I'd like to get rid of these warnings.
Does anyone know how to either:
- Remove these defines (presumably set by the IDF SDK CMake config) from the Swift compiler invocation entirely, or
- Pass these defines only to C files via
-Xcc, similar to what the current CMake file does for -march and -mabi
I tried for two hours to get this to work, but I'm not familiar enough with either CMake or the ESP SDK config to even figure out in which CMake properties these values are stored and how they end up in the Swift compiler invocation.
I can successfully build the blink example for the ESP32 IDF SDK and flash it to an ESP32-C6. Great!
During the build, I'm seeing a few warnings from the Swift compiler that it cannot handle defines of the form
-DABC=XYZ:Output:
It's not a big deal, but ideally I'd like to get rid of these warnings.
Does anyone know how to either:
-Xcc, similar to what the current CMake file does for-marchand-mabiI tried for two hours to get this to work, but I'm not familiar enough with either CMake or the ESP SDK config to even figure out in which CMake properties these values are stored and how they end up in the Swift compiler invocation.