mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-20 17:52:35 +00:00
2.6 KiB
2.6 KiB
Build instructions
This project uses the simple PlatformIO build system. PlatformIO is an extension to Microsoft VSCode.
GUI
- Purchase a suitable radio.
- Install PlatformIO.
- Click the PlatformIO icon on the side bar.

- Under
Quick Access, Miscellaneous, Clone Git Projectenter the URL of the Meshtastic repo found here.
- Select a file location to save the repo.
- Once loaded, open the
platformio.inifile. - At the line
default_envsyou can change it to the board type you are building for ie.ttgo-lora32-v2, ttgo-lora32-v1, tbeam, heltec(boards are listed further down in the file). - Click the PlatformIO icon on the side bar. Under
Project Tasksyou can now build or upload.
Command Line
- Purchase a suitable radio.
- Install PlatformIO
- Download this git repo and cd into it
- Run
git submodule update --init --recursiveto pull in dependencies this project needs. - If you are outside the USA, edit platformio.ini to set the correct frequency range for your country. The line you need to change starts with
hw_versionand instructions are provided above that line. Options are provided forEU433,EU835,CN,JPandUS(default). Pull-requests eagerly accepted for other countries. - Plug the radio into your USB port
- Type
pio run --environment XXX -t upload(This command will fetch dependencies, build the project and install it on the board via USB). For XXX, use the board type you have (eithertbeam,heltec,ttgo-lora32-v1,ttgo-lora32-v2). - Platform IO also installs a very nice VisualStudio Code based IDE, see their tutorial if you'd like to use it.
Decoding stack traces
If you get a crash, you can decode the addresses from the Backtrace: line:
- Save the
Backtrace: 0x....line to a file, e.g.,backtrace.txt. - Run
bin/exception_decoder.py backtrace.txt(this uses symbols from the lastfirmware.elf, so you must be running the same binary that's still in your.pio/builddirectory).