Skip to content

Commit 6a144e2

Browse files
committed
updated build instructions so they match how flux-sdk now works
1 parent 304a125 commit 6a144e2

File tree

1 file changed

+43
-12
lines changed

1 file changed

+43
-12
lines changed

docs/build_update.md

Lines changed: 43 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# SparkFun DataLogger IoT - Build and Update
2-
![DataLogger Builds](https://github.com/sparkfun/SparkFun_DataLogger/actions/workflows/build-datalogger-iot.yml/badge.svg)
32

3+
![DataLogger Builds](https://github.com/sparkfun/SparkFun_DataLogger/actions/workflows/build-datalogger-iot.yml/badge.svg)
44

55
The repository contains the various firmware applications for the SparkFun DataLogger IoT incarnations.
66

7-
The firmware defines the functionally available for the supported DataLogger IoT boards, with the core implementation of the exposed features delivered by the [SparkFun Flux Framework](https://github.com/sparkfun/SparkFun_Flux).
7+
The firmware defines the functionally available for the supported DataLogger IoT boards, with the core implementation of the exposed features delivered by the [SparkFun Flux SDK](https://github.com/sparkfun/flux-sdk).
88

99
## Building and Uploading
1010

@@ -24,19 +24,49 @@ arduino-cli core update-index
2424
arduino-cli core install esp32:esp32
2525
```
2626

27-
### Install Flux
28-
The version of the ***SparkFun Flux*** library the DataLogger uses is linked in as a submodule to this repository. To checkout the submodule contents, issue the following command in the root folder of the repository.
27+
### Install the *flux sdk*
28+
29+
The flux sdk is used to create a custom Arduino Library called ```SparkFun_Flux``` that is made available for use by the Arduino build environment. This allows tailoring which components are needed for the specific application - in this case the datalogger.
30+
31+
First steps is to download the flux-sdk on your machine - which is cloned from github.
2932

3033
```sh
31-
git submodule update --init --recursive
34+
git clone [email protected]:sparkfun/flux-sdk.git
3235
```
3336

34-
The flux framework depends on a large number of Arduino libraries. To install all dependencies, Flux provides an installation script. This script requires the ```arduino-cli``` and is run by issuing the following command from the root folder of the DataLogger repository:
37+
The normal location is to set install the flux-sdk in the same directory as the ```sfe-dataloger``` (this) repository was installed. If you install it some other location, set the flux-sdk path using the FLUX_SDK_PATH environment variable. This is easily done by cd'ing into the flux-sdk root directory and executing the following command:
3538

3639
```sh
37-
./SparkFun_Flux/install-libs.sh
40+
export FLUX_SDK_PATH=`pwd`
3841
```
3942

43+
### Install dependant Arduino libraries
44+
45+
Once the flux-sdk is installed, you can install all libraries the framework depends on by issuing the following command:
46+
47+
```sh
48+
$FLUX_SDK_PATH/install-libs.sh
49+
```
50+
51+
### Using CMake
52+
53+
To configure the library used during the Arduino build process, the ```cmake``` system is used. The following steps outline how the custom library is built.
54+
55+
Set the current directory the root of the sfe-datalogger. Then create a directory called build and cd into it.
56+
57+
```sh
58+
mkdir build
59+
cd build
60+
```
61+
62+
Now run CMake with the following command:
63+
64+
```sh
65+
cmake ..
66+
```
67+
68+
This will create an Arduino library called ```SparkFun_Flux``` in the root directory of the sfe-datalogger repository. Once completed, you can delete the build directory, and build the datalogger firmware.
69+
4070
### Build the Firmware
4171

4272
The following command will build the DataLogger firmware. This command is run from the root directory of this repo.
@@ -72,13 +102,14 @@ The firmware is also automatically built by a GitHub action on code check-in. Th
72102
## Firmware Upload
73103

74104
### esptool.py
105+
75106
To upload the firmware, the ESP32 tool ```esptool.py``` is used. Installation instructions are located [here](https://docs.espressif.com/projects/esptool/en/latest/esp32/installation.html). If Python is setup on your system, a ```pip3``` can be used:
76107

77108
```sh
78109
pip3 install esptool
79110
```
80111

81-
Once installed - the following command is used to upload the build firmware to an attached DataLogger.
112+
Once installed - the following command is used to upload the build firmware to an attached DataLogger.
82113

83114
```sh
84115
esptool.py --chip esp32 --port "<PORT>" --baud 460800 \
@@ -93,18 +124,18 @@ esptool.py --chip esp32 --port "<PORT>" --baud 460800 \
93124

94125
* ```<PORT>``` - Is the port the board is connected to on your development machine
95126
* ```-baud``` - Set this to a value that works for your development machine. The above command uses ```460800```
96-
* ```-e``` - This command switch will release the ESP32 flash and is helpful for development.
127+
* ```-e``` - This command switch will release the ESP32 flash and is helpful for development.
97128
* For a faster upload, omit this option
98129

99130
### Uploading Automated GitHub Build Results
100131

101132
This repository builds DataLogger firmware using a GitHub action. To use this pre-built firmware on a DataLogger IoT board, do the following steps:
102133

103-
Download the desired firmware files from:
134+
Download the desired firmware files from:
104135

105136
* The results from a GitHub [Action](https://github.com/sparkfun/SparkFun_DataLogger/actions)
106137
* Or a specific DataLogger [Release](https://github.com/sparkfun/SparkFun_DataLogger/releases)
107138

108-
The downloaded zip file contains the three ```.bin``` files for the release.
139+
The downloaded zip file contains the three ```.bin``` files for the release.
109140

110-
Once unzipped, modified the paths to the desired ```.bin``` files in the above ```esptool.py``` command to upload the firmware to an attached DataLogger board.
141+
Once unzipped, modified the paths to the desired ```.bin``` files in the above ```esptool.py``` command to upload the firmware to an attached DataLogger board.

0 commit comments

Comments
 (0)