Dodawanie własnej biblioteki w PlatformIO

Temat na forum:
Trying to understand how to install custom local library

Odpowiedź:

Dec ’17 autor: ivankravets PlatformIO Team

There a few options:

Add library to project

Just unpack and copy library to lib folder in your project.

Install to global storage

In this case, library will be visible for other projects. Please place/unpack your library into global storage, item #4 in http://docs.platformio.org/en/latest/librarymanager/ldf.html#storage 1.6k

Using PlatformIO IDE > PIO Home

Please open PlatformIO IDE > PIO Home > Libraries > Install (Advanced library installation) and paste full path to a custom library and press “Install”.

Install using PlatformIO Core (CLI)

See https://docs.platformio.org/en/latest/userguide/lib/cmd_install.html 74

pio lib --global install /path/to/custon/library folder or archive
Project dependency

See https://docs.platformio.org/en/latest/librarymanager/quickstart.html#project-dependencies 224

[env:myenv]
lib_deps = /path/to/custom/library

Dodaj komentarz