meshtastic/docs/developers/firmware/build.mdx

29 lines
1.4 KiB
Plaintext
Raw Normal View History

2021-05-25 14:12:57 -07:00
---
2022-03-09 04:10:04 -08:00
id: build
title: Creating a build environment
2021-05-25 14:12:57 -07:00
sidebar_label: Building Meshtastic
---
Meshtastic uses the [PlatformIO](https://platformio.org) development environment, that enables easy multiplatform development and centralized tooling.
2021-05-25 14:12:57 -07:00
## Setup
2021-05-25 14:12:57 -07:00
1. Install PlatformIO, following the instructions available [here](https://platformio.org/platformio-ide).
2022-03-09 00:09:03 -08:00
2. Clone the `meshtastic-device` repository located [here](https://github.com/meshtastic/meshtastic-device). ([Instructions on cloning](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository))
2022-03-09 00:09:03 -08:00
3. Clone the [Submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules)
```shell
2022-03-09 00:09:03 -08:00
git submodule update --init
```
4. Some utilities and scripts use the Python programming language, Downloads available [here](https://www.python.org/downloads).
2021-05-25 14:12:57 -07:00
## Building
1. Open the newly cloned folder in [Visual Studio Code](https://code.visualstudio.com).
1. To select the device you you wish to build for, first open your [command palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) (`Ctrl + Shift + P`) and enter: `platformio: Switch Project Environment` and select your target.
1. To build the firmware, simply run `PlatformIO: Build` from your command palette.
1. Finally flashing the firmware to your device is as easy as running `PlatformIO: Upload`