Skip to content

Use arduino as a component of esp-idf in platformio #5887

@Huckies

Description

@Huckies

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

In file included from lib/NimBLE/NimBLEAdvertising.cpp:25:
lib/NimBLE/NimBLEDevice.h:42:12: fatal error: esp_bt.h: No such file or directory

****************************************************************
* Looking for esp_bt.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:esp_bt.h"
* Web  > https://platformio.org/lib/search?query=header:esp_bt.h
*
****************************************************************

 #  include "esp_bt.h"
            ^~~~~~~~~~
compilation terminated.
In file included from lib/NimBLE/NimBLECharacteristic.cpp:18:
lib/NimBLE/NimBLEDevice.h:42:12: fatal error: esp_bt.h: No such file or directory

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

[env:pico32]
platform = espressif32
board = pico32
framework = arduino, espidf

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions