manuF

Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • manuF
    Participant

    Now it could be nice if you could add arduino librairie support to your great tutorial ESP-IDF arduino as component.

    Thanks for your support.

    Emmanuel.

    manuF
    Participant

    I found a solution who look to work:

    – I create a new components (right click, add new elements) I named it Librairies.

    -I copy my Arduino library (MyArduinoLib) to the Librairies components directory.

    -Then I add header and source files from MyArduinoLib ( right click on Librairies components, add existing elements)

    -I Edit the CMakeLists.txt from Librairies components, and Add reference to Arduino components :

    set(COMPONENT_ADD_INCLUDEDIRS
    ../arduino/variants/esp32/
    ../arduino/cores/esp32/
    ../arduino/libraries/ArduinoOTA/src
    ../arduino/libraries/AsyncUDP/src
    ../arduino/libraries/AzureIoT/src
    ../arduino/libraries/BLE/src
    ../arduino/libraries/BluetoothSerial/src
    ../arduino/libraries/DNSServer/src
    ../arduino/libraries/EEPROM/src
    ../arduino/libraries/ESP32/src
    ../arduino/libraries/ESPmDNS/src
    ../arduino/libraries/FFat/src
    ../arduino/libraries/FS/src
    ../arduino/libraries/HTTPClient/src
    ../arduino/libraries/HTTPUpdate/src
    ../arduino/libraries/NetBIOS/src
    ../arduino/libraries/Preferences/src
    ../arduino/libraries/SD_MMC/src
    ../arduino/libraries/SD/src
    ../arduino/libraries/SimpleBLE/src
    ../arduino/libraries/SPIFFS/src
    ../arduino/libraries/SPI/src
    ../arduino/libraries/Ticker/src
    ../arduino/libraries/Update/src
    ../arduino/libraries/WebServer/src
    ../arduino/libraries/WiFiClientSecure/src
    ../arduino/libraries/WiFi/src
    ../arduino/libraries/Wire/src
    

    And after some adjustment it compile just find! (like Add ESP32 in preprocessor definition of Libraries comonent (right click, properties, c/c++ Preprocessor definition)

     

    Hope this could help peoples using usually arduino who want to go further in esp-idf configuration (like for power management who is not well supporting in arduino core) or people who want to use Arduino libraries in esp-idf !

    Have fun !

     

    • This reply was modified 4 years, 6 months ago by manuF.
    • This reply was modified 4 years, 6 months ago by manuF.
    • This reply was modified 4 years, 6 months ago by support. Reason: removed broken screenshot link
    manuF
    Participant

    In fact my question is pretty simple:

    You made a tutorial to use Arduino as components. Perfect nice tutorial.

    So my question is : How to add an Arduino library to this project? Perhaps you don’t know!?

    There are one way, but this not clean, is to add  the library in the arduino librarie folder and use ‘Add existinf file” the not forget to add a relative pass to the exported include directory in the setting of arduino component!

    But this is not clean because the Arduino core must stay independent.

    So do you know how to add an Arduino library to your tutorial project ?

     

    manuF
    Participant

    Dear Support,

    I didn’t ask you to explain how esp-idf work or any third party library.

    I add a components which depend from header on an other components.

    I just ask you how to add these dependency in a visualgdb project!

    I think many peoples use arduino because they dont want to spent time with low level problem adding any value.

    VisualGDB could break this.

    I am electronic designer,  I spent a lot of time to understand this tool, and support ask me to get fucked. (Yes this is!)

    What that ?

    • This reply was modified 4 years, 6 months ago by manuF.
    manuF
    Participant

    Dear Support,

    I take time to read the documentation linked in your message.

    But in Visualgdb it stay unclear on how to do.

    What I did : on  component folder I choose Add a new one, I named it Libraries.

    In the Libraries directory I copy a Libray (Adafruit_GFX_Library) and then I Add all source code and header to Libraries (“Add existing files”)

    But compiler didnt find Arduino header who are in the arduino component (I made it as in your tutorial Arduino as esp idf component)

    I spent many time (and many Visualgdb crash) to find how to make arduino component as dependency of the Librairies component…without any succes.

    I am very frustrated now! I know there are a difficult time at the beginning of using a new system but I dont find the exit !

    Could you help me a little ?

    Thanks

    • This reply was modified 4 years, 6 months ago by manuF.
Viewing 5 posts - 1 through 5 (of 5 total)