User Tools

Site Tools


esp:esp32:esp-idf-info:conditional-compile

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

esp:esp32:esp-idf-info:conditional-compile [2025/02/09 07:40] – created oscaresp:esp32:esp-idf-info:conditional-compile [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1
Line 1: Line 1:
-====== Compiler defines ====== 
-To set specific compile time defines (e.g. in case of compiling a project for different architectures esp32, esp32-c3, etc.) do the following: 
- 
-in the c source files include conditional statements 
-  #ifdef __GPIO_ESP_DEVKIT_WROOM 
-     ..... 
-  #endif 
-  #ifdef __GPIO_ESP_C3_MINI 
-     ..... 
-  #endif 
- 
-In **project/main/CMakelists.txt** add at the bottom: 
- 
-  add_compile_definitions( __GPIO_ESP_DEVKIT_WROOM=1) 
-  or 
-  add_compile_definitions( __GPIO_ESP_C3_MINI=1) 
  
esp/esp32/esp-idf-info/conditional-compile.1739086839.txt.gz · Last modified: by oscar