Files
firmware/bin/regen-protos.sh

12 lines
541 B
Bash
Raw Normal View History

#!/usr/bin/env bash
2020-03-03 08:23:58 -08:00
2020-12-04 18:54:00 +08:00
set -e
echo "This script requires https://jpa.kapsi.fi/nanopb/download/ version 0.4.8 to be located in the"
2022-10-31 17:32:38 +10:00
echo "firmware root directory if the following step fails, you should download the correct"
echo "prebuilt binaries for your computer into nanopb-0.4.8"
2020-12-11 08:31:41 +08:00
2020-03-03 08:23:58 -08:00
# the nanopb tool seems to require that the .options file be in the current directory!
2022-05-12 20:45:30 +10:00
cd protobufs
../nanopb-0.4.8/generator-bin/protoc --experimental_allow_proto3_optional "--nanopb_out=-S.cpp -v:../src/mesh/generated/" -I=../protobufs meshtastic/*.proto