how to detect ESP32-s3 at compile time?

OutOfLine
Posts: 52
Joined: Sat Feb 24, 2018 1:32 pm

how to detect ESP32-s3 at compile time?

Postby OutOfLine » Thu Oct 20, 2022 7:57 am

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

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

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

Postby ESP_igrr » Thu Oct 20, 2022 12:08 pm

CONFIG_IDF_TARGET_ESP32S3 will be defined when building for ESP32-S3. This should work both in ESP-IDF and Arduino.

OutOfLine
Posts: 52
Joined: Sat Feb 24, 2018 1:32 pm

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

Postby OutOfLine » Thu Oct 20, 2022 1:22 pm

Thank you

Who is online

Users browsing this forum: No registered users and 96 guests