Page 1 of 1

Easy question!

Posted: Tue Dec 11, 2018 5:37 pm
by fly135
When I compile with the IDF what definition can I expect to exist that indicates it's being built on the ESP32? Like say...

#ifdef ESP32_IDF
#include <FreeRTOS.h>
#endif

Re: Easy question!

Posted: Tue Dec 11, 2018 5:58 pm
by permal
ESP_PLATFORM has been the one I've used, but that one has been removed, at least when building using CMake in current master. There is a PR to get it back: https://github.com/espressif/esp-idf/pull/2601

Re: Easy question!

Posted: Tue Dec 11, 2018 6:40 pm
by fly135
Turns out this is a hard question. I searched the IDF components for #ifdef and only found one related to the BUILD as.. #ifdef ESP32. But appears in the rom files and isn't defined during a regular application build.

John A

Re: Easy question!

Posted: Tue Dec 11, 2018 6:53 pm
by fly135
permal wrote:
Tue Dec 11, 2018 5:58 pm
ESP_PLATFORM has been the one I've used, but that one has been removed, at least when building using CMake in current master. There is a PR to get it back: https://github.com/espressif/esp-idf/pull/2601
ESP_PLATFORM works with my release 3.1.1 IDF. Looks like I'll use that for now.