|
| 1 | +# Building in GitHub Codespaces |
| 2 | +> **A codespace is a cloud-hosted development environment.** |
| 3 | +> <br/>This guide provides a simple method to modify and build a version of INAV in the cloud. |
| 4 | +
|
| 5 | +## Setup |
| 6 | +1. Navigate to the version of INAV you want to modify. |
| 7 | +2. Create a new codespace for that version. `Code> Codespaces> Create codespace on 8.x.x.` |
| 8 | +<img width="1567" height="769" alt="image" src="https://github.com/user-attachments/assets/4427ea1e-19ff-4c2c-8d99-3870c13f767b" /> |
| 9 | + |
| 10 | +> A new codespace will launch in your browser. |
| 11 | +
|
| 12 | + |
| 13 | +## Modify |
| 14 | +3. Modify the code as required. |
| 15 | + You can freeley modify your copy of the INAV code from within the cloud environment. |
| 16 | + |
| 17 | +## Build |
| 18 | +Use the terminal inside the codespace environment to run the following commands: |
| 19 | + |
| 20 | +### Prepare |
| 21 | +#### 4. Prepare the build: |
| 22 | +```bash |
| 23 | +cmake -B build -S . |
| 24 | +``` |
| 25 | +<img width="1566" height="989" alt="image" src="https://github.com/user-attachments/assets/5747e49b-256b-4afb-9a16-3c592ba6773c" /> |
| 26 | + |
| 27 | +> Note: You may need to use ctrl+C to exit the process and return to the shell once it completes. |
| 28 | +
|
| 29 | +### Target |
| 30 | +#### 5. (Optional) If you don't know your target name, list the availble targests with: |
| 31 | +```bash |
| 32 | +cmake --build build --target help |
| 33 | +``` |
| 34 | +<img width="1520" height="377" alt="image" src="https://github.com/user-attachments/assets/c3fc5099-ed92-4006-94ca-d7b777d31f2f" /> |
| 35 | + |
| 36 | +### Build |
| 37 | +#### 6. Build the binary (replace the target name with your specific one): |
| 38 | +``` bash |
| 39 | +cmake --build build --target NEUTRONRCF435MINI |
| 40 | +``` |
| 41 | +<img width="1566" height="373" alt="image" src="https://github.com/user-attachments/assets/bb56ea92-0b2a-423c-b6dd-edec39f6e358" /> |
| 42 | + |
| 43 | +## Download |
| 44 | +7. Once the build process has complete, download the .hex binary from the build folder on the right. |
| 45 | + Example: `inav_8.0.1_NEUTRONRCF435MINI.hex` (Right-click > Download. |
| 46 | +<img width="1566" height="978" alt="image" src="https://github.com/user-attachments/assets/fd3bdeb4-459f-433b-ab70-74a49b26712f" /> |
| 47 | + |
| 48 | +> Note: Codespaces are automatically deleted after a period of inactivity, or you can manually deleted them at https://github.com/codespaces |
| 49 | +
|
0 commit comments