You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Fix: aspell instead of apsell
* Docs: Add Developer Guide for Linux Users
This patch adds a straight-forward quick start
guide for linux users to get involved with the project.
Add respective words to .wordlist.txt
PlatformIO is available as a Python package and can be installed via Pip.
156
+
Following best practices we will create a virtual environment in the repo directory first.
157
+
158
+
1. Install virtual-env (just in case it's not installed by default)
159
+
160
+
```
161
+
pip install virtual-env
162
+
```
163
+
164
+
2. Setup a virtual environment to not taint your system's python installation.
165
+
It does not matter where you create this but it makes sense to create it in the project directory, because best practice is to have a separate venv for each python project.
166
+
167
+
```
168
+
python -m venv .venv
169
+
source .venv/bin/activate
170
+
```
171
+
172
+
3. Install the required python packages. `empy` and `pexpect` are listed because modules like `dronecan` fail to correctly specify
173
+
their dependencies for pip to install them automatically.
The platformio package comes with the [pio](https://docs.platformio.org/en/latest/core/userguide/cmd_run.html) executable.
182
+
It is the build command of the toolchain.
183
+
`pio` expects a `platformio.ini` file in the directory where it is invoked, so change into src directory first.
184
+
185
+
There find and open the `user_defines.txt` file in your favorite editor.
186
+
This file contains the build flags that you know from ELRS Configurator.
187
+
At least uncomment the line for your regulatory domain. That's the minimum requirement for the build to work.
188
+
You may also want to set your binding phrase and everything else you would normally set in the ELRS Configurator.
189
+
190
+
To verify your build environment does work, start building firmware for a common 900Mhz target. It obviously needs a corresponding regulatory domain setting.
191
+
192
+
```
193
+
cd src
194
+
pio run --environment Unified_ESP32_900_RX_via_BetaflightPassthrough
195
+
```
196
+
197
+
At some point at the end of the build you will be asked to select some configuration between different manufacturers and products.
198
+
This sets parameters to provision a unified software binary with information about the device hardware, e.g. if the device has a power amplifier, diversity, etc. .
199
+
200
+
When you reach that point, this indicates that everything did work. You can abort with Ctrl-C and Enter now.
201
+
202
+
### Finding the right configuration for your target
203
+
204
+
This is the most tricky and obscure part of the ELRS project.
205
+
Browsing through the `platformio.ini` file already gives hints about the correct environment, but typically you need to look into the [targets](https://github.com/ExpressLRS/targets) and into the [devices](https://github.com/ExpressLRS/ExpressLRS-Configurator/tree/master/devices) to back-track what the configurator would select for your device.
206
+
Another option is to look into the logs of the ELRS Configurator after it flashed your device. You should find the call to pio together with the arguments there.
207
+
208
+
### Flashing
209
+
210
+
When you select `--target upload` and provide an `--upload-port`, pio will flash the device as the final step of the build, again asking you about manufacturer / device. Under the hood pio then invokes [esptool](https://github.com/espressif/esptool).
211
+
212
+
```
213
+
pio run --target upload --environment Unified_ESP32_900_RX_via_BetaflightPassthrough --upload-port /dev/ttyUSB0
0 commit comments