Hi,
I need to use conditional compilation macro for ESP32. My C++ classes are used on Windows, Kiel and other platform.
Any useful macro I can use. Do I need to define my own macro.
Thanks,
Naeem
conditional compilation macro
Re: conditional compilation macro
I am adding macro for conditional compilation.
CXXFLAGS += -ESP32
xtensa-esp32-elf-c++.exe: error: unrecognized command line option '-ESP32'
I am getting error.
CXXFLAGS += -ESP32
xtensa-esp32-elf-c++.exe: error: unrecognized command line option '-ESP32'
I am getting error.
Re: conditional compilation macro
Do define a macro value you supply:
or
You can then use:
Code: Select all
-D<Name>
Code: Select all
-D<Name>=<Value>
Code: Select all
#ifdef NAME
....
#endif
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: conditional compilation macro
Thanks.
It is working.
CXXFLAGS+= -std=c++11 -DESP32
It is working.
CXXFLAGS+= -std=c++11 -DESP32
-
- Posts: 9764
- Joined: Thu Nov 26, 2015 4:08 am
Re: conditional compilation macro
FYI, ESP-IDF itself always defines ESP_PLATFORM , so you can use that as well.
Who is online
Users browsing this forum: Google [Bot] and 83 guests