Page 1 of 1

how to detect ESP32-s3 at compile time?

Posted: Thu Oct 20, 2022 7:57 am
by OutOfLine
I try to adapt an application for a "LILYGO T-Display S3" board

Code: Select all

#if defined ESP32
// ... (code for ESP32 boards here...)
#endif
How can I detect an ESP32s3 processor?

I try to adapt an application for a "LILYGO T-Display S3" board
arduino-esp32 version 2.0.5
Arduino 1.8.19
I cannot see the exact board type, so I select board "ESP32S3 Dev Module"

* So how can I detect the processor or/and the selected board at compile time?

* Better even: where can I find the definitions (and names) of such pp macros?

Thanks a lot

Re: how to detect ESP32-s3 at compile time?

Posted: Thu Oct 20, 2022 12:08 pm
by ESP_igrr
CONFIG_IDF_TARGET_ESP32S3 will be defined when building for ESP32-S3. This should work both in ESP-IDF and Arduino.

Re: how to detect ESP32-s3 at compile time?

Posted: Thu Oct 20, 2022 1:22 pm
by OutOfLine
Thank you