Build macro to identify chip
Build macro to identify chip
Is there a macro to identify which chip an application if being built for. Something like 'ESP32' or 'ESP32s3'??
-
- Posts: 9757
- Joined: Thu Nov 26, 2015 4:08 am
Re: Build macro to identify chip
If you include sdkconfig.h, you can either use the CONFIG_IDF_TARGET_* defines to check for a chip (e.g. #if CONFIG_IDF_TARGET_ESP32) or use CONFIG_IDF_TARGET to get a string representation.
Re: Build macro to identify chip
Is there a list of CONFIG_IDF_TARGET_ESP32 defines for other chips (like s3, 8266, etc...)?
-
- Posts: 9757
- Joined: Thu Nov 26, 2015 4:08 am
Re: Build macro to identify chip
esp-idf/Kconfig has them listed out. (Note that Kconfig files leave off the CONFIG_ bit, so e.g. the ESP32S2 target is called IDF_TARGET_ESP32S2)
Who is online
Users browsing this forum: No registered users and 199 guests