This project uses the simple PlatformIO build system. PlatformIO is an extension to Microsoft VSCode. Workflows from building from the GUI or from the commandline are listed below.
If you encounter any problems, please post a question in our forum. And when you learn a fix, update these instructions for the next person (i.e. edit this file and send in a pull-request which we will eagerly merge).
- Purchase a suitable radio.
- Install Python.
- Install Git.
- Reboot your computer.
- Install PlatformIO.
- Click the PlatformIO icon on the side bar.
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
- At the line
default_envsyou can change it to the board type you are building for ie.
tlora-v2, tlora-v1, tlora-v2-1-1.6, tbeam, heltec, tbeam0.7(boards are listed further down in the file).
- The hardware can be configured for different countries by adding a definition to the
HW_VERSION_EU433, HW_VERSION_EU865, HW_VERSION_CN, HW_VERSION_JP. Other country settings can be found in
MeshRadio.h. The default is
- Click the PlatformIO icon on the side bar. Under
Project Tasksyou can now build or upload.
Note - To get a clean build you may have to delete the auto-generated file
./.vscode/c_cpp_properties.json, close and re-open Visual Studio and WAIT until the file is auto-generated before compiling again.
Purchase a suitable radio.
Download this git repo and cd into it:git clone https://github.com/meshtastic/Meshtastic-device.gitcd Meshtastic-device
git submodule update --init --recursiveto pull in dependencies this project needs.
If you are outside the USA, run "export COUNTRY=EU865" (or whatever) to set the correct frequency range for your country. Options are provided for
US(default). Pull-requests eagerly accepted for other countries.
Plug the radio into your USB port
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 (either
tlora-v2, tlora-v1, tlora-v2-1-1.6, tbeam, heltec, tbeam0.7).
Platform IO also installs a very nice VisualStudio Code based IDE, see their tutorial if you'd like to use it.
If you get a crash, you can decode the addresses from the
- Save the
Backtrace: 0x....line to a file, e.g.,
bin/exception_decoder.py backtrace.txt(this uses symbols from the last
firmware.elf, so you must be running the same binary that's still in your
You can run the exception decoder to monitor the serial output and decode backtraces in real time.
- From within PlatformIO, open a new terminal.
- At the the terminal, enter:
pio device monitor --port /dev/cu.SLAB_USBtoUART -f esp32_exception_decoderReplace the value of port with the location of your serial port.