Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
lib/README@2:d9745be6c253, 2022-08-04 (annotated)
- Committer:
- fionalin
- Date:
- Thu Aug 04 15:14:29 2022 -0400
- Revision:
- 2:d9745be6c253
hehe forgot to commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
fionalin | 2:d9745be6c253 | 1 | |
fionalin | 2:d9745be6c253 | 2 | This directory is intended for project specific (private) libraries. |
fionalin | 2:d9745be6c253 | 3 | PlatformIO will compile them to static libraries and link into executable file. |
fionalin | 2:d9745be6c253 | 4 | |
fionalin | 2:d9745be6c253 | 5 | The source code of each library should be placed in a an own separate directory |
fionalin | 2:d9745be6c253 | 6 | ("lib/your_library_name/[here are source files]"). |
fionalin | 2:d9745be6c253 | 7 | |
fionalin | 2:d9745be6c253 | 8 | For example, see a structure of the following two libraries `Foo` and `Bar`: |
fionalin | 2:d9745be6c253 | 9 | |
fionalin | 2:d9745be6c253 | 10 | |--lib |
fionalin | 2:d9745be6c253 | 11 | | | |
fionalin | 2:d9745be6c253 | 12 | | |--Bar |
fionalin | 2:d9745be6c253 | 13 | | | |--docs |
fionalin | 2:d9745be6c253 | 14 | | | |--examples |
fionalin | 2:d9745be6c253 | 15 | | | |--src |
fionalin | 2:d9745be6c253 | 16 | | | |- Bar.c |
fionalin | 2:d9745be6c253 | 17 | | | |- Bar.h |
fionalin | 2:d9745be6c253 | 18 | | | |- library.json (optional, custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html |
fionalin | 2:d9745be6c253 | 19 | | | |
fionalin | 2:d9745be6c253 | 20 | | |--Foo |
fionalin | 2:d9745be6c253 | 21 | | | |- Foo.c |
fionalin | 2:d9745be6c253 | 22 | | | |- Foo.h |
fionalin | 2:d9745be6c253 | 23 | | | |
fionalin | 2:d9745be6c253 | 24 | | |- README --> THIS FILE |
fionalin | 2:d9745be6c253 | 25 | | |
fionalin | 2:d9745be6c253 | 26 | |- platformio.ini |
fionalin | 2:d9745be6c253 | 27 | |--src |
fionalin | 2:d9745be6c253 | 28 | |- main.c |
fionalin | 2:d9745be6c253 | 29 | |
fionalin | 2:d9745be6c253 | 30 | and a contents of `src/main.c`: |
fionalin | 2:d9745be6c253 | 31 | ``` |
fionalin | 2:d9745be6c253 | 32 | #include <Foo.h> |
fionalin | 2:d9745be6c253 | 33 | #include <Bar.h> |
fionalin | 2:d9745be6c253 | 34 | |
fionalin | 2:d9745be6c253 | 35 | int main (void) |
fionalin | 2:d9745be6c253 | 36 | { |
fionalin | 2:d9745be6c253 | 37 | ... |
fionalin | 2:d9745be6c253 | 38 | } |
fionalin | 2:d9745be6c253 | 39 | |
fionalin | 2:d9745be6c253 | 40 | ``` |
fionalin | 2:d9745be6c253 | 41 | |
fionalin | 2:d9745be6c253 | 42 | PlatformIO Library Dependency Finder will find automatically dependent |
fionalin | 2:d9745be6c253 | 43 | libraries scanning project source files. |
fionalin | 2:d9745be6c253 | 44 | |
fionalin | 2:d9745be6c253 | 45 | More information about PlatformIO Library Dependency Finder |
fionalin | 2:d9745be6c253 | 46 | - https://docs.platformio.org/page/librarymanager/ldf.html |