Easy question!

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Easy question!

Postby fly135 » Tue Dec 11, 2018 5:37 pm

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

permal
Posts: 384
Joined: Sun May 14, 2017 5:36 pm

Re: Easy question!

Postby permal » 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

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: Easy question!

Postby fly135 » Tue Dec 11, 2018 6:40 pm

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

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: Easy question!

Postby fly135 » Tue Dec 11, 2018 6:53 pm

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.

Who is online

Users browsing this forum: No registered users and 144 guests