-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Use arduino as a component of esp-idf in platformio #5887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
You want to use NimBLE in Arduino or as component in IDF? |
I used to use it in Arduino but it'll be great if I can use it directly as a component in IDF |
@Jason2866 By the way would you please tell me how to add an arduino library to the project while arduino it self is imported as a component?(forget platformio I finally made it with esp-idf v4.4 and the arduino-core v4.4) |
Yes, the only supported version for actual Arduino is IDF 4.4. To add it just do as for Arduino. Copy to the folder components |
@Jason2866 It works now, thank you for being so kind! |
Similar to #5819 |
do you have a platformio.ini example with components folder content description ? |
There is a well maintained NimBLE Arduino lib. No need to use IDF. |
i tried the weather project. it works fine, but as soon i add nimble, it fails. |
@Koxx3 Things can go different with platformio for example I have tried hard to get the idf v4.4 with arduino as component work in platformio, but ends up with failure because of the weird arduino version requirement. You can re-compile the arduino library on your own with personal settings, espressif do offer the whole tool package. Or you can use arduino along with idf v4.4, just add it as a component to idf and write the CMakeLists manually. |
I have been struggling with this topic for some time and finally found a solution using I have summarized my finding (quite some journey) here: Would be interesting to get your feedback - I am fine to adjust when needed :-) |
@happychriss Thx for using my build :-) Actual official platformio should now work too since it uses now IDF4.4 too (which is needed for Arduino to work). |
i am using tasmota too. only way i found to use idf+arduino. |
@Jason2866 : First, really THANK YOU for your work. Without your build, my project would fail!!! Updated my blog-post to make this clear :-) Like Koxx3 - I tried to get it working with official IDF4.4 - no success. I tried to summarize my understanding (to help out others - see my blog but honestly I am still not yet 100% clear what is the trick you are doing with your repository that makes it work. I believe its the config in the package.json???? file... just guessing... |
It is the config in package.json and in platform.py which frameworks (arduino / IDF) to build use for combined arduino / idf projects. |
Is there an updated location where all these arduino as a component within esp-idf are? I am seeing dead links all over the internet pointing to this espidf-arduino-wifiscan and I can't seem to find it anymore. |
It should be installed when you first build something in platformio. |
I'm using ESP32 Pico D4 development kit, the IDE is VScode with platformio and I wish to use the idf as well as the Arduino librarys. The system is macOS with almost all libraries installed except the libncurses-dev, I really don't know where to find it.
The situation is: Everything runs well on the default arduino environment created by platformio (the version is blank so I can't tell which exactly it is), but when I want to enable the vTaskList function, the modification on sdkconfig changes nothing on the libfreertos.a file, so I wish to use the combination of idf and arduino.
It's now quite confusing, I tried a few but not a single one works.
This example does compile but with my code which uses NimBLE, it returns an errer
I've tried many other combination of esp-idf and arduino-esp32 but they never finish the compilation, some ends up with <Arduino.h> not found and others throws pages of warnings and errors like "esp32 error: unknown type name '_lock_t' static _lock_t rmt_driver_isr_lock;" or so.
If I create a new project using platformio and choose the espressif IoT framework and then manually revise it to
The version of arduino-esp32 remain unknown but the idf seems to be a 4.0.1 version and not working.
I'm sorry if I raised a dumb question, but as a newbie I'm really miss now. I just want to find a solution to have my code compiled.
I used these libraries: from platformio library downloading and NimBLE from github to replace the original huge ble library.
The text was updated successfully, but these errors were encountered: