|
1 | 1 | # Stratify API
|
2 | 2 |
|
3 |
| -Read here for the full documentation: https://stratifylabs.co/StratifyAPI/html/. |
| 3 | +## Overview |
| 4 | + |
| 5 | +- API Documentation |
| 6 | +- Naming Conventions |
| 7 | +- Building and Installing the Stratify API |
| 8 | + |
| 9 | +If you want to write programs using the Stratify API, you should read through the naming conventions then dive into the API documentation. Also, please look at the Stratify OS programs that are published on Github as they make use of the API. |
| 10 | + |
| 11 | +- [HelloWorld](https://github.com/StratifyLabs/HelloWorld) |
| 12 | +- [gpio](https://github.com/StratifyLabs/gpio) |
| 13 | +- [i2cprobe](https://github.com/StratifyLabs/i2cprobe) |
| 14 | +- [uartprobe](https://github.com/StratifyLabs/uartprobe) |
| 15 | + |
| 16 | +## API Documenation |
| 17 | + |
| 18 | +If you want to write applications using the Stratify API, please see the [API documentation](https://stratifylabs.co/StratifyAPI/html/). |
4 | 19 |
|
5 | 20 | ## Naming Conventions
|
6 | 21 |
|
@@ -83,6 +98,42 @@ enum {
|
83 | 98 | };
|
84 | 99 | ```
|
85 | 100 |
|
| 101 | +## Building the Stratify API |
| 102 | + |
| 103 | +The latest API is built and distributed with the [Stratify Labs SDK](https://stratifylabs.co/download/). You only need to build and install the source code if you want to debug, contribute new features, or equip your local SDK with a previous version. |
| 104 | + |
| 105 | +Here are the steps to build and install the API. You need to have git, CMake and the Stratify Labs SDK installed before running these commands. |
| 106 | + |
| 107 | +The API builds for running with Stratify OS on embedded platforms. The API can also run on Windows and Mac OS X by using a serialization protocol (called link) to Stratify OS devices. The cmake scripts check for the suffix "_arm" or "_link" to see which to build. |
| 108 | + |
| 109 | +### Mac OS X |
| 110 | + |
| 111 | +``` |
| 112 | +git clone https://github.com/StratifyLabs/StratifyAPI.git |
| 113 | +cd StratifyAPI |
| 114 | +mkdir cmake_arm; mkdir cmake_link |
| 115 | +cd cmake_arm |
| 116 | +cmake ..; make; make install |
| 117 | +cd ../cmake_link |
| 118 | +cmake ..; make; make install |
| 119 | +``` |
| 120 | + |
| 121 | +### Windows |
| 122 | + |
| 123 | +For windows, you need to specify some additional options because "make" typically isn't available in the PATH environment. If you are using CMD or powershell use "-G "MinGW Makefiles. If you are using msys, you can use -G "Unix Makefiles" and use the commands listed above for Mac OS X. |
| 124 | + |
| 125 | +``` |
| 126 | +git clone https://github.com/StratifyLabs/StratifyAPI.git |
| 127 | +cd StratifyAPI |
| 128 | +mkdir cmake_arm; mkdir cmake_link |
| 129 | +cd cmake_arm |
| 130 | +cmake .. -G "MinGW Makefiles" |
| 131 | +cmake --build . --target install |
| 132 | +cd ../cmake_link |
| 133 | +cmake .. -G "MinGW Makefiles" |
| 134 | +cmake --build . --target install |
| 135 | +``` |
| 136 | + |
86 | 137 |
|
87 | 138 |
|
88 | 139 |
|
|
0 commit comments