Arduino as components : Where to define global variable ESP32 ?

Sysprogs forums Forums VisualGDB Arduino as components : Where to define global variable ESP32 ?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #26175
    manuF
    Participant

    Hello all,

     

    In Arduino environment global define ESP32 or ESP8266 are define depending target choice.

    I use it with compiler #if statement to select one header or an other depending the target.

    but in esp-idf with arduino as component, global define ESP32 or ESP8266 are not create by default.

    So, my question : where do I need to declare this  global define like it is propagated when compile then use it in headers to make code selection at compile time ?

     

    Thanks

    Regards
    <div id=”gtx-trans” style=”position: absolute; left: -26px; top: 355.8px;”>
    <div class=”gtx-trans-icon”></div>
    </div>

    • This topic was modified 4 years, 6 months ago by manuF.
    • This topic was modified 4 years, 6 months ago by manuF.
    #26180
    support
    Keymaster

    Hi,

    For Arduino projects please use the first page of VisualGDB Project Properties to manage preprocessor definitions and other global options.

    For ESP-IDF projects please use the VS Project Properties of a specific ESP-IDF component to define exported preprocessor macros (those macros will apply to all components in a project, not just the selected component). You can access the properties of the main component via the Properties command for the project node itself.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.