diff --git a/README.md b/README.md index 9323201..6671d4a 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,15 @@ Spencer is also a part of [CircuitMess STEM Box](https://igg.me/at/stem-box/x#/) ![](https://circuitmess.com/wp-content/uploads/2020/11/spencer-page-1.jpg) -## Development setup +# Compiling -The firmware is based on the [Spencer Library](https://github.com/CircuitMess/Spencer-Library). +The firmware is based on the [Spencer Library](https://github.com/CircuitMess/Spencer-Library). It is, along other required libraries, automatically installed when you install the CircuitMess ESP32 Arduino platform. More info on [CircuitMess/Arduino-Packages](https://github.com/CircuitMess/Arduino-Packages). -Follow the instructions in the [README](https://github.com/CircuitMess/Spencer-Library/blob/master/README.md) on how to install the library, or just clone or download it into your Documents/Arduino/Libraries folder on Windows, or ~/Arduino/libraries folder on Linux. (NOTE: you will have to install some library dependencies.) +## Using Arduino IDE + +Simply open Spencer.ino using Arduino IDE, set the board to Spencer, and compile. + +## Using CMake To compile and upload you need to have [CMake](https://cmake.org/) and [arduino-cli](https://github.com/arduino/arduino-cli) installed. You also need to have both of them registered in the PATH. @@ -24,14 +28,20 @@ set(PORT /dev/ttyUSB0) ``` Then in the root directory of the repository type: ``` -mkdir build -cd build +mkdir cmake +cd cmake cmake .. -cmake --build . --target CMUpload +cmake --build . --target CMBuild ``` -This should compile and upload the sketch. +This will compile the binaries, and place the .bin and .elf files in the build/ directory located in the root of the repository. + +To compile the binary, and upload it according to the port set in CMakeLists.txt, run + +```cmake --build . --target CMBuild``` + +in the cmake directory. -## Meta +# Meta **CircuitMess** - https://circuitmess.com/ @@ -45,6 +55,6 @@ This should compile and upload the sketch. **YouTube** - https://www.youtube.com/channel/UCVUvt1CeoZpCSnwg3oBMsOQ ---- -Copyright © 2020 CircuitMess +Copyright © 2021 CircuitMess Licensed under [GPLv3 License](https://www.gnu.org/licenses/gpl-3.0.html).